A kind of home wireless control method and system
Technical field
The present invention relates to field of intelligent control technology, particularly a kind ofly be used to control distribute the home wireless control method and the system of the home equipment of diverse location at home.
Background technology
Smart Home (Smart Home), claim intelligent dwelling again, it utilizes advanced computer, embedded system and network communications technology, with the various device of the illuminator in the family, environment control, safety-protection system, network home appliance by home-network linkups to together.On the one hand, Smart Home will allow the user have more easily means come managing family equipment, such as, by Digiplex, phone, the Internet or speech recognition controlled housed device, more can carry out scene operation, make a plurality of equipment form interlock; On the other hand, the various device in the Smart Home each other can communication, and not needing the user to command also can be according to the interactive operation of different states, thereby brings farthest efficient, convenient, comfortable and safety to the user.
Control technology in order to popularize radio frequency in household electrical appliance market, and the introducing of avoiding new technology becomes the obstacle of product design, 2008, Sony of the big factory of consumer electronics (Sony), Philip (Philips), Panasonic (Panasonic), Samsung (Samsung) and main low-power consumption RFIC manufacturer Freescale (Freescale), Texas Instrument (TI), and OKI sets up RF4CE (Radio Frequency for ConsumerElectronics) alliance (RF4CE Consortium) jointly.In March, 2009, RF4CE alliance agrees to cooperate to develop based on ZigBee/IEEE 802.15.4 jointly with ZigBee alliance (ZigBee Alliance), and is used for the radio frequency new standard of household remote.From then on, RF remote-controlledly be expected to thoroughly replace the traditional infrared technology finally.RF4CE not only can improve the reliability of operation; Improve the transmission range and the anti-interference of signal; Make the signal transmission not influenced by barrier; Can also realize that two-way communication conciliates never the interoperability problem with electrical equipment, but also significant prolongation of remote controller battery life-span.The consumer will no longer need accurately to point to the transmitting terminal of remote controller the receiving terminal of electrical equipment, also no longer need several remote controllers to operate electronic equipments different in the family.This has had certain possibility for household control.
But its code library of RF4CE platform that present external producer provides is sightless, it is not high to use flexibility, can't satisfy the actual needs of existing various occasion, not high at the maintainability of net equipment in the network service process to each, in order to improve existing communication protocol, better adapt to household control practical application, we have developed a cover radio house control on SMAC agreement basis, this system can carry out the network operation of line node in real time and go out networking etc., and can realize the control operation of equipment in the effective time.
The weak point that exists in realizing at existing RF4CE as:
1, whether can't detect peripheral node in real time in operating states such as nets;
2, the configuration that must network before normal communication state just can be carried out work;
3, existing control protocol is after offshore company encapsulates, can not satisfy practical application fully and ask mostly, revises inconvenience.
Summary of the invention
In order to overcome the defective that above-mentioned prior art exists, the object of the present invention is to provide a kind of be used to control distribute the home wireless control method and the system of the home equipment of diverse location at home, can convenient effective realization network operation, the application such as net management, control information of coming in and going out in real time, these method and system have characteristics such as applicability height, adjustable controllability height, can satisfy the application under the different situations as much as possible.
For addressing the above problem, the invention provides a kind of home wireless control method, be used to control the home equipment of diverse location at home that distributes, it is characterized in that described method comprises the steps:
Node type and parameter setting: central coordinator node or peripheral Control Node are carried out the node type setting, the line correlation parameter of going forward side by side setting;
System's networking initialization: central coordinator node and peripheral Control Node are carried out networking, finish initial tree network topological structure networking, and externally contain system node division grade according to the signal strength signal intensity of peripheral Control Node;
Network and safeguard: central coordinator node broadcasting networking application information networks the peripheral Control Node that does not network;
Network operation: externally contain the system node according to rank externally contain step by step the system node carry out training in rotation, be reflected in the information of the peripheral Control Node of net in real time;
Contain the system node control offline: central coordinator node is issued control command according to the operation information of user's input to corresponding peripheral Control Node, thereby finishes the control to home equipment;
Periodically network and network operation: central coordinator node is periodically carried out to network and is safeguarded and the network operation process, and this process can make the peripheral Control Node that does not network network and current peripheral Control Node at net is safeguarded.When central coordinator node is received the operation information that the user imports, stop to network and the network operation process, directly execution issue control command process is controlled containing the system node offline, and issue control command process finishes networking and the network operation process in the continuation executive communication.
Further, the networking initialization of described system comprises:
The peripheral Control Node of one-level networks: central coordinator node issue one-level networks and applies for broadcasting, peripheral Control Node is received and is sent the one-level application that networks behind the signal greater than the peripheral Control Node signal strength signal intensity of one-level threshold values, central authorities' coordinator node receives that one-level networks when applying for that this periphery Control Node of judgement meets one-level networking condition, then should periphery Control Node networking success and return to this periphery Control Node networking successful information, otherwise return to this periphery Control Node networking failure information;
The peripheral Control Node of secondary networks: central coordinator node issue secondary networks and applies for broadcasting, the peripheral Control Node of one-level is transmitted secondary networking application broadcasting to its child node, the peripheral Control Node of secondary is received and is sent the secondary application that networks behind the signal greater than the peripheral Control Node signal strength signal intensity of secondary threshold values, central authorities' coordinator node receives that secondary networks when applying for that this periphery Control Node of judgement meets secondary networking condition, then should periphery Control Node networking success and return to this periphery Control Node networking successful information, otherwise return to this periphery Control Node networking failure information.
Further, described networking is safeguarded and is comprised:
The peripheral Control Node networking of broadcasting one-level information networks the peripheral Control Node of the one-level that does not network;
The peripheral Control Node networking of broadcasting secondary information networks the peripheral Control Node of the secondary that does not network.
Further, described network operation comprises:
The peripheral Control Node network operation of one-level: the peripheral Control Node of one-level is carried out training in rotation, be reflected in the information of the peripheral Control Node of one-level of net according to the peripheral Control Node return information of one-level in real time;
The peripheral Control Node network operation of secondary: the peripheral Control Node of secondary is carried out training in rotation, the peripheral Control Node of one-level is transmitted the peripheral Control Node training in rotation of secondary information to its child node, the peripheral Control Node of secondary is replied to central coordinator node by its father node according to training in rotation information, is reflected in the information of the peripheral Control Node of secondary of net in real time.externally contain the system node carry out in the network operation process, central authorities' coordinator node is reflected in the information of the peripheral Control Node of net in real time according to peripheral Control Node return information, central authorities' coordinator node is externally contained the system node and is carried out training in rotation 4 times, node does not all have return information continuous 4 times if each contains system offline, and then central coordinator node is then thought this periphery Control Node off-grid; If continuous 3 return informations of the peripheral Control Node of off-grid think that then this periphery Control Node enters network again.
Further, the described system node control of containing offline comprises:
Control in the peripheral Control Node of net one-level:, directly send to the peripheral Control Node of this one-level by central coordinator node to the control information of the peripheral Control Node of one-level;
Control in the peripheral Control Node of net secondary:, deliver to the peripheral Control Node of this secondary by the father node forwarding of the peripheral Control Node of this secondary by central coordinator node to the control information of the peripheral Control Node of secondary.
A kind of home wireless control system also is provided, be used to control the home equipment of diverse location at home that distributes, comprise the peripheral controllers that a central coordinator, several controlled home equipment and some and controlled home equipment are connected, it is characterized in that, described central coordinator comprises MC13213 main control chip, serial port module, balance module and Anneta module, button and display screen, described MC13213 main control chip is connected with serial port module, balance module, button and display screen respectively, and described balance module is connected with Anneta module;
Described peripheral controllers comprises MC13213 main control chip, serial port module, balance module and Anneta module, button and display screen, described MC13213 main control chip is connected with serial port module, balance module, button and display screen respectively, and described balance module is connected with Anneta module.
Described peripheral controllers is divided into one-level peripheral controllers and secondary peripheral controllers according to its signal strength signal intensity.
The invention has the beneficial effects as follows: this home wireless control method and system are based upon on the SMAC agreement basis, can carry out the network operation of online peripheral Control Node in real time and the net management of coming in and going out, and can in effective time, realize the control operation of equipment, the secondary tree network networking mode that communication protocol of the present invention adopts, networking mode simply should be used, network operation is all relative simple with foundation, and the reliability of network is higher.
Central coordinator node of the present invention is finished the foundation maintenance of network and the work such as transmitting-receiving of control information, and each peripheral Control Node participates in the network operation process and control each controlled home equipment by the serial ports output command, to realize effective household control.
Description of drawings
The invention will be further described below in conjunction with the drawings and specific embodiments:
Fig. 1 is the structural representation of system of the present invention;
Fig. 2 is the central coordinator of system of the present invention or the structured flowchart of peripheral controllers;
Fig. 3 is the schematic flow sheet of the method for the invention.
Embodiment
As shown in Figure 1, a kind ofly be used to control the home wireless control system of the home equipment of diverse location at home that distributes, comprise a central coordinator, several controlled home equipments and several peripheral controllers that is connected with controlled home equipment.
Wherein, described central coordinator is formed identical with the peripheral controllers structure.As shown in Figure 2, central coordinator and peripheral controllers include MC13213 main control chip, serial port module, balance module and Anneta module, button and display screen, described MC13213 main control chip is connected with serial port module, balance module, button and display screen respectively, and described balance module is connected with Anneta module.
The peripheral controllers of described system is divided into one-level peripheral controllers and secondary peripheral controllers according to its signal strength signal intensity.Central coordinator and one-level peripheral controllers communicate, one-level peripheral controllers and secondary peripheral controllers communicate, central coordinator is sent control command to one-level peripheral controllers and its child node to the one-level peripheral controllers, if control command sends to the one-level peripheral controllers, then the one-level peripheral controllers is carried out associative operation to its institute's fitment of controlling; If control command sends to the child node of one-level peripheral controllers, then the one-level peripheral controllers is transmitted control command to its child node, and its child node is carried out associative operation to its institute's fitment of controlling after receiving the control command that sends to oneself.
Specify the method that home wireless control system of the present invention is controlled the home equipment of diverse location at home of distributing below.
As shown in Figure 3, the flow chart of the method for the home equipment of diverse location at home of distributing being controlled for home wireless control system of the present invention, described method comprises:
Step 100: work beginning;
Step 101: node type and parameter setting: central coordinator node or peripheral Control Node are carried out the node type setting, the line correlation parameter of going forward side by side setting;
Step 102: central coordinator node issue one-level networks and applies for broadcasting;
Step 103: peripheral Control Node is received the application broadcast singal that networks, if greater than the peripheral Control Node signal strength signal intensity threshold values of one-level then enter peripheral Control Node step 104, otherwise changes step 107 over to;
Step 104: peripheral Control Node is sent one-level networking application to central coordinator node;
Step 105: central coordinator node is received the one-level application that networks, if should periphery Control Node signal strength signal intensity greater than the peripheral Control Node signal of one-level threshold values, then enter step 106, otherwise, return to this periphery Control Node networking failure information and change step 107 over to;
Step 106: central coordinator node should the periphery Control Node be set to finish networking work after the peripheral Control Node of one-level, and sends the networking successful information to this periphery Control Node;
Step 107: the one-level of the central coordinator node issue application number of broadcast times that networks, if greater than N time (value of N is 4 among the present invention) then enter step 108, otherwise, change step 102 over to;
Step 108: central coordinator node issue secondary networking application broadcasting, the peripheral Control Node of one-level is transmitted secondary networking application broadcasting to its child node;
Step 109: peripheral Control Node is received the application broadcast singal that networks, if greater than the peripheral Control Node signal strength signal intensity threshold values of secondary then enter peripheral Control Node step 110, otherwise changes step 113 over to;
Step 110: peripheral Control Node is sent secondary networking application by father node to central coordinator node;
Step 111: central coordinator node is received the secondary application that networks, if should periphery Control Node signal strength signal intensity greater than the peripheral Control Node signal of secondary threshold values, then enter step 112, otherwise, change step 113 over to and return to this periphery Control Node networking failure information;
Step 112: central coordinator node should the periphery Control Node be set to finish networking work after the peripheral Control Node of secondary, and sends the networking successful information by the father node of this periphery Control Node to it;
Step 113: the secondary of central coordinator node issue networks and applies for number of broadcast times, if greater than N time (value of N is 4 among the present invention) then enter step 114, otherwise, change step 108 over to, so far, do the leading networking work that peripheral Control Node networks of having finished with central coordinator node, formed initial tree network topological structure, and the peripheral Control Node that networks has been divided network-level;
Step 114: central coordinator node issue one-level networks and applies for broadcasting;
Step 115: whether have peripheral node to wait to network, then change step 116 over to if having, otherwise change step 120 over to;
Step 116: peripheral Control Node is received the application broadcast singal that networks, if greater than the peripheral Control Node signal strength signal intensity threshold values of one-level then enter peripheral Control Node step 117, otherwise changes step 120 over to;
Step 117: peripheral Control Node is sent one-level networking application to central coordinator node;
Step 118: central coordinator node is received the one-level application that networks, if should periphery Control Node signal strength signal intensity greater than the peripheral Control Node signal of one-level threshold values, then enter step 119, otherwise, return to this periphery Control Node networking failure information and change step 120 over to;
Step 119: central coordinator node should the periphery Control Node be set to finish networking work after the peripheral Control Node of one-level, and sends the networking successful information to this periphery Control Node;
Step 120: central coordinator node issue secondary networking application broadcasting, the peripheral Control Node of one-level is transmitted secondary networking application broadcasting to its child node;
Step 121: whether have peripheral node to wait to network, then change step 122 over to if having, otherwise change step 126 over to;
Step 122: peripheral Control Node is received the application broadcast singal that networks, if greater than the peripheral Control Node signal strength signal intensity threshold values of secondary then enter peripheral Control Node step 123, otherwise changes step 126 over to;
Step 123: peripheral Control Node is sent secondary networking application by its father node to central coordinator node;
Step 124: central coordinator node is received the secondary application that networks, if should periphery Control Node signal strength signal intensity greater than the peripheral Control Node signal of secondary threshold values, then enter step 125, otherwise, return to this periphery Control Node networking failure information and change step 126 over to;
Step 125: central coordinator node should the periphery Control Node be set to finish networking work after the peripheral Control Node of secondary, and sends the networking successful information by the father node of this periphery Control Node to it;
Step 126: central coordinator node carries out training in rotation to the peripheral Control Node of one-level;
Step 127: reply after the peripheral Control Node of one-level is received training in rotation information;
Step 128:, then enter step 129, otherwise change step 126 over to if central coordinator node is finished the training in rotation to the peripheral Control Node of all one-levels;
Step 129: central coordinator node carries out training in rotation to the peripheral Control Node of secondary, and the peripheral Control Node of one-level is transmitted the information that the peripheral Control Node of secondary is carried out training in rotation to its child node;
Step 130: reply to central coordinator node by father node after the peripheral Control Node of secondary is received training in rotation information;
Step 131:, then enter step 132, otherwise change step 129 over to if central coordinator node is finished the training in rotation to the peripheral Control Node of all secondarys;
Step 132: central coordinator node waits is externally contained the control command of system node;
Step 133: central coordinator node Control Node to the periphery sends control command, if control command is sent to the peripheral Control Node of secondary, then central coordinator node is transmitted by the father node of the peripheral Control Node of this secondary and delivered to the peripheral Control Node of this secondary;
Step 134: the control command that peripheral Control Node is received is if the control command of oneself is then carried out relevant control operation to the control fitment, if the control command of child node is then transmitted;
Step 135: whether arrive and carry out networking and network operation time, network and the network operation time if arrive to carry out, then change step 114 over to, the peripheral Control Node that begins to carry out not networking and off-grid networks and the network operation operation, otherwise change step 132 over to, central coordinator node waits is externally contained the control command of system node.
The present invention can not only be in the stage of the powering on maintenance that networks, in the communication process of reality, also carry out network operation in real time and the control of the network process of coming in and going out, and can pass through the time interval in the network operation is realized the dormancy of terminal, and can in acceptable time, finish problems such as real-time control information transmission and reception on this basis.
The present invention is not limited to the foregoing description, peripheral controllers can carry out grade classification flexibly according to actual conditions in the home wireless control system, quantity and distribution situation according to controlled plant, peripheral controllers can only be set to the one-level peripheral controllers, perhaps is divided into one-level peripheral controllers, secondary peripheral controllers and three grades of peripheral controllers according to its signal strength signal intensity.