A kind of ZigBee remote controlers long-range control method
Technical field
The present invention relates to wireless communication technology fields, refer to a kind of remote controlled terminal device of ZigBee remote controlers
Control method.
Background technology
It is more and more prosperous for the remote control equipment demand of stability in the market with the continuous development of Internet of Things industry
Contain, particularly small power consumption, easy networking, data transmission it is stable, can upstream device state product.
ZigBee technology be it is a kind of closely, low complex degree, low-power consumption, low rate, the bidirectional wireless communication skill of low cost
Art causes it to be gradually applied on wireless electronic product, such as because it possesses above-mentioned technical characterstic:Smart home, intelligent medical
Wait fields, at present ZigBee wireless electronic products when in use, by the way that gateway device and high in the clouds processing center is coordinated to realize
Wireless control when controlling ZigBee device ends, is broadly divided into following several realization methods using ZigBee remote controlers:
(1)ZigBee remote controlers send instruction directly to the ZigBee terminal devices in ZigBee-network;(2)ZigBee remote controlers are sent
It instructs to the gateway device in ZigBee-network, ZigBee terminal devices is transmitted to by gateway device.Current ZigBee remote controls
Device is all based on the control mode of local ZigBee gateway devices, i.e. ZigBee signals are only passed in local ZigBee-network
It passs, and is continuously increased with the application places of gateway device, in different places there are different gateway devices, ZigBee is distant
The demand that control device passes through gateway device will be promoted constantly.ZigBee remote controlers in the prior art are directed to be only capable of realizing to local
ZigBee terminal devices carry out the growth requirement that ZigBee-network is much not achieved in wireless control.Therefore it is how that ZigBee is distant
It controls device and realizes that carrying out remote wireless control to ZigBee terminal devices becomes an important topic of those skilled in the art's research.
The content of the invention
In view of this, it is existing to solve it is an object of the invention to provide a kind of ZigBee remote controlers long-range control method
ZigBee remote controlers can not be realized in technology carries out radio remote to the ZigBee terminal devices being not in same ZigBee-network
The problem of process control and must by equipment for surfing the net to ZigBee terminal devices carry out Wireless remote control the problem of.
In order to achieve the above objectives, a kind of ZigBee remote controlers long-range control method of the invention is based on ZigBee-network
System, the system include:ZigBee remote controlers, multiple gateway devices, ZigBee terminal devices and cloud server, this method bag
It includes:
When initial, ZigBee remote controlers are subjected to networking with multiple gateway devices respectively, and will be on ZigBee remote controlers
Button carries out control binding with the ZigBee terminal devices at least one gateway device network;
1)The ZigBee-network of ZigBee remote controller searches region, and it is automatically added to region networking
In ZigBee-network;
2)ZigBee remote controlers receive the extraneous key command sent, and the key command to receiving is analyzed, and is sentenced
Disconnected key command correspond to control whether be where ZigBee terminal devices in network, 3 are entered step if "Yes");If
"No" then enters step 5);
3)Key command information is transmitted directly to corresponding control in network by ZigBee remote controlers by ZigBee-network
ZigBee terminal devices;
4)ZigBee terminal devices perform corresponding instruction action according to the key command information received, terminate;
5)Gateway device where key command information is sent to by ZigBee remote controlers in ZigBee-network, gateway device
Key command information is transmitted to cloud server by Ethernet;
6)Cloud server analyzes and processes the key command information received, and it is corresponding to obtain key command information
Gateway device and ZigBee terminal devices;
7)Key command information is sent to corresponding gateway device by Ethernet, and is transmitted to by gateway device
ZigBee terminal devices perform corresponding instruction action.
Preferably, at the beginning, after ZigBee remote controlers carry out networking with multiple gateway devices respectively, inside automatically generate
The list of network has been added in, and has stored each network identifier for adding in network(PAN-ID)And netkey;ZigBee is remotely controlled
Button on device stores the ID of each ZigBee terminal devices after control binding is carried out with the ZigBee terminal devices in network
The network identifier and netkey of information, cluster information and ZigBee terminal device corresponding gateway equipment.
Preferably, specifically included in above-mentioned step 1:During the ZigBee-network of ZigBee remote controller searches region,
If there is the ZigBee-network of multiple networkings, the network for selecting network signal optimal is automatically added to.
Preferably, specifically included in above-mentioned step 2:The key command information that the analysis of ZigBee remote controlers receives, from
Corresponding ZigBee-network information and ZigBee terminal device informations are transferred in its data stored, is judged in key command information
Corresponding ZigBee-network whether be it is current where network.
Preferably, specifically included in above-mentioned step 6:The correspondence net carried in cloud server analysis button command information
The network identifier and netkey of network, and key command information is sent to by corresponding network according to analysis result, control phase
The ZigBee terminal devices in network is answered to perform corresponding instruction action.
Preferably, further included in above-mentioned step 7:ZigBee terminal devices are performed according to the key command information received
The status information for acting completion can be fed back to cloud server by the gateway device of place network after corresponding instruction action,
Cloud server analysis finds corresponding ZigBee remote controlers, and gives status information feedback to corresponding ZigBee remote controlers,
ZigBee remote controlers send prompting to user.
Beneficial effects of the present invention:
The present invention can realize the wireless control to more ground ZigBee terminal devices by ZigBee remote controlers, including:Short range
Control and remote control solve ZigBee remote controlers in the prior art and are only capable of carrying out wirelessly local ZigBee terminal devices
The problem of control.Meanwhile must remote control be carried out to ZigBee terminal devices by equipment for surfing the net compared to the prior art,
The present invention can it is more convenient, quickly to ZigBee terminal devices carry out Wireless remote control.
Description of the drawings
Fig. 1 illustrates the step flow chart of ZigBee remote controlers long-range control method of the present invention.
Specific embodiment
For the ease of the understanding of those skilled in the art, the present invention is made further with reference to embodiment and attached drawing
Bright, the content that embodiment refers to not is limitation of the invention.
With reference to shown in Fig. 1, a kind of ZigBee remote controlers long-range control method of the invention is based on ZigBee-network system
System, the system include:ZigBee remote controlers, multiple gateway devices, ZigBee terminal devices and cloud server, this method bag
It includes:
When initial, ZigBee remote controlers are subjected to networking with multiple gateway devices respectively, and are selected on ZigBee remote controlers
It selects button and carries out control binding with the ZigBee terminal devices at least one gateway device network;ZigBee remote controlers respectively with
After multiple gateway devices carry out networking, the list for having added in network is inside automatically generated, and stores each network for adding in network
Identifier(PAN-ID)And netkey;Button on ZigBee remote controlers is controlled with the ZigBee terminal devices in network
After system binding, id information, cluster information and the ZigBee terminal device corresponding gateways that can store each ZigBee terminal devices are set
Standby network identifier and netkey;
Step 101:The ZigBee-network of ZigBee remote controller searches region, and according to the addition net of its memory storage
The list of network is automatically added in the ZigBee-network of region networking;ZigBee remote controller searches region
During ZigBee-network, if there is the ZigBee-network of multiple networkings, the network for selecting network signal optimal adds automatically
Enter;In addition, the selection of ZigBee-network also can be voluntarily carried out according to the demand of user;
Step 102:ZigBee remote controlers receive the key command that extraneous user sends(The key command includes destination address
And control information, destination address refer to the id information of corresponding ZigBee terminal devices, control information refers to corresponding ZigBee terminals
The cluster information of equipment), and the key command to receiving is analyzed, whether judge key command correspondence control is place net
ZigBee terminal devices in network, enter step 103 if "Yes";105 are entered step if "No";Specifically, ZigBee is distant
The key command information that control device analysis receives, corresponding ZigBee-network information and ZigBee are transferred from the data of its storage
Terminal device information, id information, cluster information and ZigBee terminal device corresponding gateways including each ZigBee terminal devices
The network identifier and netkey of equipment judge whether corresponding ZigBee-network is current place in key command information
Network;
Step 103:Key command information is transmitted directly to by ZigBee-network in network by ZigBee remote controlers
ZigBee terminal devices;
Step 104:ZigBee terminal devices perform corresponding instruction action, knot according to the key command information received
Beam;
Step 105:Gateway device where key command information is sent to by ZigBee remote controlers in ZigBee-network, net
It closes equipment and key command information is transmitted to cloud server by Ethernet;The above-mentioned net issued in the ZigBee-network of place
Id information, cluster information and the ZigBee terminal devices that the key command information for closing equipment includes ZigBee terminal devices correspond to
The network identifier of gateway device and netkey information;
Step 106:Cloud server analyzes and processes the key command information received, obtains key command information
Corresponding gateway device and ZigBee terminal devices;
The network identifier and netkey on map network carried in cloud server analysis button command information,
And key command information is sent to by corresponding network according to analysis result, the ZigBee terminal devices in corresponding network is controlled to hold
The corresponding instruction action of row;
Step 107:Key command information is sent to corresponding gateway device by Ethernet, and is turned by gateway device
It issues ZigBee terminal devices and performs corresponding instruction action;
ZigBee terminal devices can will act after performing corresponding instruction action according to the key command information received
Into status information cloud server is fed back to by the gateway device of place network, cloud server analysis, find it is corresponding
ZigBee remote controlers, and by status information feedback to corresponding ZigBee remote controlers, ZigBee remote controlers send prompting to user.
In order to preferably illustrate the ZigBee remote controler long-range control methods of the present invention, with reference to following specific examples, bag
It includes:One ZigBee remote controler, a first ZigBee gateway device, a 2nd ZigBee gateway device, a ZigBee
Intelligent switch and cloud server, wherein:
When initial, user by ZigBee remote controlers respectively with the first ZigBee gateway devices, the 2nd ZigBee gateway devices
Networking action is carried out, the list of screening network is automatically generated in ZigBee remote controlers;ZigBee intelligent switch and the first ZigBee
Gateway device is in same ZigBee-network;The button A of ZigBee remote controlers bind with ZigBee intelligent switch, control
ZigBee intelligent switch processed is turned on and off;
When ZigBee remote controlers and the first ZigBee gateway devices are in consolidated network, user's touch-control ZigBee remote controlers
On button A, ZigBee remote controler analysis button A control ZigBee terminal devices(It is ZigBee intelligent switch in embodiment)
Whether with the first ZigBee gateway devices residing for consolidated network, after obtaining said two devices and being in consolidated network, ZigBee remote controls
Control instruction information is transmitted directly to ZigBee intelligent switch by device by ZigBee-network, should by the response of ZigBee intelligent switch
Instruction, and complete corresponding instruction action.
When ZigBee remote controlers and the 2nd ZigBee gateway devices are in consolidated network, user's touch-control ZigBee remote controlers
On button A, ZigBee remote controler analysis button A control ZigBee terminal devices(It is ZigBee intelligent switch in embodiment)
Whether with the 2nd ZigBee gateway devices residing for consolidated network, after obtaining said two devices and being not at consolidated network, ZigBee is distant
Control the net that the id information of ZigBee intelligent switch and cluster information, ZigBee intelligent switch are corresponded to the first ZigBee gateway devices by device
Network identifier and netkey are sent to the 2nd ZigBee gateway devices, and cloud server, cloud server pair are forwarded to by it
The data message received is analyzed and processed, and obtains the corresponding first ZigBee gateway devices of data message and ZigBee intelligence
Switch, is then transmitted to ZigBee intelligent switch, in this way, just completing by control instruction information by the first ZigBee gateway devices
ZigBee remote controlers are to the Wireless remote control of the ZigBee intelligent switch not in consolidated network.
During above-mentioned ZigBee remote control control ZigBee intelligent switch, ZigBee intelligent switch can will be completed
Action status information ZigBee remote controlers are fed back to by different modes, to inform the state knot of user control terminal equipment
Fruit, the mode of prompting include but not limited to sound, indicator light and vibration etc..
There are many concrete application approach of the present invention, and the above is only the preferred embodiment of the present invention, it is noted that for
For those skilled in the art, without departing from the principle of the present invention, several improvement can also be made, this
A little improve also should be regarded as protection scope of the present invention.