Control method of control switch, control switch, system, equipment and medium
By working together with the gateway and control switch, and using environmental parameters and indicator light colors, the system automatically determines target parameters and controls devices, solving the problem of cumbersome operation steps in smart home environments and improving user experience and control efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU HEMI TECHNOLOGY CO LTD
- Filing Date
- 2026-01-14
- Publication Date
- 2026-04-17
AI Technical Summary
In complex smart home environments, existing control switches require the use of control panels and applications, resulting in cumbersome operation steps and a poor user experience.
The gateway receives environmental parameters collected by sensors, automatically determines target parameters based on preset environmental indicators and priorities, and displays the corresponding colors through indicator lights on the control switch, simplifying the user operation process and allowing users to adjust target parameters without actively switching devices.
It significantly improves user experience and control efficiency, reduces manual operation steps, and enables intuitive device control and scene linkage.
Smart Images

Figure CN121879237A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of intelligent control technology, and more specifically, to a control method, control switch, system, device, and medium for a control switch. Background Technology
[0002] Smart home control switches integrate communication modules and intelligent control technology, enabling remote and automated management of smart home devices. The appearance and interaction methods of control switches significantly impact user experience. Currently, commonly used control switches can be categorized by appearance and interaction methods as follows: touch switches, push-button switches, and rotary switches.
[0003] As users' demands for smart technology continue to rise, and with the increasing complexity of smart home environments and the proliferation of smart home devices, control switches have integrated control functions for multiple devices and scenarios. However, in practical applications, these control switches require the use of a control panel and an application (APP). Users need to actively operate the switch to switch controlled devices, making it difficult to intuitively identify the device currently controlled by the switch. This process is cumbersome and results in a poor user experience. Summary of the Invention
[0004] This disclosure provides a control method, control switch, system, device, and medium for a control switch, which can solve the above-mentioned problems of the prior art. The technical solution is as follows: According to one aspect of the present disclosure, a control method for a control switch is provided, applied to a gateway, the method comprising: The system receives multiple environmental parameters collected by sensors, determines the target parameter for adjustment from each environmental parameter based on the preset environmental indicators and priorities of each environmental parameter, and determines a first device group for adjusting the target parameter, wherein the first device group includes at least one smart home device. Based on the pre-stored mapping relationship between environmental parameters and light colors, the indicator light of the control switch is obtained and instructed to display the target color corresponding to the target parameters. At the same time, the control switch is made to respond to the control operation, and the first equipment group is controlled according to the control operation.
[0005] In one possible implementation, the method also includes: Receives a mode switching command sent by the control switch, switches to control mode, and in control mode, the gateway receives control operations sent by the control switch and controls multiple smart home devices in at least one scene according to the control operations. The system receives the target control operation sent by the control switch, and determines the target smart home device and target working status corresponding to the target control operation from the pre-stored operation device mapping table. The operation device mapping table includes multiple control operations, and each control operation corresponds to the working status of at least one smart home device. For each target smart home device, instruct the target smart home device to switch its working state to the target working state.
[0006] In one possible implementation, the control modes include a first mode and a second mode; In the first mode, all smart home devices corresponding to control operations in the operation device mapping table belong to the same scenario, but the smart home devices and their working states are not completely the same for different control operations. In the second mode, each control operation in the device mapping table corresponds to all smart home devices in a scenario. Different control operations correspond to different scenarios, and the smart home devices and their working states are not entirely the same in different scenarios.
[0007] In one possible implementation, for each target smart home device, the operating state of the target smart home device is instructed to switch to the target operating state, and then the following is also included: Receive the execution results from each target smart home device, and determine whether the corresponding target smart home device has executed successfully based on the execution results; If N target smart home devices are confirmed to have successfully executed the command, the indicator light on the control switch will flash N times according to the first color representing successful execution, where N is a positive integer.
[0008] In one possible implementation, the indicator light includes multiple light segments; For each target smart home device, the system instructs the target smart home device to switch its operating state to the target operating state, followed by: Receive the execution results from each target smart home device and determine whether the execution was successful based on the results; If at least one target device is determined to have failed, the failure type is determined, and the control switch corresponding light segment displays a second color indicating the failure, based on the failure type.
[0009] In one possible implementation, the control switch includes a master switch and a slave switch; the method further includes: Upon receiving a coordination command, the gateway switches to coordination mode. In coordination mode, if the gateway receives a control operation sent by the master switch, it instructs the slave switch to respond to the control operation synchronously.
[0010] According to another aspect of the present disclosure, a control switch is provided, the control switch including an indicator light and a stepless knob; The control switch controls the indicator light to display the color of the gateway's indicator; The control switch obtains the rotation angle of the stepless knob and sends the angle as a control operation to the gateway. The gateway executes the steps of the control method described above for the control switch.
[0011] According to another aspect of the present disclosure, a smart home control system is provided, including: a gateway, a control switch, and at least one smart home device; The gateway executes the steps of the control method described above for the control switch.
[0012] According to another aspect of the present disclosure, an electronic device is provided, the electronic device including a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to implement the above-described method.
[0013] According to another aspect of the present disclosure, a computer-readable storage medium is provided that stores a computer program thereon, which, when executed by a processor, implements the above-described method.
[0014] According to one aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method.
[0015] The beneficial effects of the technical solutions provided in this disclosure are: The gateway achieves environmental perception by collecting environmental parameters through sensors. Combining the pre-set environmental indicators and priorities of each parameter, it automatically determines the target parameter for current control and instructs the indicator light of the control switch to display the corresponding color. This intuitively prompts the user that the target parameter is being controlled and defaults to switching the control switch to the first device group corresponding to the target parameter. This simplifies the user's operation process from "checking status → switching mode / device → adjusting" to "looking at the color → adjusting". This allows users to directly adjust the target parameter without thinking or actively switching, reducing the steps required for manual operation in complex smart home environments and significantly improving user experience and control efficiency. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments of this disclosure will be briefly introduced below.
[0017] Figure 1 A flowchart illustrating a control method for a control switch provided in an embodiment of this disclosure; Figure 2This is a schematic diagram of the structure of a control switch provided in an embodiment of the present disclosure; Figure 3 This is a schematic diagram of a control switch application provided in an embodiment of the present disclosure; Figure 4 This is a schematic diagram of the structure of a smart home device control system provided in an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of a gateway provided in an embodiment of the present disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0018] The embodiments of this disclosure are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this disclosure, and do not constitute a limitation on the technical solutions of the embodiments of this disclosure.
[0019] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this disclosure mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element are connected through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” can be implemented as “A,” or as “B,” or as “A and B.”
[0020] To make the objectives, technical solutions, and advantages of this disclosure clearer, the embodiments of this disclosure will be described in further detail below with reference to the accompanying drawings.
[0021] The following description of several exemplary embodiments illustrates the technical solutions of this disclosure and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, learned from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0022] The relevant technologies involved in this application are described below: Currently, commonly used control switches can be classified into the following categories according to their appearance and interaction method: touch switches, push-button switches, and rotary switches.
[0023] Touch switches are switches controlled by touch sensing, typically in the form of touch panels or touchscreens. Users control the device by lightly touching the screen. Touch switches offer a wide range of functions and are commonly used in smart home systems to enable various intelligent operations.
[0024] Push-button switches are switches that are controlled by pressing or releasing a button. They are commonly used to control the power supply of equipment. In addition to controlling the start and stop of the equipment, they can also be set to control different working modes.
[0025] A rotary switch is a switch that controls movement by rotating it. It is often used in devices that require multi-level control or adjustment, such as volume control, temperature control, and light brightness control.
[0026] With users' increasing demand for smart technology, the smart home environment becoming more complex, and the number of smart home devices increasing, switches have integrated control functions for multiple devices and scenarios.
[0027] Generally, push-button switches and rotary switches are often used for adjusting a single device. The buttons control the device to turn on and off, or the knobs control the parameters of a single device (such as volume, temperature, etc.). Touch switches are often used to control different devices or multiple modes of a single device using a fixed touch area on a touch screen.
[0028] With users' increasing demand for smart technology, the smart home environment is becoming more complex, and the number of smart home devices is increasing, control switches have integrated control functions for multiple devices and scenarios. In practical applications, these control switches need to be used in conjunction with control panels and applications (APPs).
[0029] For example, control panels with buttons and knobs, or single control panels, require the user to determine whether the currently controlled device is the target device when adjusting a specific device. If it is determined not to be the target device and needs to be switched, the user must actively perform the operation on the control panel or the corresponding app to switch the controlled device. Although this method can identify the controlled device and achieve the switching, the entire process requires the user to actively operate, which is cumbersome and results in a poor user experience.
[0030] Based on this, the present disclosure provides a control method for a control switch, which to a certain extent solves the technical problems in the above-mentioned related technologies where the interactive operation steps are complicated and cumbersome, affecting the user experience and operating efficiency in complex intelligent control environments.
[0031] The following description of several exemplary embodiments illustrates the technical solutions of this disclosure and the technical effects produced by these solutions. It should be noted that the following embodiments can be referenced, learned from, or combined with each other. Identical terms, similar features, and similar implementation steps in different embodiments will not be repeated.
[0032] It is understood that in the control method for a control switch provided in the embodiments of this disclosure, any step of the method can be executed by an electronic device and / or a server, and all steps in the method can be executed independently by the electronic device or the server, or jointly by the electronic device and the server.
[0033] The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. Electronic devices can be smartphones, tablets, laptops, desktop computers, smart voice interaction devices (such as smart speakers), wearable electronic devices (such as smartwatches), in-vehicle terminals, smart home appliances (such as smart TVs), AR / VR devices, etc., but are not limited to these.
[0034] The embodiments of this disclosure will be described subsequently using electronic devices as the execution subject; however, this does not constitute a limitation on the embodiments of this disclosure.
[0035] The control method for the control switch provided in this embodiment is applied to a gateway.
[0036] A gateway, also known as an internetwork connector or protocol converter, is a crucial device or software module for interconnecting different networks or systems. In the field of intelligent control technology, the gateway is the core control device of a smart home control system, responsible for unifying the access and control of different communication protocols (such as Wi-Fi, Zigbee, Bluetooth, etc.) and enabling collaborative operation between smart home devices through cloud or local processing.
[0037] Smart home devices (hereinafter referred to as devices) refer to home products that are connected through Internet of Things (IoT) technology and have intelligent functions. They can be remotely controlled, operated automatically, or work in conjunction with other devices, including but not limited to smart air conditioners, smart speakers, smart lights, smart door locks, smart curtains, smart clothes dryers, and robot vacuum cleaners.
[0038] In this embodiment of the disclosure, the gateway is connected to the control switch and each device. Users can control the devices through the control switch. The specific type and quantity of the control switch and devices can be determined according to actual needs. For example, the smart home devices can be divided according to rooms, and a control switch can be set in each room.
[0039] Figure 1This is a flowchart illustrating a control method for a control switch provided in an embodiment of the present disclosure, as shown below. Figure 1 As shown, the method includes the following steps: Step S101: Receive multiple environmental parameters collected by the sensor, determine the target parameter to be adjusted from each environmental parameter according to the preset environmental indicators and priorities of each environmental parameter, and determine a first device group for adjusting the target parameter, the first device group including at least one smart home device.
[0040] Specifically, in this embodiment of the disclosure, the gateway receives environmental parameters collected by the sensors in real time. Environmental parameters refer to data that reflect the current physical state of the smart home environment, such as temperature, humidity, noise, indoor brightness, and air quality. The number and type of environmental parameters collected by the gateway can be determined according to actual needs.
[0041] Accordingly, for each environmental parameter, the sensor that collects the environmental parameter can be a sensor carried by the corresponding device itself or an independent sensor. The sensor can feed back data in a way that is based on a fixed time interval or according to the gateway instruction, etc. This disclosure does not limit this.
[0042] The gateway stores the pre-set environmental metrics and priorities for each environmental parameter. For each environmental parameter, the environmental metric indicates the range of values within which adjustment is needed; adjustment is required when the environmental parameter meets the environmental metric. The priority indicates the order in which different environmental parameters should be adjusted; different environmental parameters can have the same or different preset priorities.
[0043] Understandably, for each environmental parameter, multiple environmental indicators can be set, each with the same or different priorities. For example, in summer, when the environmental parameter is indoor temperature, multiple temperature indicators can be set, such as using 30℃, 27℃, and 24℃ as the dividing points of the numerical range. The priorities are set according to the temperature indicators from high to low. When the temperature is greater than 30℃, the priority is 1; when the temperature is between 30℃ and 27℃, the priority is 2; and when the temperature is between 27℃ and 24℃, the priority is 3. The smaller the value of the priority, the higher the priority. When the temperature is less than 24℃, the environmental parameter is considered to require no adjustment.
[0044] In addition, in practical applications, an environmental parameter may have two sub-parameters. For example, when the environmental parameter is brightness, indoor brightness and outdoor brightness can be used as sub-parameters, and corresponding environmental indicators can be set to serve as a reference for whether adjustment is needed.
[0045] In step S101, the gateway receives multiple environmental parameters collected by the sensor. For each environmental parameter, it determines whether the environmental parameter meets the environmental index based on the preset environmental index of the environmental parameter, and uses the environmental parameter that meets the environmental index as the first parameter.
[0046] After filtering out at least one first parameter that needs to be adjusted, the gateway selects the first parameter with the highest priority among the preset first parameters as the target parameter for the current adjustment, and after determining the target parameter, determines a first device group for adjusting the target parameter, which includes at least one smart home device.
[0047] It is understandable that there may not be only one first parameter with the highest priority. The target parameter can be selected from the first parameters with the highest priority by means of randomness or by following a certain order (such as the ID order of environment parameters).
[0048] In this embodiment, besides being preset by the manufacturer or user, the priority of each environmental parameter can also be determined by a machine learning module built into the gateway. This module analyzes the user's operating habits (e.g., the user prioritizes adjusting lights 80% of the time during a month's adjustments) and automatically generates a priority order for each environmental parameter, pushing confirmation messages to the user at fixed time intervals (e.g., monthly). Correspondingly, the machine learning module can also automatically generate environmental indicators for each parameter based on the user's historical adjustment data and push confirmation messages to the user. This approach enables adaptive updates of priority order and environmental indicators, better meeting the user's personalized needs.
[0049] In addition, the devices included in the device group corresponding to each environmental parameter refer to devices that can be used to adjust that environmental parameter. The type and number of devices in the device group are determined according to actual needs. For example, when the target parameter is temperature, the device could be a smart air conditioner; when the target parameter is indoor brightness, the device could be smart lighting fixtures and smart curtains.
[0050] Step S102: Based on the pre-stored mapping relationship between environmental parameters and light colors, obtain and instruct the indicator light of the control switch to display the target color corresponding to the target parameters, and at the same time make the control switch respond to the control operation, and control the first device group according to the control operation.
[0051] Specifically, the gateway pre-stores the mapping relationship between environmental parameters and light colors, and each environmental parameter and its corresponding light color can be set according to actual needs. Accordingly, in this embodiment, the control switch also includes an indicator light, and the gateway can instruct the indicator light of the control switch to display different colors.
[0052] In step S102, the gateway finds the light color corresponding to the target parameter in the pre-stored mapping relationship, uses it as the target color, and instructs the indicator light of the control switch to display the target color corresponding to the target parameter. At the same time, the control switch responds to the control operation and controls the first device group according to the control operation. The control operation refers to the interactive behavior performed by the user on the control switch that can be recognized by the gateway, such as physical button operation and rotation angle operation.
[0053] More specifically, the gateway generates and sends a color mapping message to the control switch based on the target color. After receiving the color mapping message, the control switch displays the target color on the control indicator. The user can determine the current environmental parameters based on the target color displayed by the indicator and control the corresponding first device group through the control switch. For example, when the target control parameter is temperature, the indicator light displays blue, and the user can adjust the air conditioner temperature according to the control switch.
[0054] It is understandable that the specific way the control switch controls the corresponding first device group can be that the control switch generates instructions based on the control operation and feeds them back to the gateway, which then controls each device in the first device group. Alternatively, the control switch can cache the devices in the first device group as the currently controlled devices while updating the indicator light colors, and then directly control each device in the first device group based on the control operation. The specific method can be determined according to actual needs.
[0055] In addition to instructing users to control the first device group via a control switch, the gateway can also automatically adjust the first device group according to the optimization target indicated by the environmental indicators corresponding to the target parameters, without requiring user instruction, after the device group is determined.
[0056] Using the above methods, the gateway can automatically switch the target parameter after it returns to normal and no longer needs adjustment, and the indicator light on the control switch will also display the updated target parameter light color. For example, when the target parameter is temperature, the gateway automatically controls the air conditioner to adjust the temperature until it drops to 24°C, and then the gateway re-determines the target parameter as indoor brightness, and the indicator light on the control switch automatically switches from blue (indicating temperature) to red (indicating indoor brightness).
[0057] It should be noted that the structure and appearance design of the control switch and indicator light do not affect the application of the solution and can be set according to actual needs. This disclosure does not limit them. For example, the indicator light can be a color-changing light ring that uses a gradient to switch between different colors. The indicator light can also be multiple consecutive light segments displaying different colors, with color switching achieved by illuminating different light segments.
[0058] In the technical solution provided in this disclosure, the gateway achieves environmental perception by collecting environmental parameters through sensors. Combining the pre-set environmental indicators and priorities of each parameter, it automatically determines the target parameter for current control and instructs the indicator light of the control switch to display the corresponding color, thereby intuitively prompting the user to the target parameter for current control. By default, the control switch is switched to the first device group corresponding to the target parameter, simplifying the user's operation process from "checking status → switching mode / device → adjusting" to "looking at the color → adjusting". This allows the user to directly adjust the target parameter without thinking or actively switching, reducing the steps required for manual operation in complex smart home environments and significantly improving user experience and control efficiency.
[0059] In one possible implementation, the method also includes: Receives a mode switching command sent by the control switch, switches to control mode, and in control mode, the gateway receives control operations sent by the control switch and controls multiple smart home devices in at least one scene according to the control operations. The system receives the target control operation sent by the control switch, and determines the target smart home device and target working status corresponding to the target control operation from the pre-stored operation device mapping table. The operation device mapping table includes multiple control operations, and each control operation corresponds to the working status of at least one smart home device. For each target smart home device, instruct the target smart home device to switch its working state to the target working state.
[0060] Specifically, this disclosure also provides a control method for scene linkage using a control switch in the control mode of the gateway. When the gateway is in control mode, the control switch responds to the control operation and controls multiple smart home devices in at least one scene according to the control operation, thereby realizing the switching between different scenes and the control of different devices in one scene.
[0061] Users can switch the gateway to control mode by triggering a control switch. The control switch responds to the user's trigger action (such as pressing a button on the switch), generating and sending a mode switching command to the gateway. Upon receiving the command, the gateway switches to control mode. Alternatively, if the gateway is equipped with a control panel or app, users can also switch the gateway to control mode via the control panel or app.
[0062] The gateway pre-stores a mapping table of operating devices used in the control mode. The operating device mapping table is pre-set by the manufacturer or user and includes multiple control operations. Each control operation corresponds to the working status of at least one smart home device. The devices and working status of the devices in different control operations are not exactly the same.
[0063] Control operations refer to interactive behaviors performed by users on control switches that can be recognized by the gateway, such as physical button operations and rotation angle operations. Different control operations can be distinguished by different buttons pressed, the number of times they are pressed, or the angle of knob rotation, and can be set according to actual needs.
[0064] The gateway receives the target control operation sent by the control switch, determines the device corresponding to the target control operation from the pre-stored operation device mapping table as the target smart home device (hereinafter referred to as the target device), and determines the target working status of the target device.
[0065] For each target device, a device control command is generated based on the target operating state and sent to the target device to instruct the target device to switch its operating state to the target operating state.
[0066] Understandably, the preset environmental indicators and priorities for each environmental parameter, as well as the operation device mapping table, are cached in the gateway's Flash memory. Since Flash is a non-volatile memory, the gateway can achieve local direct connection with the control switch and devices. Even if the network is disconnected, the gateway can still operate normally, reducing the response time in the cloud and having the advantages of localized low-latency communication, availability even when the network is disconnected, and smooth response.
[0067] The technical solution provided in this disclosure offers a flexible scene-linked control mechanism. An operation device mapping table is pre-set in the gateway, mapping and binding the control operations of control switches with devices and their operating states. This allows users to trigger multiple devices to switch to their corresponding target operating states simultaneously with a single control operation when the gateway is in control mode, enabling rapid switching between scenes or precise control of devices within a scene. Unlike methods that control only a single device at a time, this achieves collaborative control of multiple devices, meeting users' personalized and convenient operation needs for complex smart home scenarios and effectively improving control efficiency.
[0068] In one possible implementation, the control modes include a first mode and a second mode; In the first mode, all smart home devices corresponding to control operations in the operation device mapping table belong to the same scenario, but the smart home devices and their working states are not completely the same for different control operations. In the second mode, each control operation in the device mapping table corresponds to all smart home devices in a scenario. Different control operations correspond to different scenarios, and the smart home devices and their working states are not entirely the same in different scenarios.
[0069] Specifically, in this embodiment of the present disclosure, the control modes of the gateway include a first mode and a second mode, wherein the first mode is used for fine control of devices within a scene, and the second mode is used to switch between scenes.
[0070] In the first mode, all smart home devices corresponding to control operations in the operation device mapping table belong to the same scenario, but the smart home devices and their working states are not exactly the same for different control operations.
[0071] Understandably, manufacturers can pre-provide multiple templates for fine-grained control of devices within a given scenario. Users can then generate an operation device mapping table within a fixed scenario using templates or personalized settings.
[0072] For example, the manufacturer provides four templates for a single scene. Template A provides the function of gradually turning on all devices in the scene according to their location from one side of the room to the other. Template B provides the function of turning on all devices in the scene in turn according to their location from one side of the room to the other. Template C provides the function of gradually turning on all devices in the scene according to their location from the center to the outside. Template D provides the function of turning on all devices in the scene in turn according to their location from the center to the outside.
[0073] Control operation refers to the interactive behavior performed by the user on the control switch that can be recognized by the gateway, such as physical button operation and rotation angle operation. In this embodiment of the disclosure, the control switch is a rotary switch, including a stepless knob, button A and button B, wherein button A indicates that the gateway enters the first mode and button B indicates that the gateway enters the second mode.
[0074] The whole-house lighting includes 10 downlights installed in 5 columns of 2 each. If the user selects to apply template B to the lighting scene, the generated operation mapping table includes 5 control operations. Each control operation refers to a corresponding angle range (the stepless knob supports stepless adjustment from 0 to 360°, with each 72° corresponding to an angle range). Control operations 1-5 correspond to lighting up the downlights in columns 1-5 numbered sequentially from left to right in the room (e.g., control operation 2 lights up the downlights in column 2, while the downlights in the other columns are not lit).
[0075] The user first presses knob A to instruct the gateway to enter the first mode, then rotates the stepless knob. The control switch receives the rotation angle of the stepless knob and sends the angle as a control operation to the gateway. Based on the received angle, the gateway determines which range the angle falls within according to a pre-stored operation device mapping table, and instructs the corresponding downlight to light up within that range. The user can achieve continuous sequential switching and reverse switching between different control operations by rotating the stepless knob.
[0076] In addition to the control implemented based on the templates provided by the manufacturer, users can also customize the devices and their operating states corresponding to each control operation in the device mapping table. Furthermore, the specific structure and control method of the control switch described above serve as an exemplary example to aid in the explanation of the steps in this disclosure embodiment. Besides this, other forms of control switches can be designed according to actual needs, and this disclosure embodiment does not limit such designs.
[0077] In the second mode, each control operation in the device mapping table corresponds to all smart home devices in a scenario. Different control operations correspond to different scenarios, and the smart home devices and their working states are not entirely the same in different scenarios.
[0078] Understandably, in the second mode, users can switch between different scenarios through control operations. The devices and their operating states within each scenario can be configured according to the user's needs. For example, users can set a corresponding scenario for each control operation (1-5), and switch between different scenarios through different control operations.
[0079] It should be noted that when the control switch includes a stepless button, since the angle of the stepless knob can be infinitely adjusted and supports reverse rotation, users can use the stepless knob to achieve fine-grained control of the linkage of various devices in the same scenario when the gateway is in the first mode, breaking through the limitations of the inherent scenario and providing users with hierarchical control functions, or to achieve continuous switching between different scenarios when the gateway is in the second mode.
[0080] The technical solutions provided in this disclosure include a first mode and a second mode, which are respectively applied to device control within a single scenario and switching between different scenarios. This satisfies users' diverse needs for precise device management and one-click scenario switching, and differs from a single control logic, thus improving the convenience and control efficiency of smart home use.
[0081] In one possible implementation, for each target smart home device, the operating state of the target smart home device is instructed to switch to the target operating state, and then the following is also included: Receive the execution results from each target smart home device, and determine whether the corresponding target smart home device has executed successfully based on the execution results; If N target smart home devices are confirmed to have successfully executed the command, the indicator light on the control switch will flash N times according to the first color representing successful execution, where N is a positive integer.
[0082] Specifically, this disclosure also provides a technical solution whereby an indicator light provides feedback on the execution status of the control operation after the gateway responds to the control operation of the control switch and indicates that the working state of the target device has switched to the target working state.
[0083] Since each control operation corresponds to one or more target devices, for each target device, after the gateway instructs the device to switch its operating state to the target operating state, the device sends an execution result back to the gateway. The gateway receives the execution result from the target device, determines whether the target device has executed successfully based on the result, and records the number of target devices that have executed successfully.
[0084] If N target devices are confirmed to have executed successfully, the indicator light of the control switch will flash N times according to the first color representing successful execution, where N is a positive integer. The first color representing successful execution can be set according to actual needs.
[0085] For example, the control switch is a rotary switch, including a stepless knob and an indicator light. The stepless knob supports stepless adjustment of the whole house lights from 0 to 360°. The whole house includes multiple lights, and each 10° rotation indicates that one more light will be lit until all the lights are lit.
[0086] When the user rotates the knob from 0 to 30°, three lights illuminate, and the indicator light displays blue (the first color for successful execution) and flashes three times. When the user rotates the knob from 30° to 50°, two more lights illuminate, and the indicator light displays blue and flashes twice. When the user rotates the knob from 50° to 0, all five lights turn off, and the indicator light displays blue and flashes five times.
[0087] It is understandable that, in the above example, successful execution of the target device means switching the target device from another state to the target state. If the target device is already in the target state and does not need to be switched, it is not considered a successful execution. In addition, based on actual needs, it can be determined that as long as the target device's state matches the target state, no switching is required, which is also considered a successful execution. For example, when the user rotates the knob from 30° to 50°, the indicator light will turn blue and flash 5 times.
[0088] The specific meaning of successful execution in the embodiments of this disclosure can also be limited to only including the target device switching from off to on, or only representing gear adjustment in the on state, etc., which can be determined according to actual needs.
[0089] The technical solution provided in this embodiment designs an indicator light feedback mechanism. The indicator light displays a first color representing successful execution, and the number of flashes corresponds to the number of devices that successfully executed the task. This visual feedback allows users to intuitively and accurately grasp the device response status.
[0090] In one possible implementation, the indicator light includes multiple light segments; For each target smart home device, the system instructs the target smart home device to switch its operating state to the target operating state, followed by: Receive the execution results from each target smart home device and determine whether the execution was successful based on the results; If at least one target device is determined to have failed, the failure type is determined, and the control switch corresponding light segment displays a second color indicating the failure, based on the failure type.
[0091] Specifically, this disclosure also provides a technical solution whereby an indicator light provides feedback on the execution status of the control operation after the gateway responds to the control operation of the control switch and indicates that the working state of the target device has switched to the target working state.
[0092] In this embodiment of the disclosure, the indicator light of the control switch includes multiple light segments, each of which can be lit or turned off individually. For example, the indicator light is a ring or strip of light composed of multiple light segments.
[0093] Since each control operation corresponds to one or more target devices, for each target device, after the gateway instructs the target device to switch its working state to the target working state, the target device sends the execution result back to the gateway.
[0094] The gateway receives the execution results from the target devices and determines whether the execution was successful based on the results. If at least one target device fails, the gateway identifies the failure type. The gateway pre-stores each failure type and maps it to a specific light segment. This mapping can be done in various ways, such as a one-to-one correspondence between light segments and failure types, or by mapping the number of lit light segments to the failure type.
[0095] If the gateway determines that at least one target device has failed to execute, it determines the failure type and determines the failure type indicator control switch corresponding light segment, so that the determined light segment displays a second color that represents the execution failure. The second color that represents the execution failure can be set according to actual needs.
[0096] For example, failure types can include: 1. Device offline; 2. Device malfunction; 3. Network congestion or delay; 4. Control logic conflict; 5. Parameter exceeding limits. The number of illuminated light segments corresponds to the failure type. When the failure type is determined to be 1, the indicator light displays one red segment (the second color representing execution failure).
[0097] When multiple target devices fail to execute and have different failure types, a switching method can be adopted, with each target device's failure type displayed in turn by an LED ring. For example, if two target devices have failure types 1 and 3 respectively, the indicator light will first display red with one light segment for 10 seconds, and then switch to displaying red with three light segments for 10 seconds.
[0098] It should be noted that the flashing of the indicator light and the illumination of the light segment are decoupled from each other and do not conflict with each other. If multiple target devices partially succeed and partially fail, the indicator light can simultaneously provide multi-dimensional feedback on the execution status of each device under the same control operation instruction. The execution result is fed back by a combination of "color (normal / abnormal) + number of flashes (number of successes) + illuminated light segment (failure type)".
[0099] For example, when the same control operation instructs 5 target devices, and 3 of them execute successfully while 2 fail with failure type 2, the indicator light will display purple (red and blue superimposed color) with 3 light segments or alternating red and blue with 3 light segments and flash 3 times.
[0100] The technical solution provided in this embodiment of the invention designs an indicator light feedback mechanism. The indicator light displays a second color that represents execution failure, and the number of lit light segments corresponds to the failure type. Through visual feedback, users can intuitively and accurately grasp the device response status and quickly understand the reason for execution failure.
[0101] Furthermore, compared to existing technologies where gateways only provide "success / failure" feedback, users cannot know which devices have successfully executed in multi-device linkage (e.g., lights are on but curtains are not moving in "home mode"), nor can they determine the cause of failure (e.g., device offline, parameter exceeding limits). The failure and success indicator feedback mechanism provided in this embodiment is decoupled from each other and does not conflict with each other. It can achieve multi-dimensional synchronous feedback, solving the problems of incomplete information transmission and opaque device execution status in existing feedback mechanisms.
[0102] In one possible implementation, the control switch includes a master switch and a slave switch; the method further includes: Upon receiving a coordination command, the gateway switches to coordination mode. In coordination mode, if the gateway receives a control operation sent by the master switch, it instructs the slave switch to respond to the control operation synchronously.
[0103] Specifically, this disclosure also provides a multi-button collaborative control method, wherein the control switch includes a master switch and slave switches. For example, one master switch and multiple slave switches.
[0104] Upon receiving a collaboration command, the gateway switches to collaboration mode. The collaboration command can be sent by the control switch triggered by the user, or, if the gateway is equipped with a control panel or app, the user can also switch the gateway to collaboration mode via the control panel or app.
[0105] In collaborative mode, the gateway supports a "master switch-slave switch" architecture. If the gateway receives a control operation sent by the master switch, it instructs the slave switch to respond to the control operation synchronously. The steps based on the control operation can be found in the description above, and will not be repeated here.
[0106] For example, the main switch in the living room can be set as the master switch, and the switch in the bedroom as the slave switch. In collaborative mode, the user controls the master switch to adjust the temperature, and the gateway, in addition to controlling the living room air conditioner to adjust the temperature, also synchronously controls the bedroom air conditioner to adjust the temperature accordingly (in collaborative mode, the gateway defaults to the slave switch responding to the same control operation as the master switch), thus achieving synchronization of the status of all devices in the house.
[0107] According to another aspect of the present disclosure, a control switch is provided, the control switch including an indicator light and a stepless knob; The control switch controls the indicator light to display the color of the gateway's indicator; The control switch obtains the rotation angle of the stepless knob and sends the angle as a control operation to the gateway. The gateway executes the steps of the control method described above for the control switch.
[0108] Specifically, the control switch provided in this embodiment is a rotary control switch, including a stepless knob and an indicator light. The stepless knob supports 360-degree infinite rotation, enabling continuous and smooth adjustment. The indicator light can display different colors to convey different information to the user. The specific structural design of the control switch can be determined according to actual needs.
[0109] In one possible implementation, the stepless knob and indicator light of the control switch in this embodiment of the disclosure can be real physical structures or can be simulated by a control panel.
[0110] When the control switch is used, it connects to the gateway and controls the indicator light to display the corresponding color according to the gateway's instructions. For example, the indicator light uses the RGB color mode to display different colors by changing and overlaying the three color channels: red (R), green (G), and blue (B).
[0111] The user rotates the control switch, which receives the angle of rotation of the stepless knob and sends the angle as a control operation to the gateway to control the corresponding device group of the target parameter indicated by the indicator light color.
[0112] Understandably, the control switch also has a precision threshold for the stepless knob, such as 5°. When the rotation angle of the stepless knob is ≥5°, the control switch sends a control operation to the gateway to filter out invalid signals caused by mechanical vibration, eliminate the slight fluctuations caused by hand tremors or unstable rotation when the user rotates the knob, reduce the processing burden on the gateway, and avoid sending erroneous redundant commands to the device.
[0113] In one possible implementation, the control switch may also include at least one button, which the user can press to switch the gateway to control mode. It is understood that the button can be independent of the stepless knob, or it can be combined with the button function on top of the stepless knob, allowing the user to perform the button function by pressing the stepless knob.
[0114] More specifically, at least one button can be set to distinguish between the first mode and the second mode, or the first mode and the second mode can be distinguished by the number of times a button is pressed in a short period of time or by the pressing method (such as long press or short press).
[0115] In one possible implementation, the indicator light consists of multiple light segments, each of which can be individually lit or turned off. The specific structural design of the indicator light can be determined according to actual needs.
[0116] The following example illustrates how indicator lights can be displayed. Figure 2 This is a schematic diagram of the structure of a control switch provided in an embodiment of the present disclosure, such as... Figure 2 As shown, the control switch 20 includes an indicator light 201 and a stepless knob 202. The indicator light 201 is a ring of 12 light segments.
[0117] If the gateway determines that N target devices have successfully executed the task, the gateway sends a command to the control switch to make the indicator lights flash N times according to the first color representing successful execution. That is, the 12 light rings in indicator light 201 simultaneously display the first color and flash N times.
[0118] If the gateway determines that at least one target device has failed and the failure type is M, the gateway sends a command to the control switch to illuminate M segments of the indicator light, displaying a second color representing the failure. That is, M segments in the indicator light ring 201 are illuminated sequentially, and the illuminated segments display the second color.
[0119] For example, Figure 3 This is a schematic diagram of a control switch application provided in an embodiment of the present disclosure, such as... Figure 3 As shown, when the user rotates the stepless knob from 20° to 90°, the control switch sends the angle as a control operation to the gateway. The gateway then sends instructions to each target device indicated by the angle, instructing the target device to switch to the target state.
[0120] After the gateway issues a command, a preset response time is set. If the gateway does not receive feedback from the target device (whether successful or failed) by the end of the preset response time, the execution result from the target device is determined to be "timeout without feedback," indicating execution failure with failure type 3: network congestion or delay. See again. Figure 3 The light segments in the light ring are lit in sequence, with three segments lighting up to display the second color.
[0121] The functions implemented by the control switch provided in this embodiment are described in the relevant description of the control method of the control switch implemented on the gateway side, and will not be repeated here.
[0122] In the field of intelligent control, the commonly used interaction technologies between rotary control switches and gateways can be mainly divided into the following three categories: (1) Single equipment adjustment technology Individual device parameters (such as light brightness or air conditioning temperature) can be directly adjusted by rotating a knob, while switching between controlled objects relies on physical buttons (such as short-pressing to switch between "lighting / air conditioning" modes). For example, a certain brand of smart knob connects to a gateway via the Zigbee protocol. When rotated, it sends a command for "brightness +10%" or "temperature -1℃", which the gateway directly forwards to the corresponding device.
[0123] (2) Fixed scene triggering technology Preset scenes (such as "Away Mode" or "Sleep Mode") can be triggered by long-pressing or double-clicking the knob button, and the scene logic is stored locally on the gateway. For example, after pressing the knob for 3 seconds, the gateway executes a fixed set of instructions to "turn off all lights + start the security system".
[0124] (3) Basic state feedback technology Some knobs are equipped with monochrome indicator lights that indicate the device's operating status by turning on / off / flashing (e.g., a flashing red light indicates the device is offline), but the indicator light color is not related to environmental parameters (temperature, light intensity, etc.).
[0125] Based on the above interaction methods, it can be seen that the commonly used interactive control methods between rotary switches and gateways have the following technical problems: (1) The environment and the controlled object are separated, and the operation steps are redundant. The knob cannot reflect environmental needs (such as excessively high temperature or insufficient light) through its own status. Users need to check the environmental data through the APP first, and then manually switch the control mode (such as switching from "temperature adjustment" to "light adjustment"). The operation process involves three steps: "check status → switch mode → adjust", which is inefficient.
[0126] (2) The scene linkage format is fixed and lacks continuous hierarchical control. The existing knob's "button + rotation" operation only supports fixed scene triggering (such as pressing the button and rotating to adjust only a single device), and cannot achieve continuous hierarchical linkage of devices within a scene (such as "rotating 10° to turn on 1 light, 20° to turn on 2 lights"), which is not flexible enough.
[0127] (3) The feedback mechanism is rudimentary and the execution status is not transparent. The gateway only reports "success / failure", and users cannot know which specific devices have succeeded in multi-device linkage (e.g., the lights are on but the curtains are not moving in "home mode"), nor can they determine the reason for failure (e.g., device offline, parameter exceeded).
[0128] The control switch and the control method of the control switch implemented with the gateway provided in this disclosure can effectively solve the above-mentioned technical problems.
[0129] According to another aspect of the present disclosure, a smart home device control system is provided, including: a gateway, a control switch, and at least one smart home device; The gateway executes the steps of the control method described above for the control switch.
[0130] Specifically, in this embodiment of the smart home device control system, there is a gateway, a control switch, and at least one smart home device. The number and type of the control switch and the smart home device can be set according to actual needs.
[0131] For example, Figure 4 This is a schematic diagram of the structure of a smart home device control system provided in an embodiment of this disclosure, such as... Figure 4 As shown, the smart home device control system includes multiple control switches and multiple smart furniture devices.
[0132] In addition, the gateway and control switch in the smart home device control system interact to control the smart home devices. For detailed steps, please refer to the relevant description of the control method of the control switch implemented on the gateway side, which will not be repeated here.
[0133] Figure 5 This is a schematic diagram of the structure of a gateway provided in an embodiment of the present disclosure, such as... Figure 5 As shown, gateway 50 includes: The parameter determination module 501 is used to receive multiple environmental parameters collected by the sensor, determine the target parameter to be adjusted from each environmental parameter according to the preset environmental indicators and priorities of each environmental parameter, and determine a first device group for adjusting the target parameter, wherein the first device group includes at least one smart home device. The indicator control module 502 is used to obtain and instruct the indicator light of the control switch to display the target color corresponding to the target parameter according to the pre-stored mapping relationship between environmental parameters and light colors, and at the same time make the control switch respond to the control operation, and control the first device group according to the control operation.
[0134] In one possible implementation, the gateway is also used for: Receives a mode switching command sent by the control switch, switches to control mode, and in control mode, the gateway receives control operations sent by the control switch and controls multiple smart home devices in at least one scene according to the control operations. The system receives the target control operation sent by the control switch, and determines the target smart home device and target working status corresponding to the target control operation from the pre-stored operation device mapping table. The operation device mapping table includes multiple control operations, and each control operation corresponds to the working status of at least one smart home device. For each target smart home device, instruct the target smart home device to switch its working state to the target working state.
[0135] In one possible implementation, the control modes include a first mode and a second mode; In the first mode, all smart home devices corresponding to control operations in the operation device mapping table belong to the same scenario, but the smart home devices and their working states are not completely the same for different control operations. In the second mode, each control operation in the device mapping table corresponds to all smart home devices in a scenario. Different control operations correspond to different scenarios, and the smart home devices and their working states are not entirely the same in different scenarios.
[0136] In one possible implementation, for each target smart home device, the operating state of the target smart home device is instructed to switch to the target operating state, and then the following is also included: Receive the execution results from each target smart home device, and determine whether the corresponding target smart home device has executed successfully based on the execution results; If N target smart home devices are confirmed to have successfully executed the command, the indicator light on the control switch will flash N times according to the first color representing successful execution, where N is a positive integer.
[0137] In one possible implementation, the indicator light includes multiple light segments; For each target smart home device, the system instructs the target smart home device to switch its operating state to the target operating state, followed by: Receive the execution results from each target smart home device and determine whether the execution was successful based on the results; If at least one target device is determined to have failed, the failure type is determined, and the control switch corresponding light segment displays a second color indicating the failure, based on the failure type.
[0138] In one possible implementation, the control switch includes a master switch and a slave switch; the method further includes: Upon receiving a coordination command, the gateway switches to coordination mode. In coordination mode, if the gateway receives a control operation sent by the master switch, it instructs the slave switch to respond to the control operation synchronously.
[0139] The gateway in this embodiment can execute the methods provided in this embodiment, and their implementation principles are similar. The actions performed by each module in each embodiment of this disclosure correspond to the steps in the methods of each embodiment of this disclosure. For detailed functional descriptions of the modules, please refer to the descriptions in the corresponding methods shown above, which will not be repeated here.
[0140] This disclosure provides an electronic device (computer device / equipment / system) including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the method provided in any optional embodiment of this disclosure, and provides a flexible scene linkage control mechanism. An operation device mapping table is pre-set in the gateway, mapping and binding the control operations of control switches with devices and their operating states. This allows users to trigger multiple devices to switch to their corresponding target operating states simultaneously through a single control operation when the gateway is in control mode, achieving rapid switching between scenes or fine control of devices within a scene. Unlike methods that control only a single device at a time, this achieves collaborative control of multiple devices, meeting users' personalized and convenient operation needs for complex smart home scenarios, and effectively improving control efficiency.
[0141] In one alternative embodiment, an electronic device is provided. Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 6 As shown, the electronic device 60 includes a processor 601 and a memory 603. The processor 601 and the memory 603 are connected, for example, via a bus 602. Optionally, the electronic device 60 may further include a transceiver 604, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 604 is not limited to one type, and the structure of the electronic device 60 does not constitute a limitation on the embodiments of this disclosure.
[0142] Processor 601 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logic blocks, modules, and circuits described in connection with this disclosure. Processor 601 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0143] Bus 602 may include a pathway for transmitting information between the aforementioned components. Bus 602 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 602 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0144] The memory 603 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0145] The memory 603 is used to store computer programs that execute embodiments of the present disclosure, and the execution is controlled by the processor 601. The processor 601 is used to execute the computer programs stored in the memory 603 to implement the steps shown in the foregoing method embodiments.
[0146] The electronic devices in this disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable devices, and fixed terminals such as digital TVs and desktop computers.
[0147] This disclosure provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0148] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments. Compared with the prior art, it provides a flexible scene linkage control mechanism. An operation device mapping table is pre-set in the gateway, mapping and binding the control operations of control switches with devices and their operating states. This allows users to trigger multiple devices to switch to their corresponding target operating states simultaneously through a single control operation when the gateway is in control mode, achieving rapid switching between scenes or precise control of devices within a scene. Unlike methods that control only a single device at a time, this achieves collaborative control of multiple devices, meeting users' personalized and convenient operation needs for complex smart home scenarios and effectively improving control efficiency.
[0149] It should be noted that the computer-readable storage medium described above in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, gateway, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0150] In this disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used or combined with an instruction execution system, gateway, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.
[0151] Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit programs for use by or in connection with an instruction execution system, gateway, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0152] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0153] The terms “first,” “second,” “third,” “fourth,” “1,” “2,” etc. (if present) in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in a sequence other than that shown in the figures or text.
[0154] It should be understood that although arrows indicate various operation steps in the flowcharts of the embodiments of this disclosure, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of the embodiments of this disclosure, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on the actual implementation scenario. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of this disclosure do not limit this.
[0155] The above description is only an optional implementation method for some implementation scenarios of this disclosure. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this disclosure, without departing from the technical concept of this disclosure, also fall within the protection scope of the embodiments of this disclosure.
Claims
1. A control method for a control switch, characterized in that, Applied to a gateway, the method includes: The system receives multiple environmental parameters collected by sensors, determines the target parameter for current adjustment from each environmental parameter based on the preset environmental indicators and priorities of each environmental parameter, and determines a first device group for adjusting the target parameter, wherein the first device group includes at least one smart home device. Based on the pre-stored mapping relationship between environmental parameters and light colors, the indicator light of the control switch is obtained and instructed to display the target color corresponding to the target parameter. At the same time, the control switch is made to respond to the control operation, and the first device group is controlled according to the control operation.
2. The method according to claim 1, characterized in that, The method further includes: The gateway receives a mode switching command sent by the control switch, switches to the control mode, and in the control mode receives a control operation sent by the control switch, and controls multiple smart home devices in at least one scene according to the control operation. The system receives a target control operation sent by the control switch and determines the target smart home device and target working status corresponding to the target control operation from a pre-stored operation device mapping table. The operation device mapping table includes multiple control operations, and each control operation corresponds to the working status of at least one smart home device. For each target smart home device, instruct the target smart home device to switch its working state to the target working state.
3. The method according to claim 2, characterized in that, The control modes include a first mode and a second mode; In the first mode, all smart home devices corresponding to control operations in the operation device mapping table belong to the same scenario, and the smart home devices corresponding to different control operations and the working states of the smart home devices are not completely the same. In the second mode, each control operation in the operation device mapping table corresponds to all smart home devices in a scenario. Different control operations correspond to different scenarios, and the smart home devices included in different scenarios and the working states of the smart home devices are not completely the same.
4. The method according to claim 2 or 3, characterized in that, For each target smart home device, the process involves instructing the target smart home device to switch its operating state to the target operating state, followed by: Receive the execution result from each target smart home device, and determine whether the corresponding target smart home device has executed successfully based on the execution result; If N target smart home devices are confirmed to have successfully executed the command, the indicator light of the control switch is instructed to flash N times in the first color that indicates successful execution, where N is a positive integer.
5. The method according to claim 2 or 3, characterized in that, The indicator light includes multiple light segments; For each target smart home device, the process involves instructing the target smart home device to switch its operating state to the target operating state, followed by: Receive the execution result from each target smart home device, and determine whether the execution was successful based on the execution result; If at least one target device is determined to have failed, the failure type is determined, and the control switch corresponding light segment displays a second color indicating the failure, based on the failure type.
6. The method according to any one of claims 1-3, characterized in that, The control switch includes a master switch and a slave switch; the method further includes: Upon receiving a coordination command, the gateway switches to coordination mode. In coordination mode, if the gateway receives a control operation sent by the master switch, it instructs the slave switch to synchronously respond to the control operation.
7. A control switch, characterized in that, The control switch includes an indicator light and a stepless knob; The control switch controls the indicator light to display the color of the gateway's indication; The control switch acquires the rotation angle of the stepless knob and sends the angle as a control operation to the gateway. When the gateway is executed, it implements the steps of the method according to any one of claims 1-6.
8. A smart home device control system, characterized in that, include: A gateway, a control switch, and at least one smart home device; When the gateway is executed, it implements the steps of the method according to any one of claims 1-6.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.