Gateway, cloud server and central air conditioner control method
The system addresses the challenge of controlling multiple air conditioners by storing relationships in a cloud server and gateway, ensuring accurate routing of control instructions to central air conditioning gateways for efficient management.
Patent Information
- Application Number
- CN202310741915.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-20
- Publication Date
- 2024-12-20
AI Technical Summary
Existing central air conditioning systems face challenges in controlling multiple air conditioners through a central air conditioning gateway, as direct connections between the gateway and air conditioners result in ineffective command transmission.
A system that stores the relationship between air conditioners and central air conditioning gateways in a cloud server and gateway, enabling the cloud server to determine the correct gateway for control instructions and send them to the appropriate central air conditioning gateway for automated control.
Enables effective control of multiple air conditioners by ensuring that control instructions are accurately routed to the correct central air conditioning gateway, facilitating seamless communication and management of air conditioner states.
Smart Images

Figure CN119172188A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication network technology, and in particular to a gateway, a cloud server and a central air-conditioning control method. Background Art
[0002] In the field of smart home, a system of smart home, gateway, cloud and mobile phone will be formed to realize the control of smart home, with direct connection between smart home and gateway, gateway and cloud, and cloud and mobile phone. The specific control process of functional home is that when the user issues a control command to the air conditioner through the mobile phone app, the control command is uploaded to the cloud, the cloud sends it to the gateway, and the gateway sends the control command to the air conditioner.
[0003] However, for central air conditioning, there will be a central air conditioning gateway, which controls multiple air conditioners. If the gateway is directly connected to the air conditioner according to the existing technology, the gateway will directly send the control command to control the air conditioner after receiving it. The central air conditioner is controlled by the central air conditioning gateway, so the command sent cannot control the air conditioner. Summary of the invention
[0004] The present invention provides a gateway, a cloud server and a central air-conditioning control method, which can store the relationship between the air conditioner and the central air-conditioning gateway in the cloud server and the gateway, so that when controlling the air conditioner controlled by the central air-conditioning gateway, the relationship can be found and a control instruction can be sent to the corresponding central air-conditioning gateway to realize automatic control of the air conditioner controlled by the central air-conditioning gateway.
[0005] In a first aspect, an embodiment of the present invention provides a gateway, including: a communication unit and a processor;
[0006] The communication unit is used to receive control information sent by the cloud server; wherein the control information includes an instruction and a subject of the instruction; the instruction is sent by the terminal to the cloud server; when the cloud server determines that the device type of the device to be controlled in the instruction is an air conditioner, based on the relationship between the air conditioner and the central air conditioning gateway, it determines the central air conditioning gateway bound to the device to be controlled; from a plurality of subjects of the central air conditioning gateway bound to the device to be controlled, the subject of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected as the subject of the instruction;
[0007] Sending the control instruction to the central air-conditioning gateway bound to the device to be controlled, so that the central air-conditioning gateway can control the device to be controlled based on the control instruction;
[0008] The processor is used to determine the central air-conditioning gateway bound to the device to be controlled according to the relationship between the air conditioner and the central air-conditioning gateway if the subject of the control information is subscribed by itself and the instruction is a control instruction.
[0009] The above-mentioned gateway can store the relationship between the air conditioner and the central air conditioning gateway in the cloud server and the gateway. After the cloud server receives the instruction from the terminal, it finds the topic based on the relationship between the air conditioner and the central air conditioning gateway, and sends the instruction to the gateway subscribed to the topic. The gateway sends the instruction to the corresponding central air conditioning gateway based on the relationship between the air conditioner and the central air conditioning gateway to realize automatic control of the air conditioner.
[0010] In a possible implementation manner, the processor is further configured to:
[0011] If the subject of the control information is subscribed by itself, and the instruction is a deletion instruction, then when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioner, the relationship between the device to be controlled and the central air conditioning gateway bound to the device to be controlled is deleted; when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioning gateway, the relationship between the device to be controlled is deleted;
[0012] If the subject of the control information is subscribed by itself and the instruction is an add instruction, query information is sent to the device to be controlled in the add instruction, and the relationship between the newly added air conditioner and the central air conditioning gateway sent by the device to be controlled in the add instruction is received and saved.
[0013] The above-mentioned gateway can modify the relationship between the air conditioner and the central air conditioning gateway in the cloud and gateway by sending a deletion command or an addition command through the user, and provides an entry for modifying the relationship.
[0014] In a possible implementation manner, the processor is further configured to:
[0015] After connecting to the central air conditioning gateway, obtain the device information of the central air conditioning gateway;
[0016] According to the device information of the central air conditioning gateway, multiple topics of the central air conditioning gateway are determined;
[0017] The multiple topics of the central air conditioning gateway are used as the topics subscribed by itself, and the multiple topics of the central air conditioning gateway of the cloud server are notified as the topics subscribed by itself.
[0018] The above-mentioned gateway can obtain the device information of the central air-conditioning gateway after the gateway is connected to the central air-conditioning gateway, thereby establishing multiple themes of the central air-conditioning gateway based on the device information, so as to automatically control the air conditioner and the central air-conditioning gateway based on multiple themes.
[0019] In a possible implementation, the processor is further used to: receive status information sent by the central air-conditioning gateway bound to the device to be controlled; wherein the status information includes: the mac address and product id of the central air-conditioning gateway bound to the device to be controlled, the mac address, product id and status value of the air conditioner connected to the central air-conditioning gateway bound to the device to be controlled; the status value of the air conditioner connected to the central air-conditioning gateway bound to the device to be controlled is the status value of the device to be controlled after the central air-conditioning gateway bound to the device to be controlled controls the device to be controlled based on the control instruction;
[0020] The status information sent by the central air conditioning gateway bound to the device to be controlled is sent to the cloud server.
[0021] The above-mentioned gateway can, after the air conditioner changes its state, the air conditioner reports its own state to the central air conditioning gateway, and the central air conditioning gateway reports the state information to the gateway, which then reports it to the cloud, so that the cloud can clearly know the state of the central air conditioning gateway and the air conditioner connected to the central air conditioning gateway. This makes the logical relationship of the air conditioner clearer in the cloud server, which is convenient for subsequent maintenance and installation of the air conditioner.
[0022] In a second aspect, an embodiment of the present invention provides a cloud server, including: a processor and a communication unit;
[0023] The communication unit is used to receive an instruction sent by a terminal; send the control information to a gateway that subscribes to the subject of the instruction, so that the gateway processes the control information;
[0024] The processor is used for determining the central air-conditioning gateway bound to the device to be controlled according to the relationship between the air-conditioning and the central air-conditioning gateway if the device type of the device to be controlled in the instruction is an air-conditioner; and selecting the theme of the central air-conditioning gateway bound to the device to be controlled corresponding to the type of the instruction from the multiple themes of the central air-conditioning gateway bound to the device to be controlled, and using the selected theme as the theme of the instruction.
[0025] In a possible implementation manner, the processor is further configured to:
[0026] If the instruction is a delete instruction, the relationship between the device to be controlled and the central air-conditioning gateway bound to the device to be controlled is deleted;
[0027] If the device type of the device to be controlled in the instruction is a central air conditioning gateway, and the instruction is a delete instruction, the relationship of the device to be controlled is deleted, and the topic of the device to be controlled corresponding to the type of the instruction is selected from the multiple topics of the device to be controlled, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction, so that the gateway processes the control information.
[0028] In a third aspect, an embodiment of the present invention provides a central air conditioning control system, including:
[0029] The terminal is used to receive the instruction triggered by the user and send the instruction to the cloud server;
[0030] A cloud server is used to receive instructions sent by a terminal; if the device type of the device to be controlled in the instruction is an air conditioner, then according to the relationship between the air conditioner and the central air conditioning gateway, determine the central air conditioning gateway bound to the device to be controlled; and from multiple topics of the central air conditioning gateway bound to the device to be controlled, select the topic of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction, and use the selected topic as the topic of the instruction; generate control information according to the topic of the instruction and the instruction, and send the control information to the gateway subscribed to the topic of the instruction;
[0031] The gateway is used to receive the control information sent by the cloud server; if the subject of the control information is subscribed by itself and the instruction is a control instruction, the central air-conditioning gateway bound to the device to be controlled is determined according to the relationship between the air conditioner and the central air-conditioning gateway; and the control instruction is sent to the central air-conditioning gateway bound to the device to be controlled;
[0032] The central air conditioning gateway is used to receive the control instruction sent by the gateway and control the device to be controlled based on the control instruction.
[0033] In a fourth aspect, an embodiment of the present invention provides a central air conditioning control method, which is applied to a gateway, including:
[0034] Receive control information sent by a cloud server; wherein the control information includes an instruction and a subject of the instruction; the instruction is sent by a terminal to the cloud server; when the cloud server determines that the device type of the device to be controlled in the instruction is an air conditioner, based on the relationship between the air conditioner and the central air conditioning gateway, determine the central air conditioning gateway bound to the device to be controlled; from a plurality of subjects of the central air conditioning gateway bound to the device to be controlled, the subject of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected as the subject of the instruction;
[0035] If the subject of the control information is subscribed by itself and the instruction is a control instruction, the central air-conditioning gateway bound to the device to be controlled is determined according to the relationship between the air conditioner and the central air-conditioning gateway; the control instruction is sent to the central air-conditioning gateway bound to the device to be controlled, so that the central air-conditioning gateway can control the device to be controlled based on the control instruction.
[0036] In one possible implementation, the method further includes:
[0037] If the subject of the control information is subscribed by itself, and the instruction is a deletion instruction, then when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioner, the relationship between the device to be controlled and the central air conditioning gateway bound to the device to be controlled is deleted; when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioning gateway, the relationship between the device to be controlled is deleted;
[0038] If the subject of the control information is subscribed by itself and the instruction is an add instruction, query information is sent to the device to be controlled in the add instruction, and the relationship between the newly added air conditioner and the central air conditioning gateway sent by the device to be controlled in the add instruction is received and saved.
[0039] In a fifth aspect, an embodiment of the present invention provides a central air conditioning control method, which is applied to a cloud server, comprising:
[0040] Receiving instructions sent by the terminal;
[0041] If the device type of the device to be controlled in the instruction is an air conditioner, the central air-conditioning gateway bound to the device to be controlled is determined according to the relationship between the air conditioner and the central air-conditioning gateway; and the topic of the central air-conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected from the multiple topics of the central air-conditioning gateway bound to the device to be controlled, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction, so that the gateway processes the control information. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of an air conditioning control system provided by an embodiment of the present invention;
[0043] Figure 2 A schematic diagram of a gateway obtaining device information of a central air conditioning gateway provided by an embodiment of the present invention;
[0044] Figure 3 A flowchart of a method for remotely controlling an air conditioner by a terminal provided in an embodiment of the present invention;
[0045] Figure 4A schematic diagram of a user controlling an air conditioner via a mobile phone provided in an embodiment of the present invention;
[0046] Figure 5 A schematic diagram of a process interaction for a user to control an air conditioner through a mobile phone provided by an embodiment of the present invention;
[0047] Figure 6 A schematic diagram of reporting status information after an air conditioner changes state provided by an embodiment of the present invention;
[0048] Figure 7 A flowchart of a user deleting an air conditioner provided in an embodiment of the present invention;
[0049] Figure 8 A schematic diagram of an interaction for a user to delete an air conditioner provided in an embodiment of the present invention;
[0050] Fig. 9 A flowchart of a user deleting a central air conditioning gateway provided by an embodiment of the present invention;
[0051] Fig.10 An interactive diagram for a user to delete a central air conditioning gateway provided by an embodiment of the present invention;
[0052] Fig.11 A flowchart of adding a connected air conditioner to a central air conditioning gateway provided by an embodiment of the present invention;
[0053] Fig.12 An interactive diagram of adding a connected air conditioner to a central air conditioner gateway provided by an embodiment of the present invention;
[0054] Fig.13 A flow chart of a device accessing a network applied to a gateway provided by an embodiment of the present invention;
[0055] Fig.14 A flow chart of a central air conditioning control method provided by an embodiment of the present invention;
[0056] Fig.15 A flow chart of another central air conditioning control method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. The terms "first" and "second" are used for descriptive purposes only and should not be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features.
[0058] Combination Figure 1As shown, the control system proposed by the present invention includes a cloud server 100, a terminal 101, a gateway 102, and multiple central air conditioning gateways. Taking the central air conditioning gateway 103 as an example, the gateway 102 and the central air conditioning gateway 103 are directly connected, and the zigbee protocol is used for communication. The gateway 102 and the cloud server 101 communicate through a wireless network. The air conditioners controlled by the central air conditioning gateway 103 are air conditioners 1 and 2.
[0059] Among them, the terminal 101 is connected to the cloud server 100 through the network; the gateway 102 is connected to the cloud server 100 through the network, the gateway 102 and the central air conditioning gateway 103 communicate through the zigbee protocol; the central air conditioning gateway 103 and the air conditioner 1 and the air conditioner 2 are connected through the communication interface.
[0060] First, the gateway 102 is powered on, and then connected to the cloud server 100, and the central air-conditioning gateway 103 is powered on. The central air-conditioning gateway 103 and the gateway 102 are connected via a network cable through a communication interface; since the gateway 102 is powered on, the central air-conditioning gateway 103 is powered on, and the central air-conditioning gateway 103 and the gateway 102 are connected via a network cable, the central air-conditioning gateway 103 can communicate with the gateway 102;
[0061] Combination Figure 2 As shown, when the central air conditioning gateway 103 and the gateway 102 are connected, the gateway 102 sends query information to the central air conditioning gateway 103. After the central air conditioning gateway 103 receives the query information, the central air conditioning gateway 103 forms device information with the device ID of the central air conditioning gateway 103, the mac address of the central air conditioning gateway 103, the mac address of the air conditioner 1 connected to the central air conditioning gateway 103, the product id of the air conditioner 1, the status value of the air conditioner 1, the mac address of the air conditioner 2 connected to the central air conditioning gateway 103, the product id of the air conditioner 2, and the status value of the air conditioner 2, and the device information of the central air conditioning gateway 103 is sent to the gateway 102. Among them, after the central air conditioning gateway 103 is powered on and the air conditioners 1 and 2 connected to the central air conditioning gateway 103 are powered on, the air conditioner 1 connected to the central air conditioning gateway 103 reports its own status value to the central air conditioning gateway 103, and the air conditioner 2 connected to the central air conditioning gateway 103 reports its own status value to the central air conditioning gateway 103.
[0062] The gateway 102 stores the information of the air conditioning gateway of the device ID of the central air conditioning gateway 103 in a pre-established hash table, wherein the hash table of the gateway 102, as shown in Table 1, includes:
[0063] Table 1
[0064]
[0065] That is, the central air conditioning gateway 103 has a relationship with air conditioner 1, and the central air conditioning gateway 103 has a relationship with air conditioner 2. At the same time, the mac address and product id of the central air conditioning gateway 103, the mac address, product id, and status value of air conditioner 1 and air conditioner 2 are recorded. Among them, the product ids of air conditioner 1 and air conditioner 2 connected to the central air conditioning gateway 103 are the same product id.
[0066] At the same time, the gateway 102 generates a corresponding ptp_id based on this ID, and uses this ptp_id to generate a topic corresponding to the central air-conditioning gateway that needs to interact with the cloud server, such as devices_topic, search_topic, new_topic, delete_topic, sync_topic, set_topic, left_topic, optresult_topic, public_topic, keepalive_topic, and stopsearch_topic.
[0067] The gateway 102 uses various topics of the central air conditioning gateway 103, namely, devices_topic, search_topic, new_topic, delete_topic, sync_topic, set_topic, left_topic, optresult_topic, public_topic, keepalive_topic, and stopsearch_topic, as topics to which it subscribes.
[0068] The gateway 102 sets a connection flag con_4vrvgw, and the callback can be made only when the gateway 102 is connected to the cloud server 100, that is, when the connection flag con_4vrvgw = 1. The gateway 102 can perform logical processing on the delete topic, set topic, and public topic in the callback.
[0069] Gateway 102 performs the following logical processing in delete_topic:
[0070] Decode device deletion information. The message format includes message id, device mac, device product id and device information (including device deviceid). According to the product id, determine whether the currently acquired device information is air conditioning device information or air conditioning gateway device information. If it is air conditioning device information, delete the air conditioning with this deviceid from the air conditioning device table tbl_vrvac, and delete the query relationship related to the air conditioning device with this deviceid; delete the air conditioning information with this deviceid from the air conditioning device hash table device_map, and delete the air conditioning address information with this deviceid from the air conditioning address hash table addr_map. If it is air conditioning gateway device information, delete the air conditioning gateway device with this ID from the air conditioning gateway device hash table VRVgw_device_map, delete the information of all air conditioning devices with the same connection address con_addr as the air conditioning gateway ID from the air conditioning device hash table device_map and the air conditioning address hash table addr_map, delete all query status data under the air conditioning gateway with this ID, delete all air conditioning devices with the same connection address con_addr as the air conditioning gateway ID from the air conditioning device table tbl_vrvac, and use it together with left_topic.
[0071] Gateway 102 performs the following logical processing in public_topic:
[0072] Get device information, traverse the device list hash table deviceList_map, in deviceList_map, only traverse the central air conditioning gateway and air conditioner, encode the device information reported to the cloud server, the reported information includes the device's mac address, product id, and callback devices_topic.
[0073] Synchronize status information, traverse the device list hash table deviceList_map, only traverse the central air conditioning gateway and air conditioner, encode the synchronization status information reported to the server, the information includes the device's mac address, product id, specific status values, and call back sync_topic.
[0074] That is, the gateway 102 can report the information of the central air conditioning gateway and the air conditioner connected to the central air conditioning gateway to the cloud server 100.
[0075] Gateway 102 performs logical processing in set_topic:
[0076] Decode the device setting parameters, including the device's MAC address, product ID, and specific setting values. Encode the device operation results and call back optsesult_topic to control the air conditioner. This includes controlling the air conditioner's power on / off (on / off), temperature (temperature range), working mode (cooling / heating / dehumidification / ventilation), wind speed (high / medium / low / automatic), wind direction (level), and controlling the air conditioner's power on / off.
[0077] Gateway 102 generates the topics (topics) corresponding to the central air-conditioning gateway that needs to interact with the cloud server using the ptp_id of the central air-conditioning gateway 103, such as devices_topic, search_topic, new_topic, delete_topic, sync_topic, set_topic, left_topic, optresult_topic, public_topic, keepalive_topic, and stopsearch_topic, and reports them to the cloud server 100, and informs the cloud server 100 that the above-mentioned topics are subscribed by the gateway 102.
[0078] The gateway 102 also includes reporting the device information of the central air-conditioning gateway 103 to the cloud server 100, that is, reporting the device ID of the central air-conditioning gateway 103, the mac address of the central air-conditioning gateway 103, the mac address of the air-conditioning 1 connected to the central air-conditioning gateway 103, the product id of the air-conditioning 1, the status value of the air-conditioning 1, the mac address of the air-conditioning 2 connected to the central air-conditioning gateway 103, the product id of the air-conditioning 2, and the status value of the air-conditioning 2 to the cloud server 100. The cloud server 100 saves the above device information as shown in Table 1.
[0079] When the gateway 102 is connected to the cloud server 100, the central air conditioning gateway 103 is connected to the gateway 102, and the terminal 101 is connected to the cloud server 100, Figure 3 As shown, the embodiment of the present invention provides a method for a user to control an air conditioner connected to a central air conditioner gateway 103, including:
[0080] S300: The terminal receives the instruction triggered by the user and sends the instruction to the cloud server;
[0081] S301: The cloud server receives the instruction sent by the terminal; if the device type of the device to be controlled in the instruction is an air conditioner, the central air conditioning gateway bound to the device to be controlled is determined according to the relationship between the air conditioner and the central air conditioning gateway; and from the multiple topics of the central air conditioning gateway bound to the device to be controlled, the topic of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction;
[0082] Among them, the various topics of the central air conditioning gateway bound to the device to be controlled are devices_topic, search_topic, new_topic, delete_topic, sync_topic, set_topic, left_topic, optresult_topic, public_topic, keepalive_topic, stopsearch_topic;
[0083] For example, if the instruction type is a control type, then the selected topic is set_topic, and set_topic is used as the topic of the instruction; if the instruction type is a deletion type, then the selected topic is delete_topic, and delete_topic is used as the topic of the instruction; if the instruction type is a deletion type, then the selected topic is new_topic, and new_topic is used as the topic of the instruction.
[0084] S302: The gateway receives the control information sent by the cloud server; if the subject of the control information is subscribed by itself and the instruction is a control instruction, the central air-conditioning gateway bound to the device to be controlled is determined according to the relationship between the air conditioner and the central air-conditioning gateway; and the control instruction is sent to the central air-conditioning gateway bound to the device to be controlled;
[0085] Exemplarily, the subject of the control information is set_topic. Since set_topic is subscribed by the gateway itself, the central air-conditioning gateway bound to the device to be controlled can be determined based on the relationship between the air conditioner and the central air-conditioning gateway; the control instruction is sent to the central air-conditioning gateway bound to the device to be controlled.
[0086] S303: The central air conditioning gateway receives the control instruction sent by the gateway, and controls the device to be controlled based on the control instruction.
[0087] For Figure 3 The solution, in detail, combines Figure 4As shown, terminal 101 can be a mobile phone, and the mobile phone displays the controllable air conditioners, for example, air conditioner 1 and air conditioner 2. The user selects the air conditioner 1 that he wants to control, and the mobile phone displays the control page of air conditioner 1. The user sets the indoor temperature of air conditioner 1 to 26 degrees. The mobile phone sends the instruction triggered by the user to the cloud server. The instruction is to set the indoor temperature of air conditioner 1 to 26 degrees. After receiving the instruction, the cloud server determines that the device type of the device to be controlled in the instruction is an air conditioner. According to the relationship between the air conditioner and the central air conditioning gateway, the central air conditioning gateway bound to the air conditioner 1 is determined. The type of the instruction is the control type, so the selected topic is the set_topic of the central air conditioning gateway bound to the air conditioner 1. c. Generate control information according to the instruction and the selected topic, and send the control information to the gateway. After the gateway receives the control information, it determines whether the set_topic of the central air-conditioning gateway bound to air-conditioner 1 is subscribed by itself. If so, it determines whether the instruction is a control instruction. If so, it determines the device to be controlled in the instruction, that is, the central air-conditioning gateway bound to air-conditioner 1, calls the set_topic of the central air-conditioning gateway bound to air-conditioner 1, executes the logic of set_topic, and sends the control instruction, that is, setting the indoor temperature of air-conditioner 1 to 26 degrees, to the central air-conditioning gateway bound to air-conditioner 1. The central air-conditioning gateway controls air-conditioner 1 to set the temperature to 26 degrees.
[0088] Combination Figure 5 As shown, the mobile phone and the cloud server communicate using the HTTPS protocol to send a control instruction, which includes the name of the air conditioner 1. The cloud server queries the central air conditioning gateway 103 bound to the air conditioner 1, determines that the topic is set_topic, uses set_topic as the topic, and sends the control instruction to the gateway 102 via MQTT. The gateway 102 sends the control instruction to the central air conditioning gateway 103, and the central air conditioning gateway 103 sends the control instruction to the air conditioner 1. The air conditioner 1 changes the operating parameters based on the control instruction.
[0089] Among them, combined Figure 6As shown, the central air conditioning gateway 103 sends the control instruction to the device to be controlled, such as the air conditioner 1 connected to the central air conditioning gateway 103. The air conditioner 1 controls the state according to the control instruction. After the air conditioner 1 changes its state, it sends the changed state value to the central air conditioning gateway 103. The central air conditioning gateway 103 generates state information with the MAC address and product ID of the central air conditioning gateway 103, the MAC addresses, product IDs and state values of the air conditioners 1 and 2 connected to the central air conditioning gateway 103. The central air conditioning gateway 103 reports the state information to the gateway 102, and the gateway 102 reports the state information to the cloud server 100. After receiving the state information, the cloud server 100 modifies the original state information to the new state information. For example, the air conditioner 1 changes from the original 28 degrees to the current 26 degrees. The cloud server 100 records the state of the air conditioner 1 as 28 degrees. Then, based on the newly reported state information, the state of the air conditioner 1 is modified from 28 degrees to 26 degrees.
[0090] Combination Figure 7 As shown, an embodiment of the present invention provides a method for a user to modify a relationship, including:
[0091] S700: The terminal receives the instruction triggered by the user and sends the instruction to the cloud server;
[0092] S701: The cloud server receives the instruction sent by the terminal; if the device type of the device to be controlled in the instruction is an air conditioner, and the instruction is a delete instruction, then according to the relationship between the air conditioner and the central air conditioning gateway, the central air conditioning gateway bound to the device to be controlled is determined; and from the multiple topics of the central air conditioning gateway bound to the device to be controlled, the topic of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction; and the relationship between the device to be controlled and the central air conditioning gateway bound to the device to be controlled is deleted;
[0093] Among them, the various topics of the central air conditioning gateway bound to the device to be controlled are devices_topic, search_topic, new_topic, delete_topic, sync_topic, set_topic, left_topic, optresult_topic, public_topic, keepalive_topic, stopsearch_topic;
[0094] Since the type of instruction is deletion type, the selected topic is delete_topic, and delete_topic is used as the topic of the instruction.
[0095] S702: The gateway receives the control information sent by the cloud server; if the subject of the control information is subscribed by itself and the instruction is a delete instruction, the relationship between the device to be controlled and the central air-conditioning gateway bound to the device to be controlled is deleted;
[0096] Exemplarily, the topic of the control information is delete_topic. Since delete_topic is subscribed by the gateway itself, the relationship between the device to be controlled and the central air-conditioning gateway bound to the device to be controlled can be deleted.
[0097] Exemplary, combined Figure 8 As shown, terminal 101 can be a mobile phone, and the mobile phone displays the controllable air conditioners, for example, air conditioner 1 and air conditioner 2. There is a delete button behind each air conditioner. Select the air conditioner you want to delete, such as air conditioner 1. The mobile phone sends the user-triggered instruction to the cloud server. The instruction is to delete air conditioner 1. After receiving the instruction, the cloud server determines that the device type of the device to be controlled in the instruction is an air conditioner, and determines that the instruction is a deletion instruction. According to the relationship between the air conditioner and the central air conditioning gateway, the central air conditioning gateway bound to air conditioner 1 is determined. The type of the instruction is a deletion type, so the selected topic is delete_topic of the central air conditioning gateway bound to air conditioner 1. Control information is generated according to the instruction and the selected topic, and the control information is sent to the gateway. At the same time, the cloud server deletes the relationship between air conditioner 1 and the central air conditioning gateway bound to air conditioner 1;
[0098] The gateway receives the control information and determines whether the delete_topic of the central air-conditioning gateway bound to air-conditioner 1 is subscribed by itself. If so, it determines that the instruction is a deletion instruction and the device to be controlled in the instruction to be controlled is the air-conditioner. It calls the delete_topic of the central air-conditioning gateway bound to air-conditioner 1 and executes the logic of delete_topic, that is, the relationship between air-conditioner 1 and the central air-conditioning gateway bound to air-conditioner 1 is deleted.
[0099] Combination Fig. 9 As shown, the embodiment of the present invention provides another method for a user to modify a relationship, including:
[0100] S900: The terminal receives the instruction triggered by the user and sends the instruction to the cloud server;
[0101] S901: The cloud server receives the instruction sent by the terminal; if the device type of the device to be controlled in the instruction is a central air conditioning gateway, and the instruction is a delete instruction, then from multiple topics of the device to be controlled, the topic of the device to be controlled corresponding to the type of the instruction is selected, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction; and the relationship of the device to be controlled is deleted;
[0102] Since the type of instruction is deletion type, the selected topic is delete_topic, and delete_topic is used as the topic of the instruction.
[0103] Delete the relationship of the device to be controlled. For example, the device to be controlled is a central air conditioning gateway, and the relationship of the central air conditioning gateway is multiple air conditioners connected to the central air conditioning gateway, as shown in Table 1. Simply delete Table 1 and delete its status information at the same time.
[0104] S902: The gateway receives the control information sent by the cloud server; if the subject of the control information is subscribed by itself and the instruction is a delete instruction, the relationship of the device to be controlled is deleted;
[0105] Exemplarily, the topic of the control information is delete_topic. Since delete_topic is subscribed by the gateway itself, the relationship of the device to be controlled can be deleted.
[0106] Exemplary, combined Fig.10 As shown, terminal 101 can be a mobile phone, and the mobile phone displays the central air-conditioning gateways that can be controlled. Central air-conditioning gateway A connects air conditioners 1 and 2, and central air-conditioning gateway B connects air conditioners 3 and 4. There is a delete button behind each central air-conditioning gateway. Select the central air-conditioning gateway you want to delete, such as central air-conditioning gateway A. The mobile phone sends the user-triggered instruction to the cloud server. The instruction is to delete central air-conditioning gateway A. After receiving the instruction, the cloud server determines that the device type of the device to be controlled in the instruction is a central air-conditioning gateway, and determines that the instruction is a deletion instruction, where the type of the instruction is a deletion type, so the selected topic is delete_topic of central air-conditioning gateway A, and generates control information based on the instruction and the selected topic, and sends the control information to the gateway. At the same time, the cloud server deletes the relationship between central air-conditioning gateway A and air conditioners 1 and 2;
[0107] The gateway receives the control information and determines whether the delete_topic of the central air-conditioning gateway is subscribed by itself. If so, it determines that the instruction is a delete instruction, and the device to be controlled in the instruction to be controlled is the central air-conditioning gateway. It calls the delete_topic of the central air-conditioning gateway A and executes the logic of delete_topic, that is, the relationship between the central air-conditioning gateway A and air conditioners 1 and 2 is deleted.
[0108] Combination Fig.11 As shown, an embodiment of the present invention provides a method for a user to add a relationship, including:
[0109] S1100: The terminal receives a command triggered by a user and sends the command to a cloud server;
[0110] S1101: The cloud server receives the instruction sent by the terminal; if the instruction is a query instruction, and the device type of the device to be controlled in the instruction is a central air conditioning gateway, then from multiple topics of the device to be controlled, the topic of the device to be controlled corresponding to the type of the instruction is selected, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction;
[0111] Since the type of the instruction is the added type, the selected topic is new_topic, and new_topic is used as the topic of the instruction.
[0112] S1102: The gateway receives the control information sent by the cloud server; if the subject of the control information is subscribed by itself and the instruction is an add instruction, the query information is sent to the central air conditioning gateway;
[0113] S1103: The central air conditioning gateway sends the relationship between the central air conditioning gateway and air conditioner 3 to the gateway;
[0114] S1104: The gateway saves the relationship between the central air conditioning gateway and air conditioner 3.
[0115] Exemplary, combined Fig.12 As shown, terminal 101 can be a mobile phone, and the mobile phone displays the central air-conditioning gateway that can be controlled. Central air-conditioning gateway A is connected to air conditioners 1 and 2, and central air-conditioning gateway B is connected to air conditioners 3 and 4. There is an add button behind each central air-conditioning gateway, that is, to query whether the central air-conditioning gateway has newly added connected air conditioners. For example, central air-conditioning gateway A, the mobile phone sends the user-triggered instruction to the cloud server, and the instruction is an add instruction. After receiving the instruction, the cloud server determines that the device type of the device to be controlled in the instruction is a central air-conditioning gateway, and the type of the instruction is an add type, so the selected topic is new_topic of central air-conditioning gateway A, and control information is generated according to the instruction and the selected topic, and the control information is sent to the gateway. The gateway receives the control information and determines whether the new_topic of the central air-conditioning gateway is subscribed by itself. If so, it determines that the instruction is an add instruction and the device to be controlled in the instruction to be controlled is the central air-conditioning gateway. The query information is sent to the central air-conditioning gateway A. The central air-conditioning gateway A reports its newly connected air conditioner 4. The gateway calls the new_topic of the central air-conditioning gateway A and executes the logic of new_topic, that is, adds the relationship between the central air-conditioning gateway A and the air conditioner 4 in the hash table.
[0116] Based on the above solution, in addition to connecting to the central air conditioning gateway 103 to control the air conditioner, the gateway 102 can also connect to smart home devices such as lights and curtains. Fig.13 As shown, the embodiment of the present invention provides a smart home control method applied to a gateway, including:
[0117] S1300: Determine whether the device requesting network access is a central air conditioning gateway; if yes, execute S1301; otherwise, execute S1309;
[0118] S1301: Obtain device information of the central air conditioning gateway, and store the relationship between the central air conditioning gateway and the connected air conditioners in the device information into a hash table;
[0119] S1302: Generate ptp_id according to the ID of the central air conditioning gateway and create multiple topics at the same time;
[0120] S1303: Determine whether the connection flag con_4vrvgw with the cloud server is equal to 1; if so, execute S1305; otherwise, end;
[0121] S1304: When receiving the delete instruction sent by the cloud server, call delete_topic to process the relationship between the central air conditioning gateway and the air conditioner;
[0122] S1305: calling public_topic to report the information of the central air conditioning gateway and the air conditioner connected to the central air conditioning gateway to the cloud;
[0123] S1306: When receiving the control instruction sent by the cloud server, call set_topic to control the air conditioner;
[0124] S1307: When receiving the add instruction sent by the cloud server, call new_topic to add the relationship between the central air conditioning gateway and the air conditioner;
[0125] S1308: After the reporting period arrives, call keepalive_topic to make it report the survival message of the central air conditioning gateway, including the mac address and time of the central air conditioning gateway;
[0126] S1309: randomly generate a 16-bit gateway ptp_id, and create a gateway topic based on the ptp_id; that is, when other devices except the central air conditioning gateway are connected to the gateway, S1309 is executed, and other devices connected thereafter all use the gateway topic created above;
[0127] S1310: Determine whether the connection flag con connected to the cloud server is equal to 1; if so, execute S1311; otherwise, end;
[0128] S1311: Call delete_topic to delete device information;
[0129] S1305: calling public_topic. Since the networked device is a non-central air conditioning gateway, this call does not report the information of the central air conditioning gateway and the air conditioner connected to the central air conditioning gateway to the cloud, but reports the status information of the smart home of the non-central air conditioning gateway.
[0130] S1306: When receiving the control instruction sent by the cloud server, call set_topic to control the smart home;
[0131] S1312: calling search_topic to allow network access;
[0132] S1313: calling stopsearch_topic to prohibit network access;
[0133] S1314: calling keepalive_topic to make it report the gateway's survival message, including time.
[0134] Among them, the operation of the gateway after the central air-conditioning gateway is connected to the network can refer to the above content. When the gateway accesses devices other than the central air-conditioning gateway, a 16-bit random string is randomly generated from a 62-bit string containing numbers and uppercase and lowercase letters as the gateway's ptp_id. This ptp_id is used to generate the topic of the corresponding gateway that needs to interact with the cloud server. The generated topic type is similar to the above-mentioned central air-conditioning gateway topic type, and the gateway topic with the gateway ptp_id is reported to the cloud server.
[0135] Set the connection flag con. When the connection with the cloud server is successful, that is, the connection flag con = 1, a callback can be made.
[0136] In the callback, delete_topic, set_topic, public_topic, search_topic, and stopsearch_topic are logically processed respectively. The processing here targets devices other than the central air conditioning gateway and air conditioners that are connected to the gateway.
[0137] In public_topic:
[0138] Get device information, traverse the device list hash table deviceList_map, encode the device information reported to the cloud for other device types except the above-mentioned central air conditioning gateway and air conditioner, including the device's mac address and product id, and call back the devices topic.
[0139] Synchronize status information, traverse the device list hash table deviceList_map, and encode the status information reported to the cloud for other device types except the above-mentioned air-conditioning gateways and air-conditioners, including the device's mac address, product id, and specific status values; call back sync_topic.
[0140] In delete_topic:
[0141] Decode the device deletion information, and according to the device ID, the gateway directly sends a command to delete the device. The devices here include other types of devices that can be connected to the Zigbee gateway except the above-mentioned air conditioning gateway and air conditioner.
[0142] In set_topic: decode device setting parameters and control the corresponding device according to the device type.
[0143] In search_topic: Gateway allows network access;
[0144] In stopsearch_topic: the gateway prohibits network access operations;
[0145] The thread periodically sends a keepalive_topic message every 35 seconds. The message contains the survival time and the survival ptp_id.
[0146] Among them, when the central air-conditioning gateway device is disconnected from the network, after completing the data processing, the thread corresponding to the air-conditioning gateway created above is finally killed to prevent useless threads from surviving and wasting resources.
[0147] For example, when a user wants to control a light to turn on, the user's mobile phone sends a control instruction to turn on the light to the cloud. The control instruction includes the device name of the light. The cloud server finds the topic of the gateway based on the device name of the light, and sends the control instruction to turn on the light to the topic of the gateway. When the gateway determines that the cloud server has sent the gateway's topic, the gateway obtains the control instruction under the gateway's topic and sends the control instruction to the light. When the light receives the control instruction, it performs the turn-on operation.
[0148] When the user wants to delete the light from the smart terminal, the user uses the mobile phone to send a delete light command to the cloud server, and the cloud server sends the delete command to the topic of the gateway. The gateway receives the topic of the gateway and deletes the relevant information of the light. Alternatively, to delete a device from the gateway, you can directly operate the device to exit the network, or directly delete it from the user terminal.
[0149] Based on the above solution, the embodiment of the present invention provides a central air conditioning control method, combined with Fig.14 As shown, it is applied to the gateway, including:
[0150] S1400: receiving control information sent by the cloud server;
[0151] Wherein, the control information includes an instruction and a subject of the instruction; the instruction is sent by the terminal to the cloud server; when the cloud server determines that the device type of the device to be controlled in the instruction is an air conditioner, based on the relationship between the air conditioner and the central air conditioning gateway, it determines the central air conditioning gateway bound to the device to be controlled; from a plurality of subjects of the central air conditioning gateway bound to the device to be controlled, the subject of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected as the subject of the instruction;
[0152] S1401: If the subject of the control information is subscribed by itself and the instruction is a control instruction, determine the central air-conditioning gateway bound to the device to be controlled according to the relationship between the air conditioner and the central air-conditioning gateway; send the control instruction to the central air-conditioning gateway bound to the device to be controlled, so that the central air-conditioning gateway can control the device to be controlled based on the control instruction.
[0153] Optionally, the method further includes:
[0154] If the subject of the control information is subscribed by itself, and the instruction is a deletion instruction, then when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioner, the relationship between the device to be controlled and the central air conditioning gateway bound to the device to be controlled is deleted; when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioning gateway, the relationship between the device to be controlled is deleted;
[0155] If the subject of the control information is subscribed by itself and the instruction is an add instruction, query information is sent to the device to be controlled in the add instruction, and the relationship between the newly added air conditioner and the central air conditioning gateway sent by the device to be controlled in the add instruction is received and saved.
[0156] Optionally, before receiving the control information sent by the cloud server, the method further includes:
[0157] After connecting to the central air conditioning gateway, obtain the device information of the central air conditioning gateway;
[0158] According to the device information of the central air conditioning gateway, multiple topics of the central air conditioning gateway are determined;
[0159] The multiple topics of the central air conditioning gateway are used as the topics subscribed by itself, and the multiple topics of the central air conditioning gateway of the cloud server are notified as the topics subscribed by itself.
[0160] Optionally, after sending the control instruction to the central air conditioning gateway bound to the device to be controlled, the method further includes:
[0161] Receive status information sent by the central air-conditioning gateway bound to the device to be controlled; wherein the status information includes: the mac address and product id of the central air-conditioning gateway bound to the device to be controlled, the mac address, product id and status value of the air conditioner connected to the central air-conditioning gateway bound to the device to be controlled; the status value of the air conditioner connected to the central air-conditioning gateway bound to the device to be controlled is the status value of the device to be controlled after the central air-conditioning gateway bound to the device to be controlled controls the device to be controlled based on the control instruction;
[0162] The status information sent by the central air conditioning gateway bound to the device to be controlled is sent to the cloud server.
[0163] The embodiment of the present invention provides a central air conditioning control method, combining Fig.15 As shown, it is applied to the cloud server and includes:
[0164] S1500: receiving a command sent by a terminal;
[0165] S1501: If the device type of the device to be controlled in the instruction is an air conditioner, the central air conditioning gateway bound to the device to be controlled is determined according to the relationship between the air conditioner and the central air conditioning gateway; and the topic of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected from the multiple topics of the central air conditioning gateway bound to the device to be controlled, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction, so that the gateway processes the control information.
[0166] Optionally, the method further includes:
[0167] If the instruction is a delete instruction, the relationship between the device to be controlled and the central air-conditioning gateway bound to the device to be controlled is deleted;
[0168] If the device type of the device to be controlled in the instruction is a central air conditioning gateway, and the instruction is a delete instruction, the relationship of the device to be controlled is deleted, and the topic of the device to be controlled corresponding to the type of the instruction is selected from the multiple topics of the device to be controlled, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction, so that the gateway processes the control information.
[0169] An embodiment of the present invention provides a gateway, including: a communication unit and a processor;
[0170] The communication unit is used to receive control information sent by the cloud server; wherein the control information includes an instruction and a subject of the instruction; the instruction is sent by the terminal to the cloud server; when the cloud server determines that the device type of the device to be controlled in the instruction is an air conditioner, based on the relationship between the air conditioner and the central air conditioning gateway, it determines the central air conditioning gateway bound to the device to be controlled; from a plurality of subjects of the central air conditioning gateway bound to the device to be controlled, the subject of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected as the subject of the instruction;
[0171] Sending the control instruction to the central air-conditioning gateway bound to the device to be controlled, so that the central air-conditioning gateway can control the device to be controlled based on the control instruction;
[0172] The processor is used to determine the central air-conditioning gateway bound to the device to be controlled according to the relationship between the air conditioner and the central air-conditioning gateway if the subject of the control information is subscribed by itself and the instruction is a control instruction.
[0173] Optionally, the processor is further configured to:
[0174] If the subject of the control information is subscribed by itself, and the instruction is a deletion instruction, then when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioner, the relationship between the device to be controlled and the central air conditioning gateway bound to the device to be controlled is deleted; when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioning gateway, the relationship between the device to be controlled is deleted;
[0175] If the subject of the control information is subscribed by itself and the instruction is an add instruction, query information is sent to the device to be controlled in the add instruction, and the relationship between the newly added air conditioner and the central air conditioning gateway sent by the device to be controlled in the add instruction is received and saved.
[0176] Optionally, the processor is further configured to:
[0177] After connecting to the central air conditioning gateway, obtain the device information of the central air conditioning gateway;
[0178] According to the device information of the central air conditioning gateway, multiple topics of the central air conditioning gateway are determined;
[0179] The multiple topics of the central air conditioning gateway are used as the topics subscribed by itself, and the multiple topics of the central air conditioning gateway of the cloud server are notified as the topics subscribed by itself.
[0180] Optionally, the processor is further used to: receive status information sent by the central air-conditioning gateway bound to the device to be controlled; wherein the status information includes: the mac address and product id of the central air-conditioning gateway bound to the device to be controlled, the mac address, product id and status value of the air conditioner connected to the central air-conditioning gateway bound to the device to be controlled; the status value of the air conditioner connected to the central air-conditioning gateway bound to the device to be controlled is the status value of the device to be controlled after the central air-conditioning gateway bound to the device to be controlled controls the device to be controlled based on the control instruction;
[0181] The status information sent by the central air conditioning gateway bound to the device to be controlled is sent to the cloud server.
[0182] An embodiment of the present invention provides a cloud server, comprising: a processor and a communication unit;
[0183] The communication unit is used to receive an instruction sent by a terminal; send the control information to a gateway that subscribes to the subject of the instruction, so that the gateway processes the control information;
[0184] The processor is used for determining the central air-conditioning gateway bound to the device to be controlled according to the relationship between the air-conditioning and the central air-conditioning gateway if the device type of the device to be controlled in the instruction is an air-conditioner; and selecting the theme of the central air-conditioning gateway bound to the device to be controlled corresponding to the type of the instruction from the multiple themes of the central air-conditioning gateway bound to the device to be controlled, and using the selected theme as the theme of the instruction.
[0185] Optionally, the processor is further configured to:
[0186] If the instruction is a delete instruction, the relationship between the device to be controlled and the central air-conditioning gateway bound to the device to be controlled is deleted;
[0187] If the device type of the device to be controlled in the instruction is a central air conditioning gateway, and the instruction is a delete instruction, the relationship of the device to be controlled is deleted, and the topic of the device to be controlled corresponding to the type of the instruction is selected from the multiple topics of the device to be controlled, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction, so that the gateway processes the control information.
[0188] An embodiment of the present invention provides a central air conditioning control system, comprising:
[0189] The terminal is used to receive the instruction triggered by the user and send the instruction to the cloud server;
[0190] A cloud server is used to receive instructions sent by a terminal; if the device type of the device to be controlled in the instruction is an air conditioner, then according to the relationship between the air conditioner and the central air conditioning gateway, determine the central air conditioning gateway bound to the device to be controlled; and from multiple topics of the central air conditioning gateway bound to the device to be controlled, select the topic of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction, and use the selected topic as the topic of the instruction; generate control information according to the topic of the instruction and the instruction, and send the control information to the gateway subscribed to the topic of the instruction;
[0191] The gateway is used to receive the control information sent by the cloud server; if the subject of the control information is subscribed by itself and the instruction is a control instruction, the central air-conditioning gateway bound to the device to be controlled is determined according to the relationship between the air conditioner and the central air-conditioning gateway; and the control instruction is sent to the central air-conditioning gateway bound to the device to be controlled;
[0192] The central air conditioning gateway is used to receive the control instruction sent by the gateway and control the device to be controlled based on the control instruction.
[0193] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0194] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A gateway, characterized in that: include: a communication unit and a processor; The communication unit is used to receive control information sent by the cloud server; wherein the control information includes an instruction and a subject of the instruction; the instruction is sent by the terminal to the cloud server; when the cloud server determines that the device type of the device to be controlled in the instruction is an air conditioner, based on the relationship between the air conditioner and the central air conditioning gateway, it determines the central air conditioning gateway bound to the device to be controlled; from a plurality of subjects of the central air conditioning gateway bound to the device to be controlled, the subject of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected as the subject of the instruction; Sending the control instruction to the central air-conditioning gateway bound to the device to be controlled, so that the central air-conditioning gateway can control the device to be controlled based on the control instruction; The processor is used to determine the central air-conditioning gateway bound to the device to be controlled according to the relationship between the air conditioner and the central air-conditioning gateway if the subject of the control information is subscribed by itself and the instruction is a control instruction.
2. The gateway according to claim 1, characterized in that: The processor is further configured to: If the subject of the control information is subscribed by itself, and the instruction is a deletion instruction, then when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioner, the relationship between the device to be controlled and the central air conditioning gateway bound to the device to be controlled is deleted; when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioning gateway, the relationship between the device to be controlled is deleted; If the subject of the control information is subscribed by itself and the instruction is an add instruction, query information is sent to the device to be controlled in the add instruction, and the relationship between the newly added air conditioner and the central air conditioning gateway sent by the device to be controlled in the add instruction is received and saved.
3. The gateway according to claim 1, characterized in that: The processor is further configured to: After connecting to the central air conditioning gateway, obtain the device information of the central air conditioning gateway; According to the device information of the central air conditioning gateway, multiple topics of the central air conditioning gateway are determined; The multiple topics of the central air conditioning gateway are used as the topics subscribed by itself, and the multiple topics of the central air conditioning gateway of the cloud server are notified as the topics subscribed by itself.
4. The gateway according to claim 1, characterized in that: The processor is further used to: receive status information sent by the central air-conditioning gateway bound to the device to be controlled; wherein the status information includes: the mac address and product id of the central air-conditioning gateway bound to the device to be controlled, the mac address, product id and status value of the air conditioner connected to the central air-conditioning gateway bound to the device to be controlled; the status value of the air conditioner connected to the central air-conditioning gateway bound to the device to be controlled is the status value of the device to be controlled after the central air-conditioning gateway bound to the device to be controlled controls the device to be controlled based on the control instruction; The status information sent by the central air conditioning gateway bound to the device to be controlled is sent to the cloud server.
5. A cloud server, characterized in that: include: processor and communication unit; The communication unit is used to receive instructions sent by the terminal; Sending the control information to a gateway that subscribes to the subject of the instruction so that the gateway processes the control information; The processor is used for determining the central air-conditioning gateway bound to the device to be controlled according to the relationship between the air-conditioning and the central air-conditioning gateway if the device type of the device to be controlled in the instruction is an air-conditioner; and selecting the theme of the central air-conditioning gateway bound to the device to be controlled corresponding to the type of the instruction from the multiple themes of the central air-conditioning gateway bound to the device to be controlled, and using the selected theme as the theme of the instruction.
6. The cloud server according to claim 5, characterized in that: The processor is further configured to: If the instruction is a delete instruction, the relationship between the device to be controlled and the central air-conditioning gateway bound to the device to be controlled is deleted; If the device type of the device to be controlled in the instruction is a central air conditioning gateway, and the instruction is a delete instruction, the relationship of the device to be controlled is deleted, and the topic of the device to be controlled corresponding to the type of the instruction is selected from the multiple topics of the device to be controlled, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction, so that the gateway processes the control information.
7. A central air conditioning control system, characterized in that: include: The terminal is used to receive the instruction triggered by the user and send the instruction to the cloud server; The cloud server is used to receive instructions sent by the terminal; If the device type of the device to be controlled in the instruction is an air conditioner, then according to the relationship between the air conditioner and the central air conditioning gateway, determine the central air conditioning gateway bound to the device to be controlled; and from the multiple topics of the central air conditioning gateway bound to the device to be controlled, select the topic of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction, and use the selected topic as the topic of the instruction; generate control information according to the topic of the instruction and the instruction, and send the control information to the gateway that subscribes to the topic of the instruction; Gateway, used to receive control information sent by the cloud server; If the subject of the control information is subscribed by itself and the instruction is a control instruction, then according to the relationship between the air conditioner and the central air conditioning gateway, determine the central air conditioning gateway bound to the device to be controlled; send the control instruction to the central air conditioning gateway bound to the device to be controlled; The central air conditioning gateway is used to receive the control instruction sent by the gateway and control the device to be controlled based on the control instruction.
8. A central air conditioning control method, characterized in that: Applied to gateways, including: Receive control information sent by a cloud server; wherein the control information includes an instruction and a subject of the instruction; the instruction is sent by a terminal to the cloud server; when the cloud server determines that the device type of the device to be controlled in the instruction is an air conditioner, based on the relationship between the air conditioner and the central air conditioning gateway, determine the central air conditioning gateway bound to the device to be controlled; from a plurality of subjects of the central air conditioning gateway bound to the device to be controlled, the subject of the central air conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected as the subject of the instruction; If the subject of the control information is subscribed by itself and the instruction is a control instruction, the central air-conditioning gateway bound to the device to be controlled is determined according to the relationship between the air conditioner and the central air-conditioning gateway; the control instruction is sent to the central air-conditioning gateway bound to the device to be controlled, so that the central air-conditioning gateway can control the device to be controlled based on the control instruction.
9. The central air conditioning control method according to claim 8, characterized in that: The method further comprises: If the subject of the control information is subscribed by itself, and the instruction is a deletion instruction, then when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioner, the relationship between the device to be controlled and the central air conditioning gateway bound to the device to be controlled is deleted; when it is determined that the device type of the device to be controlled in the deletion instruction is an air conditioning gateway, the relationship between the device to be controlled is deleted; If the subject of the control information is subscribed by itself and the instruction is an add instruction, query information is sent to the device to be controlled in the add instruction, and the relationship between the newly added air conditioner and the central air conditioning gateway sent by the device to be controlled in the add instruction is received and saved.
10. A central air conditioning control method, characterized in that: Applied to cloud servers, including: Receiving instructions sent by the terminal; If the device type of the device to be controlled in the instruction is an air conditioner, the central air-conditioning gateway bound to the device to be controlled is determined according to the relationship between the air conditioner and the central air-conditioning gateway; and the topic of the central air-conditioning gateway bound to the device to be controlled corresponding to the type of the instruction is selected from the multiple topics of the central air-conditioning gateway bound to the device to be controlled, and the selected topic is used as the topic of the instruction; control information is generated according to the topic of the instruction and the instruction, and the control information is sent to the gateway that subscribes to the topic of the instruction, so that the gateway processes the control information.
