Switch status detector, detection method and detection system
By setting a hysteresis interval between the magnetic component and the sensing component, the problem of repeated switching of the magnetic sensor in doors and windows is solved, realizing the protection and stable control of intelligent devices and enhancing the practicality of the switch status detector.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN LINPTECH
- Filing Date
- 2022-07-07
- Publication Date
- 2026-05-26
AI Technical Summary
Existing magnetic sensors for doors and windows have too little ability to distinguish between "open" and "closed" states, causing the sensors to repeatedly switch between "open" and "closed" states, damaging the connected smart devices.
Using magnetic and sensing components, at least two intervals are divided by setting the difference between the first and second thresholds to be greater than or equal to 1 mm, forming a hysteresis interval to prevent repeated switching of the sensing state. The system also sends messages to control the smart device through a detection switch and a wireless transmission module.
It effectively prevents the sensing state of the sensing component from switching repeatedly, protects the connected smart devices, improves practicality and stability, and can also be used as a wireless switch to actively control smart devices.
Smart Images

Figure CN117404996B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart homes, and more particularly to a switch status detector, detection method, and detection system. Background Technology
[0002] Door and window magnetic sensors are very important devices in smart homes. They are usually divided into two parts, which are installed on the fixed part and the moving part of the door or window, respectively. When the two parts are far apart, the sensor detects that the door or window is "open" and when the two parts are close together, the sensor detects that the door or window is "closed". By using these two sensing states in conjunction with other smart devices, a lot of automated control can be achieved.
[0003] Existing magnetic sensors for doors and windows have too little ability to distinguish between the "open" and "closed" states. When doors and windows are slightly ajar, the sensors repeatedly switch between "open" and "closed," causing connected smart devices to repeatedly switch their operating states and potentially damaging them. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a switch state detector, a detection method, and a detection system.
[0005] According to a first aspect of the present invention, a switch state detector is provided, comprising: a magnetic component for generating a magnetic field;
[0006] A sensing component, disposed independently of the magnetic component, and capable of changing position relative to the magnetic component; and the sensing component is used to detect magnetic induction intensity and is configured as follows:
[0007] When the distance parameter between the magnetic component and the sensing component gradually decreases to a first interval ending at a first threshold, a first message is sent out; the first message is used to indicate that the target associated with the sensing component is in a closed state; when the distance parameter between the magnetic component and the sensing component gradually increases to a second interval starting at a second threshold, a second message is sent out; the second message is used to indicate that the target associated with the sensing component is in an open state; the distance parameter is related to the magnetic induction intensity;
[0008] Wherein, the first interval and the second interval do not overlap, and the difference between the second threshold and the first threshold is greater than or equal to 1mm, so that there is a hysteresis interval of at least 1mm between the first interval and the second interval. When the distance parameter reaches the hysteresis interval, the sensing state of the sensing component does not change.
[0009] According to another aspect of the present invention, a switch state detection method is also provided, applied to a switch state detector; characterized in that the detection method includes:
[0010] Detecting a distance parameter between a magnetic component and a sensing component; the distance parameter indicates the distance between the magnetic component and the sensing component;
[0011] If the distance parameter gradually decreases to a first interval ending at a first threshold, a first message is sent out; the first message is used to indicate that the target associated with the sensing component is in a closed state.
[0012] If the distance parameter gradually increases to a second interval starting from the second threshold, a second message is sent out; the second message is used to indicate that the target associated with the sensing component is in an open state.
[0013] Wherein, the first interval and the second interval do not overlap, and the difference between the second threshold and the first threshold is greater than or equal to 1mm, so that there is a hysteresis interval of at least 1mm between the first interval and the second interval. When the distance parameter reaches the hysteresis interval, the sensing state of the sensing component does not change.
[0014] According to another aspect of the present invention, a switch state detection system is also provided, characterized in that it includes a smart terminal, a gateway, and the aforementioned switch state detector and / or a switch state detector capable of performing the aforementioned detection method; the switch state detector is capable of communicating with the gateway after joining the network where the gateway is located; the smart terminal is capable of communicating with the gateway directly or indirectly;
[0015] The switch status detector is used to: report detection events to the gateway; the detection events are used to indicate action events or status events of a target object associated with the sensing component; the action events include the target object being turned on or off, and the status events include the target object being in an open state or a closed state;
[0016] The gateway is used to: feed back the detected event to the smart terminal, and / or, control the execution of the trigger result associated with the switch state detector based on a trigger rule;
[0017] The smart terminal is used to: acquire user-defined trigger rules and send the trigger rules to the gateway, so that: the gateway receives and stores the trigger rules; the trigger rules define a trigger relationship between at least one trigger condition and at least one trigger result, the trigger condition being a detection event of the switch state detector, and the trigger result being an executable function of a smart device within the network where the gateway is located.
[0018] The beneficial effects of the present invention include at least the following:
[0019] (1) The present invention divides the distance parameter between the magnetic component and the sensing component into at least two intervals, wherein the first interval is from 0 to a first threshold, and the second interval is from the second threshold to infinity. The switch state detector provided by the present invention sets the difference between the first threshold and the second threshold to be greater than or equal to 1 mm, so that there is a hysteresis interval of at least 1 mm between the first interval and the second interval. When the distance parameter enters the hysteresis interval, the sensing state of the sensing component does not change and maintains the previous sensing state. Setting a hysteresis interval greater than or equal to 1 mm can prevent the sensing state of the sensing component from repeatedly switching when the distance parameter reaches a certain critical value, thereby protecting the smart device connected to the sensing component from repeatedly switching its working state.
[0020] (2) The sensing component is equipped with a detection switch, which can be triggered to send a third message to the outside world, thereby controlling the working state of the external device paired with the sensing component. This makes the switch status detector provided by the present invention both a sensor for detecting the opening and closing of doors and windows to passively control smart devices, and a small wireless switch to actively control smart devices, thus improving its practicality.
[0021] (3) Configure the wireless transmission module to enter a low-power mode when it detects that the detection switch has been continuously triggered for a duration longer than a specified duration. This prevents the detection switch from being accidentally triggered during transportation, which would cause the wireless transmission module to remain in a constantly awake state.
[0022] (4) The switch state detector provided by the present invention has a first housing that can be pressed to trigger the detection switch, making the first housing equivalent to a large button, greatly increasing the operable area, improving the pressing feel, and enabling blind operation without having to deliberately find the button position.
[0023] (5) A sealing element is provided inside the sensing component. The sealing element has both waterproof sealing function and function of providing reset force, so that the first housing does not need to be designed with a special reset element, which simplifies the internal structure of the sensing component and helps to reduce the volume. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a schematic diagram of a switch state detection system according to an embodiment of the present invention;
[0026] Figure 2This is a schematic flowchart of a switch state detection method according to an embodiment of the present invention;
[0027] Figure 3 This is a schematic diagram of a switch state detection system according to an embodiment of the present invention;
[0028] Figure 4 This is an exploded view of an embodiment of the present invention;
[0029] Figure 5 This is a half-sectional view of a sensing component according to an embodiment of the present invention;
[0030] Figure 6 This is a half-sectional view of a sensing component according to an embodiment of the present invention in a pressed state;
[0031] Figure 7 This is a schematic diagram of the sensing component structure according to an embodiment of the present invention;
[0032] Figure 8 This is a schematic diagram of the sensing component structure according to an embodiment of the present invention;
[0033] Figure 9 This is a bottom view of the first housing according to an embodiment of the present invention;
[0034] Figure 10 This is a schematic diagram of a circuit board mounting according to an embodiment of the present invention;
[0035] Figure 11 This is a schematic diagram of the second shell structure according to an embodiment of the present invention;
[0036] Figure 12 This is a schematic diagram of the circuit board mounting direction according to an embodiment of the present invention;
[0037] Figure 13 This is a schematic diagram of a structure according to an embodiment of the present invention;
[0038] Figure 14 This is an exploded view of a magnetic component according to an embodiment of the present invention;
[0039] Figure 15 This is a cross-sectional view of an embodiment of the present invention;
[0040] Figure 16 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention.
[0041] Figure label:
[0042] 101. Switch status detector; 102. Gateway; 103. Smart device; 104. Smart terminal; 105. Electronic device; 1051. Processor; 1052. Memory; 1053. Bus; 100. Sensing component; 1. Magnetic induction module; 2. Wireless transmission module; 21. Processing chip; 3. Detection switch; 4. Housing; 41. First housing; 411. First snap-fit; 412. Second snap-fit; 413. Third mark; 414. First receiving groove; 415. Sealing ring limiting part; 4151. Sealing ring limiting bone; 416. Sealing ring placement area; 417. Circuit board snap-fit; 418. Light guide part; 4181. Light blocking part; 419. Clearance part; 42. Second housing; 421. First fastening position; 422. Second fastening position; 423. 424. Pry bar; 425. Bottom shell; 426. Sealing part; 427. Battery compartment; 4271. First battery rib; 4272. Second battery rib; 4273. Third battery rib; 43. First mark; 44. First side; 45. First surface; 5. Circuit board; 51. Power detection module; 52. Light-emitting module; 53. Circuit board snap-fit position; 54. Button battery; 55. Power supply module; 551. Electrode connection part; 5511. Positive electrode spring; 5512. Negative electrode spring; 6. Sealing element; 7. Elastic support element; 8. Magnetic component; 81. Permanent magnet; 82. Third shell; 821. Second surface; 83. Second mark; 84. Magnet mounting shell; 841. Clamping part; 85. Top cover; 9. Double-sided adhesive; 91. Double-sided adhesive pasting part. Detailed Implementation
[0043] In the description of this invention, the terms "inner", "outer", "longitudinal", "lateral", "upper", "lower", "top", "bottom", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and do not require that this invention must be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0044] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
[0045] In the description of this invention, unless otherwise explicitly specified and limited, the term "connection" and other such terms should be interpreted broadly. For example, it can refer to a fixed connection, a detachable connection, or an integral connection; it can refer to a mechanical connection, an electrical connection, or a connection that allows communication between the components; it can refer to a direct connection or an indirect connection through an intermediate medium; it can refer to the internal communication between two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0047] Please refer to Figure 1 and Figure 3 This disclosure provides a switch status detection system, which may include a switch status detector 101, a gateway 102, and a smart terminal 104. The switch status detector 101 can communicate with the gateway 102 after joining the network where the gateway 102 is located; the smart terminal 104 can communicate with the gateway directly or indirectly.
[0048] The switch status detector 101 is used to: report detection events to the gateway 102; the detection events are used to indicate action events or status events of a target object associated with the switch status detector 101; the action events include the target object being turned on or off, and the status events include the target object being in an open state or a closed state. Here, the action event can be understood as an event triggered based on a certain action, such as a sensor being triggered; the status event can be understood as an event that automatically generates after reaching a certain state, such as an event that automatically generates in response to a certain time interval. Figure 4As shown, the switch state detector 101 comprises two parts: a sensing component 100, which internally houses a magnetic induction module 1 capable of sensing magnetic field strength, such as a Hall switch or reed switch; and a magnetic component 8, which internally houses a permanent magnet 81. In use, these two parts are respectively installed on the fixed and movable parts of a door or window. The opening and closing of the door or window causes a change in the distance between these two parts, resulting in a change in the magnetic field strength sensed by the sensing component 100. The sensing component 100 determines the distance between itself and the magnetic component 8 based on the magnetic field strength, thereby determining the opening or closing state of the door or window. In a specific embodiment, when the distance between the sensing component 100 and the magnetic component 8 is less than a first threshold, the target object is determined to be in a closed state; when the distance between the sensing component 100 and the magnetic component 8 is greater than a second threshold, the target object is determined to be in an open state.
[0049] The switch status detector 101 can be a door / window opening / closing sensor capable of communicating with the outside world via wireless communication. This wireless communication can be any method such as radio frequency, Bluetooth, or Wi-Fi; in this embodiment, it is primarily described using Bluetooth. Simultaneously, the sensing component 100 is equipped with a detection switch 3, which can be pressed to send out wireless signals, thereby controlling the operating state of a smart device 103 located on the same network as the gateway 102. This allows the switch status detector 101 to be used as a small wireless switch.
[0050] The gateway 102 is used to: feed back the detected event to the smart terminal 104, and / or, control the execution of the trigger result associated with the switch state detector 101 based on a trigger rule. The gateway 102 can be a gateway to any network, such as a Wi-Fi network, a Zigbee network, or a Bluetooth network; in the following description, the focus is primarily on Bluetooth. In a further embodiment, the gateway 102 can access the Internet, thereby enabling data exchange with the smart terminal 104 connected to the Internet. Furthermore, the gateway 102 can be a dedicated gateway device, or it can be other devices with gateway functionality, such as a speaker, display device, computer, host, etc., with gateway functionality.
[0051] The smart terminal 104 is used to: acquire user-defined trigger rules and send the trigger rules to the gateway 102, so that: the gateway 102 receives and stores the trigger rules; the trigger rules define a trigger relationship between at least one trigger condition and at least one trigger result, the trigger condition being a detection event of the switch state detector 101, and the trigger result being an executable function of a smart device within the network where the gateway 102 is located. The smart terminal 104 can be any device or combination of devices with data processing and external communication capabilities, such as a mobile phone, computer, tablet computer, in-vehicle system, etc. The trigger rules can be a control method between the switch state detector 101 and the smart device 103 set by the smart terminal 104 through an APP.
[0052] The intelligent device 103 can be any controllable device or combination of devices capable of on / off control, and it is equipped with a processing module or other circuitry with data processing capabilities, as well as a wireless communication module or other circuitry with wireless communication capabilities. In one example, it can be a wall switch. In other examples, the intelligent device 103 may be an air conditioner, a lamp, a curtain motor, a robot vacuum cleaner, or other connected devices. The controlled result of the intelligent device 103 can include the opening and closing of the device, the on / off state of the corresponding switch, and specific functions of the device, such as a controlled entertainment device playing specific music or videos, or adjusting the operating mode and temperature of an air conditioner. The communication method of the intelligent device 103 can include at least one of the following: radio frequency, Bluetooth, Wi-Fi, mobile network, etc.; in the following description, the description is mainly based on Bluetooth.
[0053] In some solutions, the detection system may also include a server. Both the gateway 102 and the smart terminal 104 can interact with the server. Data interaction between the gateway 102 and the smart terminal 104 can be implemented based on the server. In some examples, the server can mainly play the role of data forwarding, and in some examples, the server can also play the role of data storage and processing.
[0054] In one implementation, if gateway 102 is a Bluetooth gateway and the corresponding network is a Bluetooth network, switch status detector 101 can join the Bluetooth network after network configuration and communicate with gateway 102 via Bluetooth signals. Simultaneously, switch status detector 101 can also pair with smart device 103 via Bluetooth signals. Therefore, switch status detector 101 can send messages to gateway 102 or smart device 103 based on Bluetooth signals. Furthermore, smart device 103 can also join the Bluetooth network after network configuration and communicate with gateway 102 via Bluetooth signals. Therefore, data interaction between switch status detector 101 and smart terminal 104, and data interaction between smart device 103 and smart terminal 104, can all be based on forwarding by gateway 102.
[0055] In some embodiments, the smart terminal 104 can define the triggering condition as simultaneously satisfying a state event of the switch state detector 101 and a detection event of a smart detection device. For example, the smart detection device can be a human body sensor, which is communicatively connected to the gateway 102. The state event can be an off state or an on state. In a specific embodiment, the smart device is an air conditioner. When the state of the switch state detector 101 is off and the detection event of the human body sensor is "no one is present," the air conditioner executes a shutdown command. This system can realize energy-saving control of smart homes.
[0056] The switch state detector 101 in some embodiments of the present invention will be described in detail below, but the scope of the embodiments of the present invention may not be limited thereto.
[0057] based on Figures 1-16 The switch state detector 101 proposed in this disclosure is specifically illustrated. Please refer to... Figure 4 and Figure 15 As shown, the switch state detector 101 includes a magnetic component 8 and a sensing component 100. The magnetic component 8 generates a magnetic field; the sensing component 100 is disposed independently of the magnetic component 8 and can change position relative to the magnetic component 8; and the sensing component 100 is used to detect the magnetic induction intensity, such as... Figure 2As shown, and configured to: when the distance parameter between the magnetic component 8 and the sensing component 100 gradually decreases to a first interval ending at a first threshold, a first message is sent to the outside; the first message is used to indicate that the target associated with the sensing component 100 is in a closed state; when the distance parameter between the magnetic component 8 and the sensing component 100 gradually increases to a second interval starting at a second threshold, a second message is sent to the outside; the second message is used to indicate that the target associated with the sensing component 100 is in an open state; the distance parameter is related to the magnetic induction intensity; wherein, the first interval and the second interval do not overlap, and the difference between the second threshold and the first threshold is greater than or equal to 1 mm.
[0058] The magnetic component 8 can be understood as a magnetic component, which may be equipped with a permanent magnet or an electromagnetic device capable of generating a stable magnetic field. The sensing component 100 and the magnetic component 8 are respectively disposed on a movable target object and a fixed surface that cooperates with the target object. The target object can move in response to a control, causing a change in the position between the magnetic component 8 and the sensing component 100. For example, the target object may be a movable object such as a door, window, or drawer. The sensing component 100 can sense changes in magnetic induction intensity. When the distance between the magnetic component 8 and the sensing component 100 gradually decreases, the magnetic induction intensity sensed by the sensing component 100 gradually increases; conversely, when the distance between the magnetic component 8 and the sensing component 100 gradually increases, the magnetic induction intensity sensed by the sensing component 100 gradually decreases. The sensing component 100 obtains the distance information between the magnetic component 8 and the sensing component 100 by detecting the magnetic induction intensity. The distance parameter can be understood as the distance value between the magnetic component 8 and the sensing component 100. The first interval ending at the first threshold and the second interval starting at the second threshold can be understood as dividing the distance parameter between the magnetic component 8 and the sensing component 100 into at least two intervals, where the first interval is from 0 to the first threshold, and the second interval is from the second threshold to infinity. The relationship between the distance parameter and the magnetic induction intensity can be understood as follows: when the distance parameter changes, the magnetic induction intensity sensed by the sensing module also changes accordingly. The first threshold and the second threshold each correspond to a magnetic induction intensity, and the sensing component 100 determines the "open" and "closed" state of the target object by sensing the magnetic induction intensities corresponding to the first and second thresholds.
[0059] Existing switch state detectors have insufficient differentiation between the sensing conditions of "on" and "off" states. This leads to repeated switching of the sensing state of the sensing component 100 between "on" and "off" when the distance between the magnetic component 8 and the sensing component 100 reaches a critical value. This is because the magnetic induction intensity generated by the magnetic component 8 fluctuates due to environmental influences, and the magnetic induction intensity detected by the magnetic induction module 1 in the sensing component 100 also fluctuates. This causes the sensing state of the sensing component 100 to repeatedly switch between "on" and "off," resulting in repeated switching of the operating state of the connected smart device 103, potentially damaging the controlled smart device. The switch state detector 101 disclosed by the applicant sets the difference between a first threshold and a second threshold to be greater than or equal to 1 mm, creating a hysteresis interval of at least 1 mm between the first and second intervals. When the distance parameter reaches this hysteresis interval, the sensing state of the sensing component 100 remains unchanged, maintaining the previous sensing state. Setting a hysteresis interval greater than or equal to 1 mm effectively prevents the sensing state of the sensing component 100 from repeatedly switching when the distance parameter reaches a certain critical value, thereby protecting the smart device 103 connected to the sensing component 100 from repeatedly switching its operating state. The applicant discovered through experiments that when the hysteresis interval is less than 1 mm, fluctuations in the magnetic induction intensity sensed by the magnetic induction module 1 may exceed the hysteresis interval, causing repeated switching of the sensing state of the sensing component 100. Therefore, the hysteresis interval needs to be set to be greater than 1 mm to ensure the stability of the sensing state. In a specific embodiment, the first threshold is set to 18 mm, the second threshold is set to 23 mm, and the first interval is [0, 18] mm, the second interval is [23, +∞] mm, and the hysteresis interval is [18, 23] mm. Setting a hysteresis interval of 5 mm can more effectively improve the stability of the sensing state. Of course, as long as the difference between the first threshold and the second threshold is greater than or equal to 1 mm, it is within the protection scope of this embodiment.
[0060] Furthermore, the sensing component 100 is further configured to: send a first message when the distance parameter changes from the second interval to the first interval in response to the position change between the magnetic component 8 and the sensing component 100; and send a second message when the distance parameter changes from the first interval to the second interval in response to the position change between the magnetic component 8 and the sensing component 100. Due to the existence of the hysteresis interval, the distance parameter may change from the hysteresis interval to the first interval or the second interval in response to the positional changes of the magnetic component 8 and the sensing component 100. In this case, it is necessary to determine whether the interval before entering the hysteresis interval is the same as the interval after entering the hysteresis interval. If they are the same, no message is sent; if they are different, the corresponding message is sent. In one specific embodiment, the distance parameter gradually decreases, enters the first interval from the second interval via the hysteresis interval, and the sensing component 100 sends the first message. In another case, the distance parameter gradually decreases, enters the hysteresis interval from the second interval, and then gradually increases, returning to the second interval from the hysteresis interval. In this case, the sensing component 100 does not send a message, thereby effectively preventing duplicate message transmission.
[0061] In some embodiments, such as Figure 3 As shown, the sensing component 100 includes a magnetic induction module 1 and a wireless transmission module 2. The magnetic induction module 1 senses the magnetic induction intensity and generates a level signal. The wireless transmission module 2 is electrically connected to the magnetic induction module 1 and is configured to send a first message or a second message when a level signal transition is detected. The magnetic induction module 1 uses a level-transition type Hall switch or a magnetic switch sensor, meaning the level signal emitted by the magnetic induction module 1 transitions according to changes in the magnetic induction intensity. The wireless transmission module 2 may also include other devices or combinations of devices for digital sampling, filtering, or logic operations on the signal, enabling it to detect the level signal output by the magnetic induction module 1. In one specific embodiment, the wireless transmission module 2 includes a processing chip. The Hall switch is electrically connected to a pin of the processing chip, and the processing chip determines the operating state of the magnetic induction module 1 based on the level signal of that pin.
[0062] Furthermore, the level signal includes a first level signal and a second level signal opposite to the first level signal; when the distance parameter between the sensing component 100 and the magnetic component 8 is in a first interval, the magnetic sensing module 1 continuously outputs the first level signal; when the distance parameter between the sensing component 100 and the magnetic component 8 is in a second interval, the magnetic sensing module 1 continuously outputs the second level signal; and when the distance parameter moves from the first interval to the second interval, the level signal output by the magnetic sensing module 1 changes from the first level signal to the second level signal, and the wireless transmitting module 2 sends a second message; when the distance parameter moves from the second interval to the first interval, the level signal output by the magnetic sensing module 1 changes from the second level signal to the first level signal, and the wireless transmitting module 2 sends a first message. The second level signal being opposite to the first level signal can be understood as the first level signal being high and the second level signal being low, or the first level signal being low and the second level signal being high. The magnetic induction module 1 used in this embodiment is a KTM1901XD magnetic switch sensor. This is a magnetic switch sensor that integrates tunneling magnetoresistive technology and CMOS technology, featuring high precision, high speed, low power consumption, and high sensitivity. It supports the detection of both positive and negative magnetic fields. When the absolute value of the magnetic field strength is greater than 9 Gauss, the magnetic switch sensor outputs a low level; when the absolute value of the magnetic field strength is less than 6 Gauss, the magnetic switch sensor outputs a high level. That is, for the sensing component 100 using the KTM1901XD magnetic switch sensor, the magnetic induction intensity range corresponding to the first interval is [9, +∞] Gauss, and the magnetic induction intensity range corresponding to the second interval is [0, 6] Gauss. When the magnetic flux density detected by the magnetic switch sensor increases from the range of [0, 6] Gauss to the range of [9, +∞] Gauss, the magnetic switch sensor changes its output level from high to low. When the magnetic flux density detected by the magnetic switch sensor decreases from the range of [9, +∞] Gauss to the range of [0, 6] Gauss, the magnetic switch sensor changes its output level from low to high. The sensing component 100 sends a corresponding message based on the level change of the magnetic switch sensor. The beneficial effect is that, compared with a magnetic induction module that continuously detects the magnetic field strength, the magnetic induction module 1 in this embodiment uses a magnetic switch sensor with level switching function. When the magnetic flux density reaches the corresponding threshold, a level switch occurs, which can effectively reduce the processing frequency of the electrical signal emitted by the magnetic induction module 1 by the processing chip, thereby reducing power consumption.
[0063] Furthermore, the level signal includes a first level signal and a second level signal opposite to the first level signal; when the distance parameter between the sensing component 100 and the magnetic component 8 is in the first interval, the magnetic sensing module 1 continuously outputs the first level signal; when the distance parameter between the sensing component 100 and the magnetic component 8 is in the second interval, the magnetic sensing module 1 continuously outputs the second level signal; and when the distance parameter moves from the first interval through the third interval into the second interval, the level signal output by the magnetic sensing module 1 switches to the second level signal, and the wireless transmission module 2 sends a second message to the outside; when the distance parameter moves from the second interval through the third interval into the first interval, the level signal output by the magnetic sensing module 1 switches to the first level signal, and the wireless transmission module 2 sends a first message to the outside; the third interval is the interval greater than the first threshold and less than the second threshold. The third interval is the hysteresis interval mentioned above. When the distance parameter is in the third interval, the level signal output by the magnetic sensing module 1 does not change, and therefore the wireless transmission module 2 does not send messages to the outside, in order to prevent the sensing state of the sensing component 100 from repeatedly switching between "on" and "off". Due to the existence of the third interval, the distance parameter may change from the third interval to the first or second interval in response to positional changes of the magnetic component 8 and the sensing component 100. In this case, it is necessary to determine whether the interval before entering the third interval is the same as the interval after leaving the third interval. If they are the same, the output level of the magnetic induction module 1 will not change; if they are different, the output level of the magnetic induction module 1 will change, and the wireless transmission module 2 will then send the corresponding message. This scheme can effectively prevent the wireless transmission module 2 from sending duplicate messages.
[0064] In some embodiments, the sensing component 100 includes a magnetic induction module 1 and a wireless transmission module 2. The magnetic induction module 1 senses the magnetic induction intensity and generates a voltage signal. The wireless transmission module 2 is electrically connected to the magnetic induction module 1 to receive the voltage signal, compares the voltage signal with a reference voltage, and then sends a first message or a second message based on the comparison result. The magnetic induction module 1 is a Hall sensor, capable of detecting nearby magnetic induction intensity and generating a voltage signal corresponding to the current magnetic induction intensity. Compared to the magnetic switch sensor described above, the Hall sensor outputs a voltage signal instead of a level signal, and its output voltage signal can change in real time according to changes in magnetic induction intensity. In a specific embodiment, the Hall sensor is configured to continuously detect magnetic induction intensity and send continuous voltage signals. The wireless transmission module 2 receives the voltage signal and determines the interval of the distance parameter based on the voltage signal. The advantage of using a Hall sensor in the magnetic induction module 1 is that the first and second thresholds can be adjusted to arbitrary values, i.e., the first and second intervals can be flexibly changed. Since the installation method of switch status sensors is mostly to stick them to the mounting surface with double-sided tape 9, this installation method is a one-time installation with poor adjustability. If the initial installation position is not good, it may lead to poor sensing effect, sensing errors, or insensitivity. However, the magnetic induction module 1 of this embodiment uses a Hall sensor that continuously detects the magnetic induction intensity. The user can adjust the first threshold and the second threshold through the smart terminal 104 to adjust the switch status detector 101 to a suitable sensing distance for optimal sensing.
[0065] Furthermore, the reference voltage includes a first reference voltage value and a second reference voltage value; the wireless transmission module 2 is configured to: transmit a first message when the voltage signal gradually decreases to less than or equal to the first reference voltage value; the first reference voltage value represents a first threshold value indicating the distance between the sensing component 100 and the magnetic component 8; and transmit a second message when the voltage signal gradually increases to greater than or equal to the second reference voltage value; the second reference voltage value represents a second threshold value indicating the distance between the sensing component 100 and the magnetic component 8. The voltage signal emitted by the magnetic induction module 1 changes with the change in magnetic induction intensity, and the first reference voltage value is the voltage value emitted by the magnetic induction module 1 when the magnetic induction intensity reaches the first threshold value, and the second reference voltage value is the voltage value emitted by the magnetic induction module 1 when the magnetic induction intensity reaches the second threshold value. When the voltage signal is equal to the first reference voltage value, the wireless transmission module 2 determines that the distance parameter has reached the first threshold value; when the voltage signal is equal to the second reference voltage value, the wireless transmission module 2 determines that the distance parameter has reached the second threshold value.
[0066] Furthermore, the first threshold includes multiple first preset thresholds and is configured to be switchable among multiple first preset thresholds; the second threshold includes multiple second preset thresholds and is configured to be switchable among multiple second preset thresholds. The first and second preset thresholds are stored in a smart terminal 104, which can be a mobile phone, tablet, computer, or other device. Users select a suitable threshold through an app. In some embodiments, the smart terminal 104 provides multiple threshold combination recommendations, i.e., multiple recommended combinations of first and second preset thresholds, to prevent users from being unable to find a suitable value when manually adjusting the threshold size, thus affecting usability.
[0067] In some embodiments, the wireless transmission module 2 includes a packet queue. The first and second messages are stored in the packet queue and then sent out sequentially according to their generation time. When all messages in the packet queue have been sent, if the last sent message does not correspond to the judgment state, a new message corresponding to the judgment state is sent. In this embodiment, the wireless transmission module 2 generates the first or second message in response to the change in the electrical signal of the magnetic induction module 1. After the first or second message is generated, it is packaged and stored in the packet queue for transmission. Then, it is sent out sequentially from the packet queue. The packet queue can store up to 8 messages, and the packet transmission speed of the packet queue is one message per second. The message is repeated 20 times within one second to prevent the receiving end from not receiving the packet due to electromagnetic interference. When the message generation speed is greater than the packet transmission speed, the packet queue may be full and new messages may be blocked from entering the packet queue, resulting in the loss of new messages and a situation where the transmitted door and window opening and closing information does not correspond to the actual door and window opening and closing information. To address this issue, this embodiment checks whether the last sent message corresponds to the state of the magnetic induction module 1 after the packet sending queue has finished sending messages. Specifically, it checks whether the content of the last sent message matches the door / window opening / closing information. If they don't match, a new message corresponding to the current state is sent. If they match, the message sending ends, thus preventing inconsistencies between the sensing state and the sent message content due to packet loss. Furthermore, when the packet sending queue is full, new messages are discarded. During the outward transmission of messages, empty queues gradually form. If a second new message is generated at this time, it will enter the queue. This could result in the second new message being identical to the message preceding it, causing the packet sending queue to send the same message. To prevent this, before adding a message to the packet sending queue, it checks whether the last message in the queue is identical to the new message. If they are different, the message is allowed to join the queue; otherwise, it is not. This prevents both inconsistencies between the sensing state and the sent message content due to packet loss and avoids the repeated sending of the same message.
[0068] In some embodiments, the sensing component 100 is further configured to: send a fourth message to the outside at a first specified time after the first message or the second message has been sent, the fourth message being used to indicate whether the current state of the target object is closed or open. In this embodiment, messages caused by events are classified as event messages, and messages generated automatically are classified as status messages. An event message can be understood as a message generated in response to a trigger signal, such as the first message and the second message; a status message can be understood as a message generated automatically in response to a certain time interval, used to indicate the current state of the sensing component 100. In a specific embodiment, the first specified time is set to 4 seconds. Four seconds after the first message or the second message has been sent, a status message is sent to the outside. The content of the status message includes at least the opening and closing information of the magnetic induction module 1, which improves the stability of sensing the opening and closing state of doors and windows. In addition, the sensing component 100 also includes a button battery 54 and a power detection module 51, which are electrically connected to the processing chip in the wireless transmission module 2. The button battery 54 is used to provide power to each module, and the power detection module 51 can detect the power of the button battery 54. The status message also includes battery power information to provide the user with battery power information.
[0069] Furthermore, the sensing component 100 also includes a light-emitting module 52, which is electrically connected to the wireless transmission module 2. The light-emitting module 52 changes its light emission frequency and / or light emission color in response to the electrical signal from the magnetic induction module 1 or the detection switch 3, in order to indicate the working state of the switch state detector 101.
[0070] In some embodiments, the wireless transmission module 2 is configured to enter a low-power mode within a second specified time period after the first message or the second message has been sent.
[0071] The inventors of this application discovered that the existing switch state detector 101 consumes a relatively high amount of power during use. To reduce the power consumption of the switch state detector 101, the inventors, through research, found that the wireless transmission module 2 of the switch state detector 101 has a designated state. Targeted configuration of the operating state of the wireless transmission module 2 based on this designated state can effectively reduce the power consumption of the wireless transmission module 2. Specifically:
[0072] When the wireless transmission module 2 receives a wake-up command in a low-power state, it can enter a normal working state in response to the wake-up command and send messages to the outside in the normal working state according to the wake-up command. For example, the wake-up command may be generated when the magnetic induction intensity sensed by the magnetic induction module 1 reaches a first threshold or a second threshold. In this embodiment, the power consumption of the wireless transmission module 2 in the low-power working state is less than that in the normal working state, so that the wireless transmission module 2 is in a relatively low-power state when it is not performing packet transmission tasks, and only switches to the normal working state to transmit packets when it is woken up. Compared with the switch state detector 101 in the prior art, which is always in the packet transmission state, the power consumption of the switch state detector 101 in this embodiment is lower.
[0073] Furthermore, the wireless transmission module 2 is configured to: in low-power mode, be woken up in response to a level signal sent by the magnetic induction module 1; the level signal includes a high level or a low level; when the wireless transmission module 2 is woken up by a high level, the next wake-up condition is set to a low level wake-up; when the wireless transmission module 2 is woken up by a low level, the next wake-up condition is set to a high level wake-up. Here, wake-up can be understood as transitioning from the low-power mode to a normal operating mode. In this embodiment, the magnetic induction module 1 is the magnetic switch sensor, capable of outputting a level signal. The wireless transmission module 2 includes a processing chip, one pin of which is electrically connected to the magnetic induction module 1 and capable of detecting the level signal of that pin. In other embodiments, the magnetic induction module 1 may also employ a Hall sensor, capable of outputting a voltage signal, and the processing chip is configured to detect the voltage signal of that pin. The following description is based on an embodiment where the processing chip can detect the level signal. The applicant has found that the processing chip can be a chip that does not support edge wake-up, thereby reducing chip size and cost; edge wake-up can be understood as being woken up in response to a level transition of a pin. In one specific embodiment, the processing chip is a TLSR8251 chip. This chip does not support edge wake-up but has the advantages of small size, low cost, and low power consumption, making it suitable for the switch state detector 101. Compared with the processing chips used in existing switch state detectors 101, this chip can save costs and reduce the size of the sensing component 100.
[0074] Because the processing chip used lacks edge wake-up functionality, a special algorithm is required for wake-up. A typical wireless switch only needs a low-level wake-up setting, as the wireless switch uses detection switch 3 as its sensing module. When detection switch 3 is pressed, it outputs a low-level signal; when it is released, it outputs a high-level signal. Furthermore, detection switch 3 has a self-reset function, automatically releasing after being pressed. Therefore, the wake-up condition only needs to be set to a low-level wake-up. The high-level signal of detection switch 3 only exists for a brief period after being pressed and will not remain in a high-level pressed state for an extended period. However, the switch state detector 101 cannot be set to a single level signal for wake-up during use, because doors and windows may be in a long-term open or closed state. That is, the level signal of the magnetic induction module 1 may be in a long-term high or low state. Therefore, corresponding wake-up conditions need to be set based on the current state of the magnetic induction module 1. Therefore, the wake-up condition for the wireless transmission module 2 is set as follows: when the wireless transmission module 2 is woken up by a high-level signal, the next wake-up condition is set to a low-level signal; when the wireless transmission module 2 is woken up by a low-level signal, the next wake-up condition is set to a high-level signal.
[0075] In some embodiments, the sensing component 100 is further configured to detect an external pressing operation and generate a third message; the third message is used to control the operating state of an external device paired with the sensing component 100. The ability of the sensing component 100 to detect an external pressing operation and generate a third message can be understood as the sensing component 100 being provided with, for example, a detection switch 3, a pressure sensor, a distance sensor, or other electronic components that can cause a change in the output electrical signal in response to the pressing operation. The wireless transmission module 2 is electrically connected to this electronic component. When the sensing component 100 is subjected to the pressing operation, the electrical signal output by the electronic component changes, and the wireless transmission module 2 responds to this change by transmitting the third message. The third message is used to control the operating state of the external device. As explained above, the switch state detector 101 provided by this invention is connected to the gateway 102 via Bluetooth. The switch state detector 101 can send messages to the gateway 102 based on Bluetooth signals, and can also send messages to the smart device 103 based on Bluetooth signals. Furthermore, the smart device 103 can also join the Bluetooth network after network configuration and communicate with the gateway 102 via Bluetooth signals. Consequently, data interaction between the switch status detector 101 and the smart terminal 104, as well as between the smart device 103 and the smart terminal 104, can all be based on forwarding by the gateway 102. The smart device 103 switches its operating state in response to a third message; the specific control method can be set on the smart terminal 104 via an app. This scheme allows the switch status detector 101 to be used as a small wireless switch.
[0076] Furthermore, the sensing component 100 also includes a housing 4 and a detection switch 3. The detection switch 3 is coupled to the housing 4 and can be triggered by pressing the housing 4, thereby generating a trigger signal. The detection switch 3 is electrically connected to the wireless transmitting module 2, so that the wireless transmitting module 2 transmits the third message based on the trigger signal. The coupling of the detection switch 3 to the housing 4 can be understood as a specific connection between the detection switch 3 and the housing 4, allowing the triggering part of the detection switch 3 to move with a portion of the housing 4, so that the detection switch 3 is triggered when the housing 4 is pressed. This specific connection can be abutment, fixation, clamping, or non-contact connection, etc.
[0077] In some embodiments, the wireless transmission module 2 is configured to enter a low-power mode within a third specified time period after transmitting the first, second, or third message, and to be woken up in response to the trigger signal in the low-power mode. The wireless transmission module 2 includes the processing chip, and the detection switch 3 is connected to a pin of the processing chip. When the detection switch 3 is triggered, it outputs a low-level signal. The processing chip is configured to be woken up when it detects a low-level signal output from the pin connected to the detection switch 3.
[0078] Furthermore, the wireless transmission module 2 is also configured to: if the duration of continuous triggering of the detection switch 3 exceeds a specified duration, enter a low-power mode and set the next wake-up condition to the de-triggered state of the detection switch 3. Since the sensing component 100 is configured to detect an external pressing operation to generate the third message, i.e., the switch state detector 101 provided in this embodiment can wirelessly control the working state of other devices, to improve the pressing feel, the pressable part of the sensing component 100 is designed to be relatively large. In some embodiments, most of the upper surface of the housing 4 can be pressed to trigger the detection switch 3. Because the pressable part of the sensing component 100 is too large, during transportation, the pressing part may be squeezed and trigger the detection switch 3, causing the wireless transmission module 2 to remain in a constantly awake state, resulting in the rapid depletion of the button battery 54. Therefore, to prevent the above situation from occurring, the wireless transmission module 2 is configured to enter a low-power mode if the duration of continuous triggering of the detection switch 3 exceeds a specified duration. In a preferred embodiment, the specified duration is greater than 8 seconds.
[0079] Furthermore, the wireless transmission module 2 is configured to: if it is detected that the wireless transmission module 2 has not sent a second message within a fourth specified time after sending the first message, it will be woken up and send a fifth message; the fifth message is used to indicate that the target object has been in an open state for a fourth specified time. When the gateway 102 receives the fifth message, it feeds back to the smart terminal 104, and the smart terminal 104 reminds the user that the target object has been in an open state for a fourth specified time, which is used to remind the user to close the door, window, drawer, or wardrobe. In a preferred embodiment, the fourth specified time is greater than or equal to 30 seconds to prevent the reminder to the user from being too frequent.
[0080] Furthermore, the wireless transmission module 2 is configured to: wake up and send a fifth message if it is detected that the wireless transmission module 2 has entered a low-power mode for a fifth specified time; the fifth message includes the status message, that is, the message content includes at least the opening and closing information of the magnetic induction module 1 and the battery power information, and may also include other status information. In a preferred embodiment, the fifth specified time is set to be greater than or equal to 20 minutes to prevent the button battery 54 from being reduced due to too high a wake-up frequency.
[0081] In some embodiments, the wireless transmission module 2 is further configured to: if the detection switch 3 is triggered again within a sixth specified time after being triggered, then send a seventh message, the seventh message representing an OTA upgrade. In a preferred embodiment, the fifth specified time is less than 1 second. This embodiment adopts a scheme of coexisting single-click and double-click messages, that is, when the detection switch 3 triggers a single-click command, the wireless transmission module 2 will immediately send the third message; when the detection switch 3 triggers a double-click command, the wireless transmission module 2 will then send the seventh message. This reduces the delay in sending the third message by the wireless transmission module 2 and improves the user experience. The content of the seventh message represents an OTA upgrade, so even if the detection switch 3 is mistakenly triggered by a double-click command, it will not affect the normal use of the on / off status sensing device.
[0082] Please refer to Figure 16 An electronic device 105 is provided, including: a processor 1051 and a memory 1052, wherein the memory 1052 is used to store executable instructions of the processor 1051;
[0083] The processor 1051 is configured to execute the methods described above by executing the executable instructions. The processor 1051 is capable of communicating with the memory 1052 via the bus 1053.
[0084] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor 1051, implements the methods described above. Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0085] In some embodiments, such as Figure 4 As shown, the sensing component 100 includes: a housing 4, a magnetic induction module 1, a wireless transmission module 2, and a detection switch 3. The magnetic induction module 1 is disposed within the housing 4 and is used to sense magnetic induction intensity. The wireless transmission module 2 is disposed within the housing 4 and is electrically connected to the magnetic induction module 1. It is configured as follows:
[0086] When the magnetic induction module 1 detects that the absolute value of the magnetic induction intensity gradually increases to a level greater than the first magnetic induction intensity, the wireless transmission module 2 sends out the first message; when the magnetic induction module 1 detects that the absolute value of the magnetic induction intensity gradually decreases to a level less than the second magnetic induction intensity, the wireless transmission module 2 sends out the second message; the first magnetic induction intensity corresponds to the magnetic induction intensity when the distance parameter reaches the first threshold, and the second magnetic induction intensity corresponds to the magnetic induction intensity when the distance parameter reaches the second threshold; the detection switch 3 is disposed in the housing 4 and electrically connected to the wireless transmission module 2. The detection switch 3 can be triggered in response to a pressing pressure, thereby the wireless transmission module 2 sends out the third message. The control methods of the magnetic induction module 1, the wireless transmission module 2, and the detection switch 3 have been described in detail above and will not be repeated here.
[0087] In some embodiments, such as Figure 5 and Figure 6As shown, the housing 4 includes a first housing 41 and a second housing 42, which are movably connected. A detection switch 3 is disposed between the first housing 41 and the second housing 42. The first housing 41 responds to the pressing pressure by generating a pressing movement, thereby reducing the distance between the first housing 41 and the second housing 42, causing either the first housing 41 or the second housing 42 to press against and trigger the detection switch 3. The movable connection between the first housing 41 and the second housing 42 can be understood as a connection between them via a kinematic pair, allowing relative movement between them. This movable connection includes pivoting connections, snap-fit connections, slider / rail connections, multi-link connections, elastic connections, or other connection methods capable of relative movement that can be implemented by those skilled in the art. The first housing 41 responding to the pressing pressure by generating a pressing movement means that when a user applies a pressing pressure to the first housing 41, due to the movable connection between the first housing 41 and the second housing 42, the first housing 41 undergoes a pressing movement relative to the second housing 42. The detection switch 3 is located between the first housing 41 and the second housing 42. This can be understood as the detection switch 3 being fixedly installed in the first housing 41 or the second housing 42 and sandwiched between the first housing 41 and the second housing 42. When the first housing 41 is pressed, the first housing 41 or the second housing 42 presses against the trigger part of the detection switch 3, triggering the detection switch 3.
[0088] The switch status detector 101 provided by this invention can detect the opening and closing status of doors and windows, and can also be used as a small wireless switch. Users can control the operation of smart home appliances by pressing the switch status detector 101. Existing switch status detectors 101 do not have the function of a wireless switch. Their button functions are limited to network pairing, resetting, etc., so the button usage frequency is very low, and the requirements for button ease of operation are not high. For aesthetic reasons, the button is designed to be very small, and the button position is relatively hidden. The switch status detector 101 itself is very small (generally 4-6cm in length), which makes the button of the existing switch status detector 101 difficult to operate. The switch status detector 101 provided by this invention has a first shell 41 that can be pressed to trigger the detection switch 3. The entire first shell 41 is equivalent to a large button, which greatly increases the operable area, improves the pressing feel, and allows blind operation without having to deliberately find the button position. This lays a feasible foundation for the use of the switch status detector 101 as a wireless switch.
[0089] In some embodiments, such as Figure 5As shown, the first housing 41 has at least one first buckle 411 protruding from it, and the second housing 42 has a first engaging position 421 at a corresponding position of the first buckle 411. The first buckle 411 engages with the first engaging position 421, such that the first engaging position 421 restricts the first buckle 411 to its limit position of movement in a first direction. In a second direction, there is an movable gap 423 between the first engaging position 421 and the first buckle 411, so that the first buckle 411 can generate relative displacement relative to the first engaging position 421 in the second direction. The first direction is the direction in which the first housing 41 moves away from the second housing 42, and the second direction is opposite to the first direction. The first engaging position 421 restricting the first buckle 411 to its limit position of movement in the first direction can be understood as the first direction... Figure 5 In the vertically upward direction, the hook of the first latch 411 engages with the lower surface of the first engagement position 421, preventing the first latch 411 from disengaging upward from the first engagement position 421. The existence of a play gap 423 between the first engagement position 421 and the first latch 411 can be understood as follows: Figure 5 and Figure 6 As shown, the second direction is the vertically downward direction in the figure. The first fastening position 421 has a movable groove below the first buckle 411. The width of the movable groove is adapted to the width of the first buckle 411, and the height of the movable groove is greater than the height of the hook of the first buckle 411, so that the hook of the first buckle 411 can slide up and down in the movable groove, so that the first buckle 411 can generate relative displacement relative to the first fastening position 421 in the second direction. In this embodiment, the first housing 41 and the second housing 42 are connected by a snap fastener. Since the first housing 41 can be pressed to produce the pressing movement, the first fastening position 421 is provided with a movable gap 423 below the first buckle 411 to provide movable space for the first buckle 411.
[0090] Furthermore, such as Figure 5 and Figure 6As shown, the first latch 411 is disposed at one end of the first housing 41, and the other end of the first housing 41 has a protruding second latch 412. The second housing 42 has a second engaging position 422 at a corresponding position of the second latch 412. The second latch 412 engages with the second engaging position 422. The first end of the first housing 41 pivots based on the second engaging position 422 in response to the pressing force, thereby generating the pressing motion. The second latch 412 and the first latch 411 are symmetrically disposed at both ends of the first housing 41. The end of the first housing 41 with the first latch 411 can be pressed and pivot based on the second engaging position 422. The detection switch 3 is disposed at the end near the first latch 411 and is triggered in response to the user's pressing operation. Therefore, the second latching position 422 acts as a pivot point. Compared with the first latching position 421, the second latching position 422 does not have an active gap 423, or the active gap 423 of the second latching position 422 is much smaller than that of the first latching position 421, so that the second latch 412 cannot slide up and down relative to the second latching position 422, preventing the second latch 412 from moving downward when the user presses the middle position of the first housing 41, thus preventing the detection switch 3 from being triggered.
[0091] Furthermore, such as Figure 13 As shown, a third mark 413 is provided on the pressed surface of the first housing 41 at the corresponding position of the detection switch 3. In a preferred embodiment, the third mark 413 is a circular silkscreen. The third mark 413 is used to indicate the optimal pressing position of the first housing 41.
[0092] Furthermore, such as Figure 5 and Figure 7 As shown, the second housing 42 has a pry bar 424 protruding outward at one end near the detection switch 3, and there is a pry gap between the pry bar 424 and the first housing 41. This allows the user to insert a flathead screwdriver into the gap between the pry bar 424 and the first housing 41 when the second housing 42 is fixedly mounted on an external mounting surface, and pry open the first housing 41 for easy battery replacement. Without the pry bar 424, the user would need to insert a flathead screwdriver between the first housing 41 and the external mounting surface to pry open the first housing 41, which could potentially damage the external mounting surface and possibly pry the sensing component 100 off the external mounting surface, causing the sensing component 100 to detach. The use of the pry bar 424 in this embodiment effectively avoids these problems.
[0093] Furthermore, such as Figure 7As shown, the first housing 41 has a first receiving groove 414 facing the second housing 42. The shape of the first receiving groove 414 matches the shape of the second housing 42, such that the first receiving groove 414 covers the second housing 42, and the second housing 42 is at least partially contained within the first receiving groove 414. The matching of the shape of the first receiving groove 414 with the shape of the second housing 42 can be understood as the first receiving groove 414 being able to contain at least the upper half of the second housing 42, its sidewalls being equidistant from the outer sidewalls of the second housing 42, and the gap between them being less than a certain value.
[0094] Furthermore, the first housing 41 and the second housing 42 can be triangular, rectangular, polygonal, circular, or racetrack-shaped cylinders. In a specific embodiment, both the first housing 41 and the second housing 42 are cuboids, and correspondingly, the first receiving groove 414 is also a cuboid. The first buckle 411 and the second buckle 412 are respectively protruding from both ends of the long side of the first receiving groove 414, and the other two ends of the first receiving groove 414 are also provided with first buckles 411, which are used to enhance the fastening force between the first housing 41 and the second housing 42 and prevent the first housing 41 from falling off.
[0095] In another embodiment, there are four first buckles 411, evenly distributed around the circumference of the first housing 41 (not shown in the figure); the four first buckles 411 are respectively engaged with the corresponding first engagement positions 421, and there is an active gap 423 between each first engagement position 421 and the corresponding first buckle 411 to realize the movable connection between the first housing 41 and the second housing 42. When the first housing 41 responds to the pressing pressure and generates the pressing movement, the first housing 41 drives at least one of the first buckles 411 to generate the relative displacement. The four first buckles 411 being engaged with the corresponding first engagement positions 421 can be understood as follows: the first receiving groove 414 of the first housing 41 is rectangular, and four first buckles 411 are respectively protruding from its four side walls; the four side walls of the second housing 42 are respectively provided with the first engagement positions 421 at the corresponding positions of the first buckles 411. Since the first latching position 421 is provided with the movable gap 423 below the first buckle 411, all four first buckles 411 can slide up and down, and all parts of the first housing 41 can generate the pressing motion. The detection switch 3 is set in the middle position of the first housing 41, so that pressing any part of the first housing 41 can trigger the detection switch 3, further improving the pressing feel of the first housing 41 and making it easier for users to operate blindly.
[0096] In another embodiment, the first latch 411 is disposed at one end of the first housing 41, and the other end of the first housing 41 is connected to the second housing 42 via a pivot (not shown in the figure). When the first housing 41 displaces in response to the pressing pressure, the first housing 41 drives the first latch 411 to produce the relative sliding. Specifically, the other end of the first housing 41 has a pivot protruding from the side wall of the first accommodating cavity, and the second housing 42 has a pivot hole at a corresponding position on the pivot. The pivot is inserted into the pivot hole so that the first housing 41 can pivot based on the pivot. The first latch 411 is disposed at the end of the first housing 41 opposite to the pivot. Since the first engaging position 421 has an movable gap 423, the first latch 411 can slide up and down relative to the first engaging position 421, providing a space for the pivoting movement of the first housing 41.
[0097] Furthermore, such as Figure 5 , Figure 7 and Figure 8 As shown, the switch status detector 101 provided by the present invention further includes a sealing element 6. The sealing element 6 is arranged around the first housing 41 and is clamped between the first housing 41 and the second housing 42 to achieve a sealed connection between the first housing 41 and the second housing 42. The sealing element 6 is made of an elastic sealing material, such as rubber or silicone, which can be compressed to achieve a sealing effect. The arrangement of the sealing element 6 around the first housing 41 can be understood as the sealing element 6 having a ring structure, the shape of which is adapted to the shape of the first receiving groove 414 of the first housing 41. Furthermore, the sealing element 6 is disposed within the first receiving groove 414, and the sealing element 6 is clamped between the inner wall of the first receiving groove 414 and the second housing 42, so that the first receiving groove 414 and the second housing 42 form a sealed cavity. The sealing member 6 is inserted into the first receiving groove 414 and fits against the top wall or side wall of the first receiving groove 414. The second housing 42 presses the sealing member 6 against the top wall or side wall of the first receiving groove 414 to achieve a sealed connection between the first housing 41 and the second housing 42.
[0098] Furthermore, such as Figure 5 and Figure 6As shown, the first housing 41 responds to the pressing pressure by generating the pressing motion, which causes elastic deformation against the sealing member 6. The sealing member 6 then generates a reset force to resist the elastic deformation. When the pressing pressure is removed, the reset force supports the first housing 41 to return to its original position. Since the switch state detector 101 needs to be very small, and the sealing member 6 serves both as a waterproof seal and as a reset force, the first housing 41 does not require a dedicated reset component, simplifying the internal structure of the sensing component 100 and contributing to a smaller size.
[0099] Furthermore, such as Figure 5 and Figure 8 As shown, the sealing element 6 is a sealing ring. The width of the cross-section of the sealing ring in a first direction is greater than the width of the cross-section in a third direction. The first direction is the direction in which the first housing 41 is away from the second housing 42, and the third direction is perpendicular to the first direction. Wherein, the first direction is... Figure 5 In the vertical direction, the width of the sealing ring cross-section is greater than its width in the third direction. This can be understood as the vertical width of the sealing ring cross-section being greater than its horizontal width. Examples include rectangular and elliptical cross-sections. In one specific embodiment, the sealing ring cross-section is an ellipse with a horizontal diameter of 1.8 mm and a vertical diameter of 3 mm. The advantage of this design is that it increases the vertical compression allowance of the sealing ring, ensuring that the first housing 41 has sufficient compression allowance to trigger the detection switch 3 when pressed. Simultaneously, increasing the vertical compression allowance reduces the reset force, making pressing the first housing 41 easier and improving the pressing feel.
[0100] In another embodiment, the first housing 41 includes a first end and a second end away from the first end. The detection switch 3 is disposed at the first end of the first housing 41. The sealing element 6 is a sealing ring, with the cross-section of the sealing ring at the position corresponding to the first end designated as a first cross-section, and the cross-section of the sealing ring at the position corresponding to the second end designated as a second cross-section. The area of the first cross-section is larger than the area of the second cross-section (not shown in the figure). The sealing ring can be understood as a ring structure with a varying cross-section, thicker near the first end and thinner near the second end, with a gradual change in cross-section thickness. This design is because, since the detection switch 3 is located at the first end, when the first end of the first housing 41 is pressed to trigger the detection switch 3, the sealing ring at the first end will be flattened under prolonged pressure, while the second end remains unpressed, maintaining its original shape. This results in a deterioration in the sealing effect of the sealing ring at the first end. Therefore, designing the sealing ring with a gradually varying thickness, thicker near the first end, makes it less prone to flattening under prolonged pressure, providing a better waterproof sealing effect during long-term use.
[0101] Furthermore, such as Figure 8 As shown, the second housing 42 includes a bottom shell 425 and a sealing portion 426. The sealing portion 426 extends upward from the edge of the bottom shell 425. The sealing portion 426 presses the sealing member 6 against the inner wall of the first receiving groove 414 to achieve a sealed connection between the first housing 41 and the second housing 42. The second housing 42 can be understood as a groove-shaped structure with an open top, the sealing portion 426 forming its four sides, and the bottom shell 425 forming its bottom. The shape of the sealing portion 426 corresponds to the shape of the sealing member 6, allowing the sealing portion 426 to completely press against the sealing member 6, forming a sealing structure. The sealing part 426 presses the sealing member 6 against the inner wall of the first receiving groove 414. This can be understood as the top surface of the sealing part 426 abutting against the lower surface of the sealing member 6, so that the upper surface of the sealing member 6 abuts against the top surface of the first receiving groove 414. The distance between the top surface of the sealing part 426 and the top surface of the first receiving groove 414 is less than the vertical thickness of the sealing member 6, so that a sealing structure is formed between the first receiving groove 414 and the second housing 42, which can provide a better sealing effect. At the same time, the sealing member 6 can provide a restoring force to help the first housing 41 return to its original position after being pressed.
[0102] Furthermore, the first engaging position 421 and the second engaging position 422 are respectively disposed on the outer side surface of the sealing part 426.
[0103] Furthermore, such as Figure 8 Figure 9 and Figure 10As shown, the sealing element 6 is a sealing ring. The sidewall of the first receiving groove 414 is offset inwards around its circumference from the sealing ring limiting portion 415, forming an annular sealing ring placement area 416 between the sealing ring limiting portion 415 and the sidewall of the first receiving groove 414. The sealing ring is placed in and held within the sealing ring placement area 416. The sealing ring limiting portion 415 includes multiple sealing ring limiting ribs 4151 extending downwards from the top wall of the receiving groove. These sealing ring limiting ribs 4151 combine to form the sealing ring limiting portion 415. The inward offset of the sidewall of the first receiving groove 414 from the sealing ring limiting portion 415 can be understood as an equidistant offset between the outer sidewall of the sealing ring limiting portion 415 and the sidewall of the first receiving groove 414, resulting in a uniformly wide sealing ring placement area between them. The sealing ring being clamped in the sealing ring placement area 416 can be understood as the sealing ring being elastic, its inner circumference being adapted to the circumference of the sealing ring placement area 416, and the transverse width of the sealing ring cross section being slightly larger than the width of the sealing ring placement area 416, so that the sealing ring and the sealing ring placement area 416 are interference fit, thus the sealing ring can be stably placed in the sealing ring placement area 416, which is convenient for assembly. The sealing ring limiting part 415 is formed by combining multiple sealing ring limiting bones 4151. Specifically, the sealing ring limiting part 415 has clearances at the corresponding positions of the four first buckles 411 and clearances at the corner away from the detection switch 3, thus forming multiple sealing ring limiting bones 4151. The purpose of setting clearances at the corresponding positions of the first buckles 411 is to allow for deformation of the first fastening position 421, so that the first buckles 411 can be smoothly disengaged from the first fastening position 421 when the first housing 41 is disassembled. The clearance at the corner away from the detection switch 3 is because the circuit board 5 is installed on the sealing ring limiting bone 4151 by buckles, and the circuit board 5 abuts against the end of the sealing ring limiting bone 4151. The clearance here is to leave space for the antenna module on the circuit board 5. The first receiving groove 414 has an inwardly recessed clearance portion 419 on its top surface. The clearance portion 419 is set as a recess to provide clearance space for electronic components on the circuit board 5, so that the circuit board 5 can be adapted to different modules.
[0104] In other embodiments, the sealing part 426 can abut against the sealing member 6 (not shown in the figure) from the side. That is, the sealing member 6 can be a sealing ring. An annular groove is formed on the outer side of the sealing part 426 to limit the sealing ring in the vertical direction. The sealing ring is fitted into the annular groove of the sealing part 426 and is clamped between the outer side of the sealing part 426 and the inner side of the first receiving groove 414. The cross-sectional width of the sealing ring is greater than the gap between the sealing part 426 and the inner side of the first receiving groove 414, so that a sealing structure is formed between the first receiving groove 414 and the second housing 42. However, with this design, the sealing member 6 will no longer provide a reset force, but instead provide a frictional resistance that hinders reset. At this time, the reset force of the first housing 41 is provided by the elastic force of the detection switch 3 itself. The advantage of this structure is that the reset force is reduced, the pressing force required by the user to press the first housing 41 is reduced, and it is more convenient to use, but the sealing effect is reduced.
[0105] Furthermore, such as Figure 5 , Figure 7 and Figure 10 As shown, it also includes a circuit board 5, which is installed in the first housing 41 and placed inside the sealed cavity. The detection switch 3 is disposed on the side of the circuit board 5 facing the second housing 42. When the first housing 41 responds to the pressing pressure and generates the pressing movement, the first housing 41 drives the detection switch 3 to move towards the second housing 42, thereby the second housing 42 presses against and triggers the detection switch 3. The specific structure of the circuit board 5 installed in the first housing 41 is as follows: four circuit board buckles 417 are protruding on the sealing ring limiting bone 4151 of the first housing 41, and circuit board fastening positions 53 are recessed at corresponding positions on the circuit board 5. The width of the circuit board fastening position 53 is adapted to the width of the circuit board buckles 417, so that the circuit board 5 is limited in the horizontal direction. The circuit board 5 is fastened to the sealing ring limiting bone 4151 by the circuit board buckles 417, and the upper surface of the circuit board 5 abuts against the end of the sealing ring limiting bone 4151, so that the circuit board 5 is limited in the vertical direction. The shape of the circuit board 5 is smaller than the outer wall shape of the sealing ring limiting bone 4151, so that the circuit board 5 is recessed into the outer wall of the sealing ring, preventing the circuit board 5 from obstructing the installation of the sealing ring, and at the same time preventing the sealing part 426 of the second housing 42 from pulling the circuit board 5 off when the first housing 41 is disassembled.
[0106] Compared to placing the circuit board 5 on the second housing 42, this embodiment places the circuit board 5 on the first housing 41. The pressing motion of the first housing 41 drives the circuit board 5 to move downward, causing the second housing 42 to press against the detection switch 3. The advantage of this design is that the light-emitting module 52, button battery 54, detection switch 3, magnetic induction module 1 and wireless transmission module 2 can be placed on both sides of the circuit board 5, improving the space utilization of the circuit board 5. Since the first housing 41 covers the second housing 42, the light-emitting module 52 needs to be placed on the side of the circuit board 5 facing the first housing 41, allowing light to pass through the first housing 41 for easy viewing by the user. The detection switch 3 needs to be triggered by pressure. At the same time, the ease of replacing the button battery 54, the installation position of the magnetic induction module 1, and the influence of the orientation of the wireless transmission module 2 on the signal must be considered. Specifically, the ease of replacing the button battery 54 can be understood as the user removing the first housing 41 without further disassembling the circuit board 5 to replace the button battery 54. The installation position of the magnetic induction module 1 needs to correspond to the center position of the magnetic component in order to accurately sense changes in the magnetic field. The wireless transmission module 2 cannot be placed near metal doors, windows, or other mounting surfaces, as this will affect the signal of the wireless transmission module 2. Since the switch status detector 101 needs to be installed on the door or window through the second housing 42, the wireless transmission module 2 cannot be placed on the side of the circuit board 5 facing the second housing 42. In summary, if the circuit board 5 is placed on the second housing 42, the light-emitting module 52, the button battery 54, the detection switch 3, and the magnetic induction module 1 all need to be placed on the side of the circuit board 5 facing the first housing 41. This would greatly increase the area of the circuit board 5, resulting in a significant increase in the volume of the switch status detector 101. This embodiment creatively places the circuit board 5 on the first housing 41 and moves with it, so that the button battery 54 and the detection switch 3 are placed on the lower surface of the circuit board 5, and the light-emitting module 52, the magnetic induction module 1, and the wireless transmission module 2 are placed on the upper surface of the circuit board 5. This improves the space utilization of the circuit board 5, reduces the area of the circuit board 5, and thus reduces the volume of the switch status detector 101. This allows the switch status detector 101 to achieve both magnetic induction and wireless switching functions while keeping its size very small. In one specific embodiment, the volume of the switch status detector 101 is 41mm × 26mm × 11mm.
[0107] Furthermore, such as Figure 7 and Figure 10As shown, the circuit board 5 is provided with an electrode connection portion 551 facing the second housing 42. The electrode connection portion 551 includes a positive electrode spring 5511 and a negative electrode spring 5512. The positive electrode spring 5511 and the negative electrode spring 5512 respectively abut against the positive and negative terminals of a button battery 54. The electrode connection portion 551 is conductive so that the circuit board 5 and the button battery 54 are conductive. The positive electrode spring 5511 and negative electrode spring 5512 are connected to the circuit board 5 by welding, wire connection, or other conductive connection methods. Both the positive electrode spring 5511 and negative electrode spring 5512 are made of thin iron sheet by stamping. The negative electrode spring 5512 includes a positive conductive part connected to the circuit board 5 and a negative abutting part that curves towards the button battery 54. The negative abutting part abuts against the upper surface of the button battery 54 and is elastic. When the circuit board 5 moves with the first housing 41, the distance between the upper surface of the button battery 54 and the circuit board 5 may change accordingly. The elasticity of the negative abutting part can ensure good contact between the circuit board 5 and the button battery 54. The positive electrode spring 5511 includes a positive conductive part connected to the circuit board 5 and a positive abutting part that abuts against the side of the button battery 54. The positive abutting part is bent in a "U" shape and curves towards the button battery 54. The negative abutting part is elastic to ensure good contact with the button battery 54.
[0108] Furthermore, such as Figure 11 and Figure 7 As shown, the second housing 42 has a battery compartment 427 at a corresponding position of the electrode connection portion 551. The shape of the battery compartment 427 is adapted to the shape of the button battery 54, such that the inner wall of the battery compartment 427 surrounds the outer wall of the button battery 54, thereby limiting the button battery 54 in the horizontal direction. The inner wall of the battery compartment 427 surrounding the outer wall of the button battery 54 can be understood as the shape of the battery compartment 427 matching the shape of the side of the button battery 54, and having a clearance fit with the button battery 54, allowing the button battery 54 to move up and down within the battery compartment 427. At least one elastic support 7 is provided between the bottom wall of the battery compartment 427 and the button battery 54. The button battery 54 is clamped between the elastic support 7 and the negative electrode spring 5512, thereby limiting the button battery 54 in the vertical direction. The elastic support 7 is made of elastic material, including foam, rubber, silicone, metal spring, or other feasible elastic material. Its function is to support the button battery 54, so that when the button battery 54 moves due to being pressed by the circuit board 5, it provides downward pressure margin for the button battery 54 and provides support force to ensure good contact between the button battery 54 and the negative electrode spring 5512.
[0109] In this embodiment, the battery compartment 427 is placed in the second housing 42, which has the following advantages: (1) It is convenient to disassemble and install the button battery 54; (2) It simplifies the structure of the first housing 41 and saves space for the circuit board 5, which is conducive to reducing the size of the switch status detector 101; (3) The second housing 42 is fixedly installed on the mounting surface of the door and window. The button battery 54 is relatively stable when placed in the second housing 42. If the button battery 54 is placed in the first housing 41, it will move with the first housing 41. The first housing 41 vibrates a lot during the pressing process, which will affect the conductivity stability of the button battery 54. At the same time, since the button battery 54 is heavy, its inertia is relatively large. If it is placed in the first housing 41, the pressing feel will be more cumbersome.
[0110] Furthermore, such as Figure 7 As shown, the battery compartment 427 includes a first battery rib 4271, a second battery rib 4272, and a third battery rib 4273. The first battery rib 4271 is arc-shaped, and its curvature matches the curvature of the side of the button battery 54. The second battery rib 4272 and the third battery rib 4273 are located on both sides of the first battery rib 4271, and together with the first battery rib 4271, they enclose the battery compartment 427. The electrode connection portion 551 includes two positive electrode springs 5511. The two positive electrode springs 5511 respectively abut against the side of the button battery 54 and are arranged at intervals between the second battery rib 4272 and the third battery rib 4273. In this embodiment, the first battery rib 4271 is arranged opposite to the two positive electrode springs 5511. The positive electrode springs 5511 abut against the side of the button battery 54, pressing the button battery 54 against the first battery rib 4271. Since the first battery rib 4271 is arc-shaped, it can prevent the button battery 54 from shifting to both sides under the action of the pressure.
[0111] In some embodiments, such as Figure 5 Figure 10 and Figure 12As shown, a light-emitting module 52 is disposed on the circuit board 5 facing the first housing 41. A light guide portion 418 is disposed on the first housing 41 at a corresponding position of the light-emitting module 52. The light guide portion 418 is light-guiding, capable of guiding at least a portion of the light emitted by the light-emitting module 52 to the outside of the first housing 41. The light-emitting module 52 includes light-emitting electronic components; in this embodiment, an orange-blue dual-color LED is used, with different colored edges indicating different usage states. The light guide portion 418's light-guiding property can be understood as being made of a light-transmitting material, such as transparent plastic, white opaque plastic, silicone, rubber, or other light-transmitting materials. The first housing 41 can have through holes to mount the light guide portion 418, or the first housing 41 and the light guide portion 418 can be integrally formed. The light guide portion 418 guides at least a portion of the light emitted by the light-emitting module 52 to the outside of the first housing 41, indicating the working state of the switch status detector 101.
[0112] Furthermore, such as Figure 5 As shown, the light guide portion 418 is integrally formed with the first housing 41. The light guide portion 418 extends towards the circuit board 5, and the light blocking portion 4181 surrounds the light-emitting module 52. The inner surface of the first housing 41 is thinned towards the outer surface to form the light guide portion 418 at the thinned portion. The light blocking portion 4181 can be understood as an annular column extending from the top wall of the first receiving groove 414 of the first housing 41 towards the LED, which can surround the light-emitting module 52. Since the light guide portion 418 and the first housing 41 are integrally formed, they are made of the same material, both being light-transmitting materials. The light emitted by the LED can pass through both the light guide portion 418 and the first housing 41, resulting in the first housing 41 being entirely light-transmitting. The function of the light blocking portion 4181 is to block the light emitted from the side of the LED, so that the light from the LED can only pass through the light guide portion 418 located above it. The thinning process can be understood as reducing the thickness of the first housing 41 at the position relative to the LED, and forming the light guide 418 in the thinned part. At the same time, the outer surface of the first housing 41 can be thinned inward, which greatly enhances the light transmission ability of the light guide 418, while other parts of the first housing 41 are thickened to reduce the light transmission ability, making the light transmitted by the light guide 418 more prominent.
[0113] In some embodiments, the housing 4 has a trigger hole (not shown in the figure) at a corresponding position of the detection switch 3. A button with a shape adapted to the trigger hole is embedded in the trigger hole. The button responds to the pressing pressure, causing at least a portion of it to displace, thereby pressing against and triggering the detection switch 3. The button embedded in the trigger hole can be understood as a circular, square, or polygonal hole, which can be located on any side of the housing 4. It can be a through hole, a countersunk hole, or a hole that tapers in the middle and expands at both ends. Specific embodiments are described in detail below. The button's shape matches the trigger hole and can be made of a rigid or elastic material. Its shape matches the trigger hole, thereby limiting the button's position and preventing it from disengaging from the trigger hole.
[0114] In one specific embodiment, the trigger hole is a circular through hole, and the button is a frustum-shaped structure made of plastic. The button includes a button head and a button cap disposed at the tail end of the button head. The button head is clearance-fitted with the trigger hole, and the diameter of the button cap is larger than the inner diameter of the trigger hole. The button head passes through the trigger hole from the inside to the outside, and the button head portion protrudes outside the trigger hole. The button cap is confined inside the trigger hole, preventing the button from detaching from the trigger hole. The button cap abuts against the detection switch 3, and the button can move towards the inside of the trigger hole in response to the pressing pressure, pressing and triggering the detection switch 3. The detection switch 3 is suitable to be a tactile switch made of rubber. The tactile switch itself has a large reset force, which can reset the button. Its rubber material matches the plastic material of the button, which can improve the pressing feel.
[0115] In another embodiment, the trigger hole is a countersunk hole, with its inward diameter being larger than its outward diameter. The button, like in the previous embodiment, has a frustum-shaped structure. The button cap fits into the countersunk hole of the trigger hole, thereby preventing the button from detaching from the trigger hole. In this embodiment, the button is made of rubber. Correspondingly, the detection switch 3 is a metal tactile switch or a micro switch, which can achieve a better pressing feel.
[0116] In another embodiment, the trigger hole is shaped like the hole of a diabolo, with a constricted center and expanded ends. The button is made of rubber and its shape matches the trigger hole, also with a constricted center and expanded ends. The button and trigger hole are press-fitted together, and the button is squeezed into the trigger hole due to its own elasticity. The press-fit between the button and the trigger hole achieves a waterproof seal, and the constricted center structure of the trigger hole prevents the button from detaching from it. A pressing part protrudes from the middle of the button towards the outside of the trigger hole. The pressing part protrudes from the outer surface of the first housing 41 for the user to press. When the pressing force is applied to the button, the button is recessed inward, pressing and triggering the detection switch 3. When the pressing force is removed, the button returns to its original shape under the action of its own elasticity and the reset force of the detection switch 3.
[0117] In some embodiments, such as Figure 13 As shown, the magnetic induction module 1 is disposed inside the housing 4. A first mark 43 is provided on the outer surface of the housing 4 at the corresponding position of the magnetic induction module 1. The distance between the first mark 43 and the magnetic induction module 1 is less than 10mm. The first mark 43 can be understood as a graphic or recess on the outer surface of the housing 4 used to mark the position of the magnetic induction module 1. The housing 4 includes a first side 44, and the magnetic induction module 1 is disposed near the first side 44 of the housing 4, so that the magnetic induction module 1 can be as close as possible to the outside of the housing 4, thereby shortening the distance between the magnetic induction module 1 and the magnetic component. The first mark 43 is provided at the corresponding position of the magnetic induction module 1 on the first side 44 to remind the user to ensure that the first side 44 faces the side of the magnetic component during installation, and to align the center of the magnetic suction component with the first mark 43, thus ensuring the accurate detection distance of the magnetic induction module 1. In one embodiment, the magnetic induction module 1 is a Hall switch. The Hall switch detects magnetic flux density, i.e. magnetic induction intensity. The magnetic induction intensity at the middle position of the magnetic component is stronger than that at both ends. Therefore, the center of the magnetic component is aligned with the first mark 43, and the magnetic component is installed parallel to the first side 44. The distance between the magnetic component and the first side 44 is changed. When the distance between the magnetic component and the first side 44 is less than 18mm, the switch status detector 101 identifies it as "off". When the distance between the magnetic component and the first side 44 is greater than 23mm, the switch status detector 101 identifies it as "on". During installation, adjust the relative position of the center position of the magnetic component and the first mark 43 in the fourth direction. The fourth direction is parallel to the first side 44 and parallel to the bottom surface of the housing 4, i.e., the direction indicated by the arrow in the figure. Through testing, it has been verified that in the fourth direction, adjusting the distance between the center position of the magnetic component and the first mark 43 to 10mm will reduce the sensing distance to 7mm and 11mm. That is, when the distance between the magnetic component and the first side 44 is less than 7mm, the switch status detector 101 identifies it as "off", and when the distance between the magnetic component and the first side 44 is greater than 11mm, the switch status detector 101 identifies it as "on". This sensing distance is close to the installation limit of household doors and windows. If the sensing distance is reduced further, the switch status detector 101 will not be able to be installed. Therefore, it is necessary to control the distance between the first mark 43 and the magnetic induction module 1 to be less than 10mm. The user should align the center position of the magnetic component with the first mark 43 during installation so that the sensing distance after installation can be kept within the usable range.
[0118] Furthermore, such as Figure 13 and Figure 14As shown, the magnetic assembly includes a third housing 824 and a permanent magnet 81 disposed inside the third housing 824. A second mark 83 is provided on the outer surface of the third housing 824, corresponding to the center position of the permanent magnet 81. The second mark 83 marks the center position of the permanent magnet 81, facilitating alignment of the center position of the permanent magnet 81 with the first mark 43 during installation. The third housing 824 includes a magnet mounting shell 84 and a top cover 85. The permanent magnet 81 is placed inside the magnet mounting shell 84, and the top cover 85 covers the magnet mounting shell 84 and is fixedly connected to it via a snap-fit. The magnet mounting shell 84 is a groove-shaped structure with an open top, and its inner wall has multiple clamping parts 841 that clamp and fix the permanent magnet 81, preventing it from shaking.
[0119] In some embodiments, such as Figure 15 As shown, the housing 4 includes a first surface 45, which is fixedly connected to an external mounting surface. The magnetic component includes a third housing 824 and a permanent magnet 81 disposed inside the third housing 824. The third housing 824 includes a second surface 821, which is fixedly connected to the external mounting surface. The fact that the housing 4 is fixedly connected to the external mounting surface via the first surface 45 can be understood as the first surface 45 being fixedly installed to the external mounting surface by means of adhesive, magnetic attraction, screw fixing, etc. The external mounting surface can be understood as the surface of a door, window, drawer, or wardrobe. The housing 4 and the third housing 824 are respectively installed at the fixed and movable parts of the door and window. The opening and closing of the door and window causes a change in the distance between these two parts, resulting in a change in the magnetic field strength sensed by the magnetic induction module 1. The switch state detector 101 determines the opening and closing state of the door and window based on the magnitude of the magnetic field strength. The external mounting surfaces of housing 4 and third housing 824 are not the same. In one specific embodiment, housing 4 is bonded to the door frame by double-sided adhesive, and third housing 824 is bonded to the door panel by double-sided adhesive.
[0120] The distance between the magnetic induction module 1 and the first surface 45 is defined as the first distance, and the distance between the center position of the permanent magnet 81 and the second surface 821 is defined as the second distance. The absolute value of the difference between the first distance and the second distance is less than 8 mm. Since the first surface 45 and the second surface 821 are fixed to an external mounting surface, setting the difference between the first distance and the second distance to be less than 8 mm ensures that the center position of the permanent magnet 81 is close to the position of the magnetic induction module 1 in a first direction, thus ensuring accurate sensing distance of the magnetic induction module 1. The first direction is the direction in which the housing 4 faces the first surface 45 and is perpendicular to the first surface 45. Figure 15The direction indicated by the middle arrow. In this embodiment, after testing and verification by the R&D personnel, when the installation interval between the housing 4 and the third housing 824 is 10mm, the switch status detector 101 identifies "off" when the distance between the magnetic induction module 1 and the center position of the permanent magnet 81 in the first direction is less than 16mm, and the switch status detector 101 identifies "on" when the distance between the magnetic induction module 1 and the center position of the permanent magnet 81 in the first direction is greater than 21mm. Therefore, in the first direction, the distance between the center of the permanent magnet 81 and the magnetic induction module 1 should not be too large; the optimal sensing distance is when the distance is less than 8mm.
[0121] Furthermore, such as Figure 8 As shown, the first surface 45 and the second surface 821 are respectively provided with double-sided adhesive parts 91, which can be grooves or marks. The shape of the double-sided adhesive parts 91 is adapted to the double-sided adhesive 9, so that the double-sided adhesive 9 can be adhered to the double-sided adhesive parts 91. The function of the double-sided adhesive parts 91 is to facilitate the adhesion of the double-sided adhesive to the center of the first surface 45 or the second surface 821.
[0122] According to another aspect of the invention, such as Figure 2 As shown, a switch state detection method is also provided, applied to a switch state detector 101; characterized in that the detection method includes: detecting a distance parameter between a magnetic component 8 and a sensing component 100; the distance parameter is used to indicate the distance between the magnetic component 8 and the sensing component 100;
[0123] If the distance parameter gradually decreases to a first interval ending at a first threshold, a first message is sent out; the first message is used to indicate that the target associated with the sensing component 100 is in a closed state.
[0124] If the distance parameter gradually increases to a second interval starting from the second threshold, a second message is sent out; the second message is used to indicate that the target associated with the sensing component 100 is in an open state; wherein the first interval and the second interval do not overlap, and the difference between the second threshold and the first threshold is greater than or equal to 1 mm.
[0125] The technical details of the above method have been explained in detail above and will not be repeated here. Existing switch-state detectors have too little differentiation between the sensing conditions of "on" and "off" states. This causes the sensing state of the sensing component 100 to repeatedly switch between "on" and "off" when the distance between the magnetic component 8 and the sensing component 100 reaches a critical value. This is because the magnetic induction intensity generated by the magnetic component 8 fluctuates due to environmental influences, and the magnetic induction intensity detected by the magnetic induction module 1 in the sensing component 100 also fluctuates. This results in the sensing state of the sensing component 100 repeatedly switching between "on" and "off," causing the connected smart device 103 to repeatedly switch its operating state, potentially damaging the controlled smart device. The switch-state detector 101 disclosed by the applicant sets the difference between a first threshold and a second threshold to be greater than or equal to 1 mm, creating a hysteresis interval of at least 1 mm between the first and second intervals. When the distance parameter reaches this hysteresis interval, the sensing state of the sensing component 100 does not change and remains in the previous sensing state. Setting a hysteresis interval greater than or equal to 1 mm can effectively prevent the sensing state of the sensing component 100 from repeatedly switching when the distance parameter reaches a certain critical value, thereby protecting the smart device 103 connected to the sensing component 100 from repeatedly switching its working state.
[0126] In some embodiments, the method further includes: if a change in the distance parameter from the second interval to the first interval is detected, then a first message is sent to the outside; if a change in the distance parameter from the first interval to the second interval is detected, then a second message is sent to the outside.
[0127] The technical details of the above method have been described in detail above and will not be repeated here. Due to the existence of the hysteresis interval, the distance parameter may enter the first interval or the second interval in response to the positional changes of the magnetic component 8 and the sensing component 100. In this case, it is necessary to determine whether the interval before entering the hysteresis interval is the same as the interval after entering the hysteresis interval. If they are the same, no message is sent; if they are different, the corresponding message is sent, thereby effectively preventing duplicate message transmission.
[0128] In some embodiments, the method further includes: the sensing component 100 being triggered in response to an external pressing pressure to generate and transmit a third message; the third message being used to control the operating state of an external device paired with the sensing component 100. The technical details of the above method have been described in detail above and will not be repeated here. This method enables the switch status detector 101 to be used both as a sensor for detecting the opening and closing of doors and windows and as a small wireless switch.
[0129] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A switch state detector, characterized in that, include: Magnetic components used to generate magnetic fields; A sensing component, disposed independently of the magnetic component, and capable of changing position relative to the magnetic component; and the sensing component is used to detect magnetic induction intensity and is configured as follows: When the distance parameter between the magnetic component and the sensing component gradually decreases to a first interval ending at a first threshold, a first message is sent out; the first message is used to indicate that the target associated with the sensing component is in a closed state; when the distance parameter between the magnetic component and the sensing component gradually increases to a second interval starting at a second threshold, a second message is sent out; the second message is used to indicate that the target associated with the sensing component is in an open state; the distance parameter is related to the magnetic induction intensity; Wherein, the first interval and the second interval do not overlap, and the difference between the second threshold and the first threshold is greater than or equal to 1mm, so that there is a hysteresis interval of at least 1mm between the first interval and the second interval. When the distance parameter reaches the hysteresis interval, the sensing state of the sensing component does not change.
2. The switch state detector according to claim 1, characterized in that, The sensing component is further configured to: send a first message when the distance parameter changes from the second interval to the first interval in response to a change in position between the magnetic component and the sensing component; and send a second message when the distance parameter changes from the first interval to the second interval in response to a change in position between the magnetic component and the sensing component.
3. The switch state detector according to claim 1, characterized in that, The sensing component is further configured to send a fourth message at a first specified time after the first message or the second message has been sent, the fourth message being used to indicate whether the current state of the target object is closed or open.
4. The switch state detector according to claim 1, characterized in that, The sensing component includes: The magnetic induction module is used to sense the intensity of magnetic field and generate an electrical signal. A wireless transmitting module, electrically connected to the magnetic induction module, is configured as follows: When a level change is detected, a first message or a second message is sent to the outside.
5. The switch state detector according to claim 4, characterized in that, The level signal includes a first level signal and a second level signal that is opposite to the first level signal; When the distance parameter between the sensing component and the magnetic component is in the first interval, the magnetic sensing module continuously outputs a first level signal; when the distance parameter between the sensing component and the magnetic component is in the second interval, the magnetic sensing module continuously outputs a second level signal; and when the distance parameter moves from the first interval to the second interval, the level signal output by the magnetic sensing module changes from the first level signal to the second level signal, and the wireless transmitting module sends a second message; when the distance parameter moves from the second interval to the first interval, the level signal output by the magnetic sensing module changes from the second level signal to the first level signal, and the wireless transmitting module sends a first message.
6. The switch state detector according to claim 4, characterized in that, The level signal includes a first level signal and a second level signal that is opposite to the first level signal; When the distance parameter between the sensing component and the magnetic component is in the first interval, the magnetic sensing module continuously outputs a first level signal; when the distance parameter between the sensing component and the magnetic component is in the second interval, the magnetic sensing module continuously outputs a second level signal; and when the distance parameter moves from the first interval through the third interval into the second interval, the level signal output by the magnetic sensing module switches to the second level signal, and the wireless transmitting module sends a second message; when the distance parameter moves from the second interval through the third interval into the first interval, the level signal output by the magnetic sensing module switches to the first level signal, and the wireless transmitting module sends a first message; the third interval is an interval greater than the first threshold and less than the second threshold.
7. The switch state detector according to claim 1, characterized in that, The sensing component includes a magnetic induction module for sensing magnetic induction intensity and generating a voltage signal; The wireless transmitting module is electrically connected to the magnetic induction module to receive the voltage signal, compare the voltage signal with a reference voltage, and then send a first message or a second message based on the comparison result.
8. The switch state detector according to claim 7, characterized in that, The reference voltage includes a first reference voltage value and a second reference voltage value; the wireless transmission module is configured to: When the voltage signal gradually decreases to less than or equal to the first reference voltage value, a first message is transmitted; the first reference voltage value indicates that the distance between the sensing component and the magnetic component is a first threshold. When the voltage signal gradually increases to a value greater than or equal to the second reference voltage value, a second message is transmitted. The second reference voltage value indicates that the distance between the sensing component and the magnetic component is a second threshold.
9. The switch state detector according to claim 8, characterized in that, The first threshold includes a plurality of first preset thresholds and is configured to be able to switch between the plurality of first preset thresholds; The second threshold includes a plurality of second preset thresholds and is configured to be able to switch between the plurality of second preset thresholds.
10. The switch state detector according to any one of claims 4-6, characterized in that, The wireless transmission module is configured to enter a low-power mode within a second specified time after the first or second message has been sent.
11. The switch state detector according to claim 10, characterized in that, The wireless transmission module is configured to be woken up in low-power mode in response to a level signal sent by the magnetic induction module; the level signal includes a high level or a low level. When the wireless transmission module is woken up by a high level, the next wake-up condition is set to wake up by a low level. When the wireless transmission module is woken up by a low level, the next wake-up condition is set to wake up by a high level.
12. The switch state detector according to any one of claims 4 and 7, characterized in that, The sensing component is also configured to detect an external pressing operation and generate a third message; the third message is used to control the operating status of an external device paired with the sensing component.
13. The switch state detector according to claim 12, characterized in that, The sensing component also includes a housing and a detection switch, the detection switch being coupled to the housing and being triggered based on pressing the housing, thereby generating a trigger signal; The detection switch is electrically connected to the wireless transmission module, such that the wireless transmission module sends the third message outward based on the trigger signal.
14. The switch state detector according to claim 13, characterized in that, The wireless transmission module is configured to enter a low-power mode within a third specified time after sending the first, second, or third message, and to be woken up in response to the trigger signal in the low-power mode.
15. The switch state detector according to claim 14, characterized in that, The wireless transmission module is also configured to: if the duration of continuous triggering of the detection switch exceeds a specified duration, enter a low-power mode and set the next wake-up condition to de-trigger the detection switch.
16. The switch state detector according to claim 1, characterized in that, The sensing component includes: case, A magnetic induction module, disposed within the housing, is used to sense magnetic induction intensity; A wireless transmitting module is disposed within the housing and electrically connected to the magnetic induction module; and is configured to: When the magnetic induction module detects that the absolute value of the magnetic induction intensity gradually increases to a level greater than the first magnetic induction intensity, the wireless transmission module sends the first message to the outside world; when the magnetic induction module detects that the absolute value of the magnetic induction intensity gradually decreases to a level less than the second magnetic induction intensity, the wireless transmission module sends the second message to the outside world; the first magnetic induction intensity corresponds to the magnetic induction intensity when the distance parameter reaches the first threshold, and the second magnetic induction intensity corresponds to the magnetic induction intensity when the distance parameter reaches the second threshold; A detection switch is disposed in the housing and electrically connected to the wireless transmission module. The detection switch can be triggered in response to a pressing pressure, thereby the wireless transmission module sends a third message to the outside world.
17. The switch state detector according to claim 16, characterized in that, The housing includes a first housing and a second housing, the first housing and the second housing are movably connected, the detection switch is disposed between the first housing and the second housing, the first housing responds to the pressing pressure to generate a pressing movement, thereby reducing the distance between the first housing and the second housing, so that the first housing or the second housing presses against and triggers the detection switch.
18. The switch state detector according to claim 17, characterized in that, The first housing has at least one first buckle protruding from it, and the second housing has a first engaging position at the corresponding position of the first buckle. The first buckle engages with the first engaging position, such that the first engaging position restricts the first buckle to the limit position of movement in a first direction. In a second direction, there is an movable gap between the first engaging position and the first buckle, so that the first buckle can generate relative displacement with respect to the first engaging position in the second direction. The first direction is the direction in which the first housing moves away from the second housing, and the second direction is opposite to the first direction.
19. The switch state detector according to claim 18, characterized in that, The first buckle is disposed at one end of the first housing, and the other end of the first housing is provided with a second buckle. The second housing has a second fastening position at the corresponding position of the second buckle. The second buckle is fastened to the second fastening position. The one end of the first housing responds to the pressing force and pivots based on the second fastening position, thereby generating the pressing motion.
20. The switch state detector according to claim 18, characterized in that, There are four first buckles, which are evenly distributed along the circumference of the first housing; the four first buckles are respectively engaged with the corresponding first engagement positions, and there is a movable gap between each first engagement position and the corresponding first buckle, so as to realize the movable connection between the first housing and the second housing. When the first housing responds to the pressing pressure and generates the pressing movement, the first housing drives at least one of the first buckles to generate the relative displacement.
21. The switch state detector according to any one of claims 17-20, characterized in that, It also includes a seal that is arranged around the first housing and is clamped between the first housing and the second housing to achieve a sealed connection between the first housing and the second housing.
22. The switch state detector according to claim 21, characterized in that, The first housing responds to the pressing pressure by generating the pressing motion, which causes elastic deformation against the seal. Consequently, the seal generates a restoring force that resists the elastic deformation. When the pressing pressure is removed, the restoring force supports the first housing to return to its original position.
23. The switch state detector according to claim 22, characterized in that, The sealing element is a sealing ring, and the width of the cross section of the sealing ring in a first direction is greater than the width of the cross section in a third direction. The first direction is the direction in which the first housing is away from the second housing, and the third direction is perpendicular to the first direction.
24. The switch state detector according to claim 22, characterized in that, The first housing includes a first end and a second end away from the first end, and the detection switch is disposed at the first end of the first housing; The sealing element is a sealing ring. The cross section of the sealing ring at the position corresponding to the first end is designated as the first cross section, and the cross section of the sealing ring at the position corresponding to the second end is designated as the second cross section. The area of the first cross section is greater than the area of the second cross section.
25. The switch state detector according to claim 21, characterized in that, The first housing has a first receiving groove facing the second housing. The shape of the first receiving groove matches the shape of the second housing, so that the first receiving groove covers the second housing, and the second housing is at least partially contained within the first receiving groove. The sealing element is disposed in the first receiving groove, and the sealing element is clamped between the inner wall of the first receiving groove and the second housing, so that the first receiving groove and the second housing form a sealed cavity.
26. The switch state detector according to claim 25, characterized in that, The second housing includes a bottom shell and a sealing part. The sealing part extends upward from the edge of the bottom shell and presses the sealing element against the inner wall of the first receiving groove to achieve a sealed connection between the first housing and the second housing.
27. The switch state detector according to claim 26, characterized in that, The sealing element is a sealing ring. The sidewall of the first receiving groove is offset inward around the sealing ring limiting portion to form an annular sealing ring placement area between the sealing ring limiting portion and the sidewall of the first receiving groove. The sealing ring is placed in the sealing ring placement area and is clamped in the sealing ring placement area. The sealing ring limiting portion includes a plurality of sealing ring limiting bones extending downward from the top wall of the receiving groove. The sealing ring limiting bones are combined to form the sealing ring limiting portion.
28. The switch state detector according to claim 25, characterized in that, It also includes a circuit board, which is installed in the first housing and placed inside the sealed cavity. The detection switch is disposed on the side of the circuit board facing the second housing. When the first housing responds to the pressing pressure and generates the pressing movement, the first housing drives the detection switch to move toward the second housing, thereby the second housing presses against and triggers the detection switch.
29. The switch state detector according to claim 28, characterized in that, The circuit board is provided with an electrode connection portion facing the second housing. The electrode connection portion includes a positive electrode spring and a negative electrode spring. The positive electrode spring and the negative electrode spring respectively abut against the positive and negative terminals of a button battery. The electrode connection portion is conductive so that the circuit board and the button battery can conduct electricity.
30. The switch state detector according to claim 29, characterized in that, The second housing has a battery compartment at the corresponding position of the electrode connection portion. The shape of the battery compartment is adapted to the shape of the button battery, so that the inner sidewall of the battery compartment surrounds the outer sidewall of the button battery to limit the button battery in the horizontal direction. At least one elastic support is provided between the bottom wall of the battery compartment and the button battery. The button battery is clamped between the elastic support and the negative electrode spring, so that the button battery is limited in the vertical direction.
31. The switch state detector according to claim 28, characterized in that, The circuit board is provided with a light-emitting module facing the first housing, and the first housing is provided with a light guide part at the corresponding position of the light-emitting module. The light guide part has light-guiding properties and can guide at least part of the light emitted by the light-emitting module to the outside of the first housing.
32. The switch state detector according to claim 31, characterized in that, The light guide portion is integrally formed with the first housing, and the light guide portion extends toward the circuit board to form a light blocking portion, which surrounds the light-emitting module; the inner surface of the first housing is thinned toward the outer surface to form the light guide portion at the thinned portion.
33. The switch state detector according to claim 16, characterized in that, The housing has a trigger hole at the corresponding position of the detection switch. A button with a shape adapted to the trigger hole is embedded in the trigger hole. The button responds to the pressing pressure and at least part of it is displaced, thereby pressing against and triggering the detection switch.
34. The switch state detector according to claim 16, characterized in that, The magnetic induction module is disposed inside the housing, and a first mark is provided on the outer surface of the housing at the corresponding position of the magnetic induction module, the distance between the first mark and the magnetic induction module being less than 10mm.
35. The switch state detector according to claim 34, characterized in that, The magnetic component includes a third housing and a permanent magnet disposed inside the third housing. A second mark is provided on the outer surface of the third housing, and the second mark corresponds to the center position of the permanent magnet.
36. A switch state detector according to claim 16, characterized in that, The housing includes a first surface, and the housing is fixedly connected to an external mounting surface through the first surface. The magnetic component includes a third housing and a permanent magnet disposed inside the third housing. The third housing includes a second surface, and the third housing is fixedly connected to the external mounting surface through the second surface. The distance between the magnetic induction module and the first surface is defined as the first distance, and the distance between the center of the permanent magnet and the second surface is defined as the second distance. The absolute value of the difference between the first distance and the second distance is less than 8 mm.
37. A method for detecting a switch state, applied to a switch state detector; characterized in that, The detection method includes: Detect a distance parameter between a magnetic component and a sensing component; the distance parameter indicates the distance between the magnetic component and the sensing component; If the distance parameter gradually decreases to a first interval ending at a first threshold, a first message is sent out; the first message is used to indicate that the target associated with the sensing component is in a closed state. If the distance parameter gradually increases to a second interval starting from the second threshold, a second message is sent out; the second message is used to indicate that the target associated with the sensing component is in an open state. Wherein, the first interval and the second interval do not overlap, and the difference between the second threshold and the first threshold is greater than or equal to 1mm, so that there is a hysteresis interval of at least 1mm between the first interval and the second interval. When the distance parameter reaches the hysteresis interval, the sensing state of the sensing component does not change.
38. The detection method according to claim 37, characterized in that, The method further includes: If the distance parameter is detected to change from the second interval to the first interval, a first message is sent out; if the distance parameter is detected to change from the first interval to the second interval, a second message is sent out.
39. The detection method according to claim 37, characterized in that, The method further includes: The sensing component is triggered in response to an external pressure to generate and send a third message; the third message is used to control the operating status of an external device paired with the sensing component.
40. A switch state detection system, characterized in that, The device includes a smart terminal, a gateway, and a switch state detector as described in any one of claims 1 to 36 and / or a switch state detector capable of performing the detection method as described in any one of claims 37 to 39; the switch state detector is capable of communicating with the gateway after joining the network where the gateway is located; the smart terminal is capable of communicating with the gateway directly or indirectly. The switch status detector is used to: report detection events to the gateway; the detection events are used to indicate action events or status events of a target object associated with the switch status detector; the action events include the target object being turned on or off, and the status events include the target object being in an open state or a closed state; The gateway is used to: feed back the detected event to the smart terminal, and / or, control the execution of the trigger result associated with the switch state detector based on a trigger rule; The smart terminal is used to: acquire user-defined trigger rules and send the trigger rules to the gateway, so that: the gateway receives and stores the trigger rules; the trigger rules define a trigger relationship between at least one trigger condition and at least one trigger result, the trigger condition being a detection event of the switch state detector, and the trigger result being an executable function of a smart device within the network where the gateway is located.