Switch device and switch system
The switch device addresses the issue of indefinite device states and memory lifespan by storing and restoring operating states during voluntary resets, ensuring continuous operation and extended device life.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2026-03-06
AI Technical Summary
Existing switch devices with remote operation capabilities face issues where a reset can cause the operating state of connected devices to become indefinite or revert to an initial value, and frequent rewriting of nonvolatile memory shortens its lifespan.
A switch device that includes a non-volatile memory to store the operating state during voluntary resets and an operating state setting unit to restore the state after restart, and an alternative method that communicates with a server to retrieve the state data for restoration.
Extends the lifespan of the switch device and ensures connected devices continue operating even after resets by minimizing frequent memory writes and providing reliable state restoration.
Smart Images

Figure 0007825467000001 
Figure 0007825467000002 
Figure 0007825467000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a switch device and a switch system. [Background technology]
[0002] There are known techniques for switching the operating state of devices. For example, Patent Document 1 discloses an operating state control system for electrical devices that enables remote operation from outside the line of sight using existing electrical devices. Specifically, the operating state control system disclosed in Patent Document 1 includes a remote operation switch for remotely switching the operating state of the device, and enables a user to control the remote operation switch via a communication control unit by operating a terminal device. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2004-147065 Summary of the Invention [Problem to be solved by the invention]
[0004] In the technology for switching the operating state of such devices, if the switch device includes a control unit for remote operation, the control unit may be reset. If the control unit is reset, the operating state of the device connected to the switch device may become indefinite or may be set to an initial value, making it impossible to continue operating the device.
[0005] One method for ensuring stable operation of devices during resets is to save the device's operating state to nonvolatile memory each time it is updated, and then read the operating state from the nonvolatile memory after restarting the device from the reset, restoring the device to the operating state before the reset. However, frequently rewriting nonvolatile memory shortens the nonvolatile memory's lifespan. In light of these circumstances, there is a need for a switch device that can extend its lifespan while allowing devices connected to the switch device to continue operating even when the switch device is reset.
[0006] The present disclosure has been made to solve the above-mentioned problems, and aims to provide a switch device etc. that is capable of extending the life of the switch device and allowing devices connected to the switch device to continue operating even if the switch device is reset. [Means for solving the problem]
[0007] In order to achieve the above object, a switch device according to a first aspect of the present disclosure includes: A switch device connected to a load device, a switching unit that switches the operation state of the load device in response to a user operation; a non-volatile memory; a memory control unit that stores an operating state of the load device in the nonvolatile memory when a voluntary reset is performed; and an operating state setting unit that sets the operating state of the load device to the operating state stored in the nonvolatile memory when the switch device restarts from the voluntary reset.
[0008] In order to achieve the above object, a switch device according to a second aspect of the present disclosure includes: A switch device connected to a load device, a switching unit that switches the operation state of the load device in response to a user operation; a communication unit that communicates with the server; a communication control unit that, when the switching unit switches the operation state of the load device, transmits operation state data indicating the operation state after switching by the switching unit to the server via the communication unit; and an operating state setting unit that, when the operating state data is received from the server when the switch device restarts from a reset, sets the operating state of the load device to the operating state indicated by the operating state data received from the server. [Effects of the Invention]
[0009] According to the present disclosure, it is possible to extend the life of a switch device and to allow devices connected to the switch device to continue operating even when the switch device is reset. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is a diagram showing the overall configuration of a switch system according to a first embodiment; [Figure 2] FIG. 1 is a block diagram showing a hardware configuration of a server according to a first embodiment. [Figure 3] FIG. 1 is a diagram showing the appearance of a switch device according to a first embodiment; [Figure 4] FIG. 1 is a block diagram showing a hardware configuration of a switch device according to a first embodiment; [Figure 5] FIG. 1 is a block diagram showing a functional configuration of a control unit provided in a switch device according to a first embodiment. [Figure 6] FIG. 10 is a diagram showing an example of time-dependent changes in the operating state updated by the switch device according to the first embodiment; [Figure 7] 1 is a flowchart showing the flow of a voluntary reset process executed by the switch device according to the first embodiment; [Figure 8] 1 is a flowchart showing the flow of a start-up process executed by a switch device according to a first embodiment; [Figure 9] FIG. 10 is a diagram showing an example of time-dependent changes in the operating state updated by the switch device according to the second embodiment; [Figure 10]10 is a flowchart showing a flow of processing executed by an operation terminal according to a second embodiment. [Figure 11] 10 is a flowchart showing the flow of processing executed by a server according to the second embodiment. [Figure 12] 10 is a flowchart showing the flow of an operation state update process executed by a switch device according to a second embodiment. [Figure 13] 10 is a flowchart showing the flow of a start-up process executed by a switch device according to a second embodiment. DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, embodiments will be described in detail with reference to the drawings, in which the same or corresponding parts are designated by the same reference numerals.
[0012] (Embodiment 1) 1 shows the overall configuration of a switch system 1 according to embodiment 1. The switch system 1 is a system that can remotely switch the operating state of a ventilation device 50 installed inside a building H from outside the building H.
[0013] 1, the switch system 1 includes an operation terminal 10, a server 20, a router 30, a ventilation device 50, and a switch device 100. The router 30, the switch device 100, and the ventilation device 50 are installed inside a building H. The building H is, for example, a room in a detached house, an apartment building, an office building, a commercial facility, a factory, or the like.
[0014] The operation terminal 10 and the server 20 are communicatively connected via a communication network N1. The server 20 and the router 30 are communicatively connected via a communication network N2. The communication networks N1 and N2 are wide area networks such as the Internet.
[0015] The operation terminal 10 is a terminal that can be operated by a user who is outside the building H and out of the line of sight of the ventilation device 50. The operation terminal 10 is, for example, a smartphone, a tablet terminal, a personal computer, or the like.
[0016] Although not shown, the operation terminal 10 includes a CPU (Central Processing Unit), ROM (Read Only Memory), RAM (Random Access Memory), a communication interface, and a readable / writable non-volatile semiconductor memory. In the operation terminal 10, the CPU uses the RAM as a working memory and executes a control program stored in the ROM, thereby controlling the operation of the operation terminal 10.
[0017] The operation terminal 10 also includes an input device such as a push button or a touch panel, and a display device such as an organic EL (Electro-Luminescence) display or a liquid crystal display. The operation terminal 10 accepts operations from a user and transmits information indicating the content of the accepted operation to the server 20 via the communication network N1. The operation terminal 10 also receives information transmitted from the server 20 and displays the received information.
[0018] The server 20 is a device that manages the switch system 1, and specifically, is a server that provides resources in cloud computing. As shown in FIG. 2, the server 20 includes a control unit 21, a DB (database) 22, and a communication unit 23.
[0019] The control unit 21 includes a CPU, a ROM, and a RAM. In the control unit 21, the CPU reads out programs and data stored in the ROM, and uses the RAM as a work area to control the operation of the server 20.
[0020] The DB 22 includes a readable / writable nonvolatile storage device such as a flash memory, a hard disk, etc. The DB 22 stores various data including data indicating the operating status of the ventilation device 50.
[0021] The communication unit 23 communicates with devices external to the server 20 via the communication networks N1 and N2. For example, the communication unit 23 transmits and receives various information to and from the operation terminal 10 via the communication network N1, and transmits and receives various information to and from the switch device 100 via the communication network N2 and the router 30. Although not shown, the communication unit 23 is communicably connected via the communication network N2 to switch devices installed in various buildings other than the building H, and can remotely control various load devices.
[0022] The router 30 is a device, specifically a broadband router, that enables the switch device 100 to communicate with the server 20 via the communication network N2. The router 30 is communicatively connected to the switch device 100 via a local network established within the building H. The router 30 is communicatively connected to the server 20 via the communication network N2.
[0023] The ventilation device 50 is installed inside the building H and is a device that ventilates the inside of the building H. The ventilation device 50 includes a ventilation fan and a drive unit that drives the fan. The ventilation device 50 is an example of a load device connected to the switch device 100.
[0024] The switch device 100 is electrically connected to the ventilation equipment 50, and functions as a switch device that switches the operating state of the ventilation equipment 50. The switch device 100 may be used by being hung on a wall of the building H, or may be used by being held by a user.
[0025] As shown in FIG. 3, the switch device 100 includes an ON / OFF switch 101, a strong / weak switch 102, a WPS (Wi-Fi Protected Setup) switch 103, an ON / OFF LED 171, a strong / weak LED 172, and a wireless LED 173.
[0026] The ON / OFF switch 101 is a switch that switches on and off the operation of the ventilation device 50. By touching and operating the ON / OFF switch 101, the user can input an instruction to operate or stop the ventilation device 50.
[0027] The strong / weak switch 102 is a switch for switching between the strength and weakness of the operation when the ventilation device 50 is operating. The user can adjust the air volume of the ventilation device 50 by touching and operating the strong / weak switch 102.
[0028] The WPS switch 103 is a switch that wirelessly connects the switch device 100 and the router 30 through pairing. A user can input an instruction to wirelessly connect the switch device 100 and the router 30 by touching and operating the WPS switch 103.
[0029] The ON / OFF LED 171, the strong / weak LED 172, and the wireless LED 173 are means for notifying the current state of the switch device 100 to the outside by turning on or off.
[0030] 4, the switch device 100 includes, as control components, a control unit 110, a non-volatile memory 120, a communication unit 130, a switching unit 140, and LED (Light Emitting Diode) drive circuits 161 to 163. The components are connected via an internal bus that transmits signals.
[0031] The control unit 110 includes an arithmetic unit such as a microcomputer or a CPU, and executes processing and calculations related to the control of the switch device 100. The control unit 110 may also be called a processor, a processing unit, etc. The control unit 110 also includes a ROM and a RAM. The control unit 110 reads out programs and data stored in the ROM and uses the RAM as a work area to perform overall control of the switch device 100.
[0032] The non-volatile memory 120 includes a non-volatile semiconductor memory such as a flash memory, an EPROM (Erasable Programmable ROM), or an EEPROM (Electrically Erasable Programmable ROM). The non-volatile memory 120 stores programs and data used by the control unit 110 to perform various processes. The non-volatile memory 120 also stores data generated or acquired by the control unit 110 as a result of performing various processes.
[0033] The communication unit 130 includes an RF (Radio Frequency) antenna for transmitting and receiving wireless signals, and communicates with the router 30 via the RF antenna. The communication unit 130 receives wireless signals transmitted from the server 20 via the router 30. The communication unit 130 also transmits wireless signals generated in the switching device 100 to the server 20 via the router 30.
[0034] The switching unit 140 switches the operating state of the ventilation device 50 in response to a user operation. The switching unit 140 includes relay drive circuits 141 and 142, an ON / OFF relay 151, and a strong / weak relay 152. The relay drive circuits 141 and 142 are circuits that drive the ON / OFF relay 151 and the strong / weak relay 152, respectively, under the control of the control unit 110.
[0035] The ON / OFF relay 151 and the strong / weak relay 152 are components that switch whether or not current flows to the ventilation device 50. The ON / OFF relay 151 controls the opening and closing of a contact in accordance with an electrical signal input from the relay drive circuit 141, thereby switching whether to operate or stop the ventilation device 50. The strong / weak relay 152 controls the opening and closing of a contact in accordance with an electrical signal input from the relay drive circuit 142, thereby adjusting the strength of the operation of the ventilation device 50.
[0036] The LED drive circuits 161 to 163 are circuits that drive the ON / OFF LED 171, the strong / weak LED 172, and the wireless LED 173 under the control of the control unit 110 to turn them on or off, respectively.
[0037] Next, the functional configuration of the control unit 110 will be described with reference to Fig. 5. As shown in Fig. 5, the control unit 110 functionally includes an operation state setting unit 111, a switch input unit 112, a communication control unit 113, a memory control unit 115, and a wireless LED control unit 114.
[0038] Each of these functions is realized by software, firmware, or a combination of software and firmware. The software and firmware are written as programs and stored in ROM or non-volatile memory 120. The control unit 110 then executes the programs stored in ROM or non-volatile memory 120 to realize each function.
[0039] The operating state setting unit 111 sets the operating state of the ventilation device 50 in response to a user operation. Specifically, the operating state setting unit 111 controls the switching unit 140 to switch the operating state of the ventilation device 50 to a state instructed by the user.
[0040] Here, the operating state of the ventilation device 50 is information indicating whether the ventilation device 50 is operating or stopped, and, if the ventilation device 50 is operating, the strength of the operation. Specifically, the strength of the operation of the ventilation device 50 is represented by the air volume of the ventilation device 50. The operating state setting unit 111 switches between operating and stopping the ventilation device 50 using a relay drive circuit 141 and an ON / OFF relay 151. In addition, the operating state setting unit 111 switches between strength and weakness of the operation of the ventilation device 50 using a relay drive circuit 142 and a strong / weak relay 152.
[0041] User operations are divided into two types: local operations, in which the user directly touches and operates the switch device 100, and remote operations, in which the user operates the switch device 100 from a distance via wireless communication. More specifically, local operations are input by the user operating the ON / OFF switch 101 or the strong / weak switch 102. In contrast, remote operations are input by the user operating the operation terminal 10. The content of the remote operations input at the operation terminal 10 is transmitted from the operation terminal 10 to the switch device 100 via the server 20.
[0042] The switch input unit 112 accepts input of manual operations which are operations for the ON / OFF switch 101, the strong / weak switch 102, and the WPS switch 103. When the switch input unit 112 accepts an operation input for the ON / OFF switch 101 or the strong / weak switch 102, the operation state setting unit 111 controls the relay drive circuits 141, 142 in accordance with the accepted operation input, and switches the operation state of the ventilation device 50.
[0043] The communication control unit 113 controls wireless communication via the communication unit 130. Specifically, the communication control unit 113 receives operation information indicating the content of a remote operation, which is an operation input by a user to the operation terminal 10, by communicating with the server 20. When the operation information is received by the communication control unit 113, the operation state setting unit 111 controls the relay drive circuits 141, 142 in accordance with the received operation information, and switches the operation state of the ventilation device 50.
[0044] The wireless LED control unit 114 controls the LED drive circuits 161 to 163. First, the wireless LED control unit 114 turns on the ON / OFF LED 171 when the ventilation device 50 is operating, and turns off the ON / OFF LED 171 when the ventilation device 50 is stopped. Second, the wireless LED control unit 114 adjusts the degree of illumination of the strong / weak LED 172 in a manner that indicates the strength of the current operation of the ventilation device 50. Third, the wireless LED control unit 114 turns on the wireless LED 173 when the WPS operation starts by pushing the WPS switch 103, and turns off the wireless LED 173 when the WPS operation ends.
[0045] The memory control unit 115 controls reading and writing of data from and to the non-volatile memory 120. Specifically, the memory control unit 115 saves the operating state of the ventilation equipment 50 in the non-volatile memory 120. The reason for this is that even if the switch device 100 is reset, the ventilation equipment 50 can be restored to the operating state before the reset after restarting.
[0046] Here, resetting the switch device 100 means that data stored in the RAM of the control unit 110 is cleared and the states of the switch device 100 and the control unit 110 are returned to their initial states. When the switch device 100 is reset, the operating state of the ventilation device 50 becomes indefinite or is set to an initial value, and the operating state immediately before the reset is not continued. Therefore, in order to restore the operating state of the ventilation device 50 to the operating state before the reset at the time of reset, the memory control unit 115 stores operating data indicating the operating state of the ventilation device 50 immediately before the reset in the non-volatile memory 120.
[0047] However, the guaranteed number of times that the non-volatile memory 120 can be rewritten is limited, for example, about 100,000 times. Therefore, if the operating state of the ventilation device 50 is saved in the non-volatile memory 120 every time the operating state is updated, there is a concern that this will shorten the life of the non-volatile memory 120. To avoid such concerns, in the first embodiment, the memory control unit 115 saves the operating state of the ventilation device 50 in the non-volatile memory 120 when a voluntary reset is performed, rather than every time the operating state of the ventilation device 50 is updated.
[0048] Here, a voluntary reset means a reset that is voluntarily performed by the switch device 100. Specifically, examples of a voluntary reset include a reset to start up the switch device 100 with new firmware after updating the firmware, a reset to switch wireless communication modes, a reset to detect an abnormality in communication or operation, etc. In contrast, a reset caused by an unexpected factor such as a power outage or a malfunction does not fall under the category of a voluntary reset.
[0049] The memory control unit 115 determines whether or not a reset event that requires such a voluntary reset has occurred. When a voluntary reset event has occurred, the memory control unit 115 stores in the non-volatile memory 120 the operating state of the ventilation device 50 immediately before the reset is performed, before performing the reset.
[0050] Specifically, how the operating state of the ventilation device 50 changes when a voluntary reset is performed will be described with reference to Fig. 6. Fig. 6 shows an example in which the switching unit 140 switches the operation to "ON", the airflow rate to "weak", and the remote control to "permitted" in accordance with the last operation of the user before the reset.
[0051] In addition to this information, the operating status data indicating the operating status of the ventilation device 50 includes information that the last operation source was "local" and that the scheduled operation is set to "manual." When a voluntary reset event occurs, the memory control unit 115 stores such operating status data in the non-volatile memory 120.
[0052] When the switch device 100 restarts after the reset, the operating state of the ventilation device 50 is first set to a predetermined initial setting value. Then, the memory control unit 115 reads out the operating state stored in the non-volatile memory 120. The operating state setting unit 111 controls the ON / OFF relay 151 and the strong / weak relay 152 via the relay drive circuits 141, 142 to set the operating state of the ventilation device 50 to the operating state read out from the non-volatile memory 120.
[0053] In this way, when the switch device 100 restarts after a voluntary reset, the operating state setting unit 111 sets the operating state of the ventilation device 50 to the operating state saved in the non-volatile memory 120. As a result, when the switch device 100 restarts after a voluntary reset, the operating state setting unit 111 restores the operating state of the ventilation device 50 to the operating state immediately before the reset.
[0054] After the operating state setting unit 111 sets the operating state of the ventilation device 50 to the operating state stored in the non-volatile memory 120, the memory control unit 115 erases the operating state stored in the non-volatile memory 120. Specifically, when the switching device 100 restarts after a voluntary reset, the memory control unit 115 reads the operating state from the non-volatile memory 120 and then deletes the operating state data stored in the non-volatile memory 120, or invalidates the operating state data and makes it available for overwriting. In this way, by erasing unnecessary data from the non-volatile memory 120, the usable storage area in the non-volatile memory 120 is increased.
[0055] Note that when a reset other than a voluntary reset, specifically a reset caused by an unexpected factor such as a power outage or a malfunction, is executed, the memory control unit 115 does not save the operating state of the ventilation device 50 in the non-volatile memory 120. Therefore, when the switch device 100 restarts after a reset caused by a factor other than a voluntary reset, the operating state immediately before the reset is not saved in the non-volatile memory 120. In this case, the operating state setting unit 111 sets the operating state of the ventilation device 50 to a predetermined initial state.
[0056] Specifically, when the switch device 100 starts up, in other words, in all startup processes including restart processes after a voluntary reset, the memory control unit 115 determines whether or not the operating state is saved in the non-volatile memory 120. If the result of the determination is that the operating state is saved in the non-volatile memory 120, the memory control unit 115 reads out the operating state. In this case, the operating state setting unit 111 sets the operating state of the ventilation device 50 to the operating state saved in the non-volatile memory 120.
[0057] On the other hand, if the operating state is not stored in the non-volatile memory 120, the operating state setting unit 111 sets the operating state of the ventilation device 50 to a predetermined initial setting value. This case corresponds to a case where the device is restarted after being reset due to an unexpected factor. Therefore, by setting the operating state to the initial setting value, the user can set the operating state of the ventilation device 50 by manual operation or remote operation after confirming safety.
[0058] Next, the flow of processing executed by the switch device 100 according to the first embodiment will be described with reference to FIGS.
[0059] First, the voluntary reset process executed by the switching device 100 will be described with reference to Fig. 7. The voluntary reset process shown in Fig. 7 is executed by the control unit 110 when a voluntary reset event occurs in the switching device 100.
[0060] When the voluntary reset process is started, the control unit 110 determines whether or not the reset event that has occurred corresponds to a reset to the factory default values (step S11).
[0061] If the reset event that has occurred does not correspond to a reset to the factory default values (step S11; NO), the control unit 110 functions as the memory control unit 115 and saves the current operating state of the switch device 100 in the non-volatile memory 120 (step S12). After saving the operating state in the non-volatile memory 120, the control unit 110 executes a reset (step S13).
[0062] On the other hand, if the reset event that has occurred corresponds to a reset to the factory default values (step S11; YES), the control unit 110 skips step S12. In this case, the operating state of the ventilation device 50 is set to the initial setting value after restart. Therefore, the control unit 110 executes a reset in step S13 without saving the operating state of the switch device 100 in the non-volatile memory 120. This completes the voluntary reset process shown in FIG. 7.
[0063] Next, a startup process executed by the switch device 100 will be described with reference to Fig. 8. The startup process shown in Fig. 8 is executed by the control unit 110 when the switch device 100 starts up from a stopped state, including restarting after a reset.
[0064] When the startup process starts, the control unit 110 functions as the memory control unit 115 and reads the nonvolatile memory 120 (step S21). Then, the control unit 110 determines whether a valid operating state is stored in the nonvolatile memory 120 (step S22).
[0065] If a valid operating state is stored in the non-volatile memory 120 (step S22; YES), the control unit 110 functions as the operating state setting unit 111 and updates the operating state of the switch device 100 with the operating state read from the non-volatile memory 120 (step S23).
[0066] After updating the operating state, the control unit 110 functions as the memory control unit 115 and erases the data stored in the non-volatile memory 120 (step S24). In other words, the control unit 110 erases the operating state data read out in step S23.
[0067] On the other hand, if there is no valid operating state data in the non-volatile memory 120 (step S22; NO), the control unit 110 functions as the operating state setting unit 111 and updates the operating state of the switch device 100 with the initial setting value (step S25). This completes the startup process shown in FIG.
[0068] As described above, when a voluntary reset is performed, the switch device 100 according to the first embodiment saves the operating state of the ventilation device 50 in the non-volatile memory 120, and when restarting from the voluntary reset, sets the operating state of the ventilation device 50 to the operating state saved in the non-volatile memory 120. As a result, even when the switch device 100 restarts due to a voluntary reset, the ventilation device 50 can be restored to the operating state before the reset, and therefore the operation of the ventilation device 50 can be continued.
[0069] In this case, the switch device 100 according to the first embodiment limits the timing for saving the operating state in the non-volatile memory 120 to the timing of a voluntary reset, rather than every time the operating state is updated. This reduces the number of times data is written to the non-volatile memory 120. As a result, the life of the switch device 100 is extended, and the ventilation device 50 can continue to operate even when the switch device 100 executes a voluntary reset.
[0070] (Embodiment 2) Next, a description will be given of embodiment 2. Descriptions of the same configurations and functions as embodiment 1 will be omitted where appropriate.
[0071] When a voluntary reset is performed, the switch device 100 according to the first embodiment stores the operating state of the ventilation device 50 in the non-volatile memory 120. In contrast, the switch device 100 according to the second embodiment stores the operating state of the ventilation device 50 in the server 20.
[0072] 9, how the operation state of the ventilation device 50 changes in the second embodiment will be described. As in the first embodiment, when a manual operation or remote operation by the user is accepted, the operation state setting unit 111 controls the switching unit 140 in accordance with the accepted manual operation or remote operation to switch the operation state of the ventilation device 50.
[0073] In the second embodiment, when the switching unit 140 switches the operating state of the ventilation device 50, the communication control unit 113 transmits operating state data indicating the operating state of the ventilation device 50 after switching by the switching unit 140 to the server 20 via the communication unit 130. In other words, every time the operating state of the ventilation device 50 is switched, the communication control unit 113 transmits operating state data indicating the operating state of the ventilation device 50 after switching by the switching unit 140 to the server 20. As a result, the communication control unit 113 stores the operating state data in the DB 22 of the server 20, rather than in the non-volatile memory 120 in the switch device 100.
[0074] On the other hand, a situation may arise in which it is not possible to transmit the operating state data to the server 20, such as when a communication interruption occurs between the switch device 100 and the server 20. The example in Fig. 9 shows a case in which a communication interruption occurs after the operating state is switched by a manual operation, making it impossible to communicate with the server 20.
[0075] When the communication control unit 113 transmits the operation status data to the server 20, it determines whether or not a response to the transmission has been received from the server 20. Then, when the communication control unit 113 does not receive a response from the server 20 within a predetermined time after transmitting the operation status data to the server 20, it determines that communication with the server 20 has failed.
[0076] If communication with the server 20 fails in this way, it is not possible to save the operating state data in the server 20. Therefore, the memory control unit 115 saves the operating state in the non-volatile memory 120 in the switching device 100. In other words, if the operating state of the ventilation device 50 is switched by the switching unit 140 and communication with the server 20 via the communication unit 130 fails, the memory control unit 115 saves the operating state of the ventilation device 50 in the non-volatile memory 120.
[0077] Next, a description will be given of the process when the switch device 100 is restarted after being reset. Here, the reset may be a spontaneous reset as described in the first embodiment, or a reset due to an unexpected factor such as a power outage or a malfunction.
[0078] When the switch device 100 is reset and restarted, the operating state of the ventilation device 50 is first set to a predetermined initial setting value, as shown in Fig. 9. At this time, the communication control unit 113 performs initial communication with the server 20. Specifically, when the switch device 100 is restarted, the communication control unit 113 notifies the server 20 of this fact and requests the operating state data stored in the DB 22 of the server 20.
[0079] When the server 20 receives the initial communication from the switch device 100, it reads out from the DB 22 the operating status data previously received from the switch device 100 and transmits it to the switch device 100. When the operating status data is transmitted from the server 20, the communication control unit 113 receives the operating status data.
[0080] When the switch device 100 restarts from a reset, the operating state setting unit 111 sets the operating state of the ventilation device 50 to either the operating state indicated by the operating state data received from the server 20 or the operating state stored in the non-volatile memory 120. More specifically, when the switch device 100 restarts from a reset, the operating state setting unit 111 sets the operating state of the ventilation device 50 to the newer of the operating state indicated by the operating state data received from the server 20 or the operating state stored in the non-volatile memory 120.
[0081] Specifically, when the memory control unit 115 saves the operating status in the non-volatile memory 120, it saves the operating status in association with date and time data indicating the current date and time. Furthermore, when the server 20 saves the operating status data in the DB 22, it saves the operating status data in association with date and time data indicating the current date and time. Then, when the server 20 transmits the operating status data to the switch device 100, it transmits the date and time data saved in association with the operating status data.
[0082] When the operating state data is received from the server 20, the operating state setting unit 111 compares the date and time data associated with the operating state read from the non-volatile memory 120 with the date and time data associated with the operating state data received from the server 20. Then, the operating state setting unit 111 sets the operating state of the ventilation device 50 to the operating state with the newer date and time. Note that the example in FIG. 9 illustrates a case where the operating state setting unit 111 sets the operating state of the ventilation device 50 to the operating state read from the non-volatile memory 120.
[0083] In this way, by comparing the dates and times when the operating status was saved in the server 20 and the non-volatile memory 120, it is possible to more reliably restore the operating status of the ventilation device 50 to the operating status before reset. Note that when communication with the server 20 is possible, the operating status is saved in the server 20, and therefore the operating status saved in the server 20 is newer. Therefore, the operating status saved in the server 20 takes priority.
[0084] More specifically, when the continuous operation mode is set for the ventilation device 50, the switch device 100 executes a process of saving the above-mentioned operation state in the DB 22 of the server 20 or the non-volatile memory 120. Here, the continuous operation mode is an operation mode that is set when the ventilation device 50 is used for an application in which it operates without stopping. For example, an operation mode in which the ventilation device 50 is operated temporarily by setting an operation time does not fall under the continuous operation mode.
[0085] In the following, as an example of an operation mode that operates continuously, a description will be given of an operation mode of "24-hour ventilation" in which the ventilation device 50 constantly ventilates the inside of the building H. Such an operation mode can be set by the user operating the operation terminal 10.
[0086] When the switch device 100 restarts after being reset, the operating state setting unit 111 determines whether or not the operating mode of "24-hour ventilation" is set for the ventilation device 50. If the operating mode of "24-hour ventilation" is set for the ventilation device 50, the operating state setting unit 111 sets the operating state of the ventilation device 50 to the newer of the operating state indicated by the operating state data received from the server 20 and the operating state saved in the non-volatile memory 120, as described above.
[0087] On the other hand, if the operation mode of "24-hour ventilation" is not set for the ventilation device 50, there is little need to restore the operation state of the ventilation device 50 to the operation state before reset. Therefore, the operation state setting unit 111 sets the operation state of the ventilation device 50 to a predetermined initial state.
[0088] Next, referring to FIGS. 10 to 13, the switch system 1 according to the second embodiment will be described. The flow of the process executed by the following will be explained.
[0089] First, the process executed by the operation terminal 10 according to the second embodiment will be described with reference to Fig. 10. The process shown in Fig. 10 is executed by the CPU of the operation terminal 10 whenever necessary when the operation terminal 10 is in a state where it can operate normally.
[0090] When the process starts, the operating terminal 10 displays an input screen on which the user can set the operation and operation mode of the ventilation device 50 (step S101). For example, the user can input, on the input screen, an operation to change the operation state of the ventilation device 50, an operation to set the operation mode of the ventilation device 50 to "24-hour ventilation", etc.
[0091] When the input screen is displayed, the operation terminal 10 determines whether or not any operation has been received from the user (step S102). If no operation has been received from the user (step S102; NO), the operation terminal 10 stops the process at step S102 and waits until an operation is received from the user.
[0092] On the other hand, if an operation is accepted from the user (step S102; YES), the operation terminal 10 transmits operation information to the server 20 (step S103). The operation information is information indicating the operation state, operation mode, etc., which are the contents of the operation accepted from the user.
[0093] Thereafter, the operation terminal 10 returns the process to step S102. Then, the operation terminal 10 waits until it receives an operation from the user again, and transmits operation information indicating the content of the received operation to the server 20 every time it receives an operation from the user.
[0094] Next, the flow of processing executed by the server 20 according to the second embodiment will be described with reference to Fig. 11. The processing shown in Fig. 11 is executed by the control unit 21 of the server 20 whenever necessary when the server 20 is in a state where it can operate normally.
[0095] When the process starts, the control unit 21 determines whether or not any data has been received from the operation terminal 10 or the switch device 100 (step S201).
[0096] When operation information is received from the operation terminal 10 (step S201; operation information), the control unit 21 stores the received operation information in the DB 22 (step S202). Then, the control unit 21 transfers the received operation information to the switch device 100 (step S203).
[0097] When the operation status data is received from the operation terminal 10 (step S201; operation status data), the control unit 21 stores the received operation status data in the DB 22 (step S204). Then, the control unit 21 transmits a response to the switch device 100 (step S205).
[0098] When initial communication is received from the operation terminal 10 (step S201; initial communication), the control unit 21 reads out operation status data from the DB 22 (step S206). Then, the control unit 21 transmits the operation status data read out from the DB 22 to the switch device 100 (step S207).
[0099] After steps S203, S205, and S207, the server 20 returns the process to step S201 and waits until it receives some data again. When the server 20 receives some data, it executes one of the processes in steps S202 to S203, steps S204 to S205, or steps S206 to S207 depending on the received data.
[0100] Next, an operation status update process executed by the switch device 100 according to the second embodiment will be described with reference to Fig. 12. The operation status update process shown in Fig. 12 is executed by the control unit 110 of the switch device 100 whenever necessary when the switch device 100 is in a state where it can operate normally.
[0101] When the operation status update process starts, the control unit 110 determines whether or not a local operation or a remote operation has been received from the user (step S301). If neither a local operation nor a remote operation has been received (step S301; NO), the control unit 110 remains in step S301 and waits until a local operation or a remote operation is received.
[0102] On the other hand, when either a local operation or a remote operation is received from the user (step S301; YES), the control unit 110 functions as the operation state setting unit 111 and updates the operation state of the ventilation device 50 (step S302). Specifically, the control unit 110 controls the switching unit 140 to update the operation state of the ventilation device 50 to the operation state instructed in the received operation.
[0103] After updating the operation status, the control unit 110 functions as the communication control unit 113 and transmits operation status data indicating the updated operation status to the server 20 (step S303). As a result, the control unit 110 stores the updated operation status data in the DB 22.
[0104] After transmitting the operating status data to the server 20, the control unit 110 determines whether the operating mode of the ventilation device 50 is "24-hour ventilation" (step S304). If the operating mode is "24-hour ventilation" (step S304; YES), the control unit 110 then functions as the communication control unit 113 and determines whether a response has been received from the server 20 within a predetermined time after transmitting the operating status data to the server 20 (step S305).
[0105] If no response is received from server 20 (step S305; NO), control unit 110 determines that communication with server 20 has failed. In this case, control unit 110 functions as memory control unit 115 and saves the updated operating state in non-volatile memory 120 (step S306). After saving the updated operating state in non-volatile memory 120, control unit 110 returns the process to step S301.
[0106] On the other hand, if the operating mode is not "24-hour ventilation" (step S304; NO), or if a response is received from the server 20 even if the operating mode is "24-hour ventilation" (step S305; YES), the control unit 110 skips step S306 and returns the processing to step S301.
[0107] In this way, the control unit 110 executes the processes from step S302 onward every time it receives a local operation or a remote operation from the user. Then, the control unit 110 updates the operation status of the ventilation device 50 in accordance with the received operation, and stores the updated operation status in either the DB 22 of the server 20 or the non-volatile memory 120 of the switch device 100.
[0108] Next, a startup process executed by the switch device 100 according to the second embodiment will be described with reference to Fig. 13. The startup process shown in Fig. 13 is executed by the control unit 110 when the switch device 100 starts up from a stopped state, including restarting after a reset.
[0109] When the startup process starts, the control unit 110 functions as the communication control unit 113 and executes initial communication with the server 20 (step S401). As a result, the control unit 110 notifies the server 20 that the switching device 100 has started up, and requests the operating state data stored in the DB 22 of the server 20.
[0110] When the initial communication is executed, the control unit 110 determines whether the operation mode of the ventilation device 50 is "24-hour ventilation" (step S402). If the operation mode is "24-hour ventilation" (step S402; YES), the control unit 110 functions as the memory control unit 115 and reads out the operation status stored in the non-volatile memory 120 (step S403).
[0111] After reading the non-volatile memory 120, the control unit 110 functions as the communication control unit 113 and determines whether or not the operating status data has been received from the server 20 (step S404). If the operating status data has been received from the server 20 (step S404; YES), the control unit 110 compares the date and time data between the operating status data read from the non-volatile memory 120 and the operating status data received from the server 20 (step S405).
[0112] As a result of the comparison, the control unit 110 updates the operating status of the switch device 100 with the operating status data with the newer date and time between the operating status data read from the non-volatile memory 120 and the operating status data received from the server 20 (step S406).
[0113] On the other hand, if no operational status data is received from the server 20 in step S404 (step S404; NO), the control unit 110 updates the operational status of the switch device 100 with the operational status data read from the non-volatile memory 120 (step S407).
[0114] Furthermore, if the operation mode is not "24-hour ventilation" in step S402 (step S402; NO), the control unit 110 updates the operation state of the switch device 100 with the initial setting value (step S408).
[0115] In steps S406 to S408, the control unit 110 functions as the operation state setting unit 111. This completes the start-up process shown in FIG.
[0116] As described above, when the operating state of the ventilation device 50 is switched, the switch device 100 according to the second embodiment transmits operating state data indicating the operating state after the switch to the server 20 via the communication unit 130. Then, when restarting from a reset, the switch device 100 according to the second embodiment sets the operating state of the ventilation device 50 to either the operating state indicated by the operating state data received from the server 20 or the operating state stored in the non-volatile memory 120. In this way, since the operating state is stored in the server 20, the number of times data is written to the non-volatile memory 120 can be reduced. As a result, the life of the switch device 100 can be extended, and the ventilation device 50 can continue to operate even when the switch device 100 executes a reset.
[0117] In particular, when communication with the server 20 is possible, the operating state is saved in the server 20, and when communication with the server 20 fails, the operating state is saved in the non-volatile memory 120, so in many cases saving in the server 20 takes priority over saving in the non-volatile memory 120. This makes it possible to further reduce the number of times data is written to the non-volatile memory 120, leading to a longer lifespan of the switch device 100.
[0118] Furthermore, every time the operating state of the ventilation device 50 is switched, the switch device 100 according to the second embodiment stores operating state data indicating the operating state after the switch in the server 20 or the non-volatile memory 120. Therefore, not only in the case of a voluntary reset, but also when the ventilation device 50 is restarted after a reset due to an unexpected factor, the ventilation device 50 can be restored to the operating state before the reset.
[0119] (Variation) Although the embodiments have been described above, it is possible to combine the embodiments, or to modify or omit the embodiments as appropriate.
[0120] For example, in the second embodiment, the switch device 100 uses both the DB 22 of the server 20 and the non-volatile memory 120 in the switch device 100 as a storage destination for saving the operating state of the ventilation equipment 50. However, as a simpler configuration, the switch device 100 may use only the DB 22 of the server 20 as a storage destination for the operating state, and not use the non-volatile memory 120 in the switch device 100.
[0121] In this case, when the switch device 100 restarts from a reset, the process of reading the operating state from the non-volatile memory 120 is not executed, and the communication control unit 113 determines whether or not operating state data has been received from the server 20. If operating state data has been received from the server 20, the operating state setting unit 111 sets the operating state of the ventilation device 50 to the operating state indicated by the operating state data received from the server 20. On the other hand, if operating state data has not been received from the server 20, the operating state setting unit 111 sets the operating state of the ventilation device 50 to the initial setting value.
[0122] The functions described in embodiment 1 may be combined with the switch device 100 described in embodiment 2. Specifically, in embodiment 2, when the operating state of the ventilation device 50 is updated, the switch device 100 saves the operating state in the DB 22 of the server 20 or the non-volatile memory 120. In addition to this, the memory control unit 115 may save the operating state of the ventilation device 50 in the non-volatile memory 120 when a voluntary reset is performed.
[0123] The processing performed when the ventilation device 50 is set to an operation mode in which it operates continuously, as described in the second embodiment, may be applied to the first embodiment. Specifically, when the ventilation device 50 is set to an operation mode in which it operates continuously at the time of restart, and the operation state is stored in the non-volatile memory 120, the operation state setting unit 111 sets the operation state of the ventilation device 50 to the operation state read out from the non-volatile memory 120. In other cases, the operation state setting unit 111 sets the operation state of the ventilation device 50 to an initial setting value.
[0124] The user may be allowed to select on the operation terminal 10 whether the ventilation device 50 is to be restored to the operating state before the reset or to the initial setting values when the device is restarted.
[0125] In the above embodiment, the switching device 100 has a configuration that can accept both manual and remote operation by the user. However, as a simpler configuration, the switching device 100 may not have the configurations of the ON / OFF switch 101, the high / low switch 102, and the WPS switch 103 for accepting manual operation. In this case, the switching device 100 switches the operating state of the ventilation device 50 only by remote operation via wireless communication by the communication unit 130.
[0126] In the above embodiment, the ventilation device 50 has been described as an example of a load device connected to the switch device 100. However, the load device may be a device other than the ventilation device 50. For example, the load device may be an air conditioning device having a function other than a ventilation function, that is, a heating device, a cooling device, a dehumidifying device, a blower, etc. Furthermore, the load device may be a type of device other than an air conditioning device.
[0127] In the above embodiment, the control unit 110 of the switching device 100 functions as each unit shown in FIG. 5 by having a microcomputer, CPU, or the like execute a program stored in the ROM or non-volatile memory 120. However, the control unit 110 may be dedicated hardware. Dedicated hardware is, for example, a single circuit, a composite circuit, a programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination thereof. When the control unit 110 is dedicated hardware, the functions of each unit may be realized by individual hardware, or the functions of each unit may be realized together by a single piece of hardware.
[0128] In addition, some of the functions of each unit may be realized by dedicated hardware, and other parts may be realized by software or firmware. In this way, the control unit 110 can realize each of the above-mentioned functions by hardware, software, firmware, or a combination of these.
[0129] It is also possible to make an existing computer such as a personal computer or an information terminal device function as the switch device 100 by applying a program that defines the operation of the control unit 110 to the computer.
[0130] Furthermore, the method of distribution of such a program is arbitrary, and for example, it may be stored on a computer-readable recording medium such as a CD-ROM (Compact Disk ROM), a DVD (Digital Versatile Disk), an MO (Magneto Optical Disk), or a memory card and distributed, or it may be distributed via a communication network such as the Internet.
[0131] The present disclosure allows various embodiments and modifications without departing from the broad spirit and scope of the present disclosure. Furthermore, the above-described embodiments are intended to illustrate the present disclosure and do not limit the scope of the present disclosure. That is, the scope of the present disclosure is defined by the claims, not the embodiments. Various modifications made within the scope of the claims and the meaning of equivalent disclosures are considered to be within the scope of the present disclosure. [Explanation of symbols]
[0132] 1 Switch system, 10 Operation terminal, 20 Server, 21 Control unit, 22 DB, 23 Communication unit, 30 Router, 50 Ventilation equipment, 100 Switch device, 101 ON / OFF switch, 102 Strong / Weak switch, 103 WPS switch, 110 Control unit, 111 Operation state setting unit, 112 Switch input unit, 113 Communication control unit, 114 Wireless LED control unit, 115 Memory control unit, 120 Non-volatile memory, 130 Communication unit, 140 Switching unit, 141, 142 Relay drive circuit, 151 ON / OFF relay, 152 Strong / Weak relay, 161 to 163 LED drive circuit, 171 ON / OFF LED, 172 Strong / Weak LED, 173 Wireless LED, H Building, N1, N2 Communication network
Claims
1. A switch device connected to a load device, a switching unit that switches the operation state of the load device in response to a user operation; a non-volatile memory; a memory control unit that stores an operating state of the load device in the nonvolatile memory when a voluntary reset is performed; an operating state setting unit that sets the operating state of the load device to the operating state stored in the non-volatile memory when the switch device restarts from the voluntary reset, Switch device.
2. the memory control unit erases the operating state stored in the nonvolatile memory after the operating state of the load device is set to the operating state stored in the nonvolatile memory; The switch device according to claim 1 .
3. When the switch device is started, the operation state setting unit If the operating state is stored in the nonvolatile memory, setting the operating state of the load device to the operating state stored in the nonvolatile memory; If the operating state is not stored in the nonvolatile memory, the operating state of the load device is set to a predetermined initial state. The switch device according to claim 1 or 2.
4. A switch device connected to a load device, a switching unit that switches the operation state of the load device in response to a user operation; a communication unit that communicates with the server; a communication control unit that, when the switching unit switches the operation state of the load device, transmits operation state data indicating the operation state after switching by the switching unit to the server via the communication unit; an operating state setting unit that, when the operating state data is received from the server when the switch device is restarted from a reset state, sets the operating state of the load device to the operating state indicated by the operating state data received from the server, Switch device.
5. a non-volatile memory; a memory control unit that stores the operating state in the nonvolatile memory, When the switch device restarts from the reset state, the operation state setting unit sets the operation state of the load device to either the operation state indicated by the operation state data received from the server or the operation state stored in the non-volatile memory. The switch device according to claim 4.
6. the memory control unit stores the operation state in the non-volatile memory when the switching unit switches the operation state of the load device and communication with the server via the communication unit fails. The switch device according to claim 5 .
7. When the switch device restarts from the reset state, the operation state setting unit sets the operation state of the load device to the newer of the operation state indicated by the operation state data received from the server and the operation state stored in the non-volatile memory. The switch device according to claim 5 or 6.
8. the memory control unit stores the operating state in the non-volatile memory when a voluntary reset is performed; The switch device according to any one of claims 5 to 7.
9. When the switch device is restarted from the reset state, the operation state setting unit If an operation mode in which the load device operates continuously is set, the operation state of the load device is set to the operation state indicated by the operation state data received from the server; If the continuous operation mode is not set for the load device, the operation state of the load device is set to a predetermined initial state. The switch device according to any one of claims 4 to 8.
10. A system comprising: the switch device according to any one of claims 4 to 9; and the server. Switch system.
11. A power supply comprising: the switch device according to any one of claims 1 to 9; and the load device. Switch system.
Citation Information
Patent Citations
Method and device of controlling air-conditioning device
JP1989256749A
Electrical equipment controller with remote controller
JP1996272635A
Operational state control system of electrical device
JP2004147065A
Hot water using device system and its program
JP2006214639A
Control method of ventilation fan and the ventilation fan
JP2011069544A