CN106506287A - Scenery control method and system based on ZigBee - Google Patents
Scenery control method and system based on ZigBee Download PDFInfo
- Publication number
- CN106506287A CN106506287A CN201610863650.8A CN201610863650A CN106506287A CN 106506287 A CN106506287 A CN 106506287A CN 201610863650 A CN201610863650 A CN 201610863650A CN 106506287 A CN106506287 A CN 106506287A
- Authority
- CN
- China
- Prior art keywords
- sequence
- configuration information
- scenes number
- scenes
- target device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
- H04L12/2807—Exchanging configuration information on appliance services in a home automation network
Landscapes
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The present invention proposes the scenery control method and system based on ZigBee, belong to the communications field, including building private network, gateway sends sequence of scenes number to source device, scene configuration information corresponding with sequence of scenes number is sent to target device, source device broadcasts predetermined registration operation sequence of scenes number in private network so that target device executes operation corresponding with sequence of scenes number after combining sequence of scenes number comparison.Reduced for the demand of terminal unit memory capacity by way of the information for needing storage to be carried out classification storage, the sequence of scenes number for needing to execute is broadcasted in private network by source device, the target device of corresponding scene serial number of being stored with directly executes operation, it is to avoid need multiple equipment to execute delay caused by forwarding mutually in existing ZigBee-network.
Description
Technical field
The invention belongs to the communications field, more particularly to the scenery control method and system based on ZigBee.
Background technology
Traditional Intelligent household scene function, mostly by the way of gateway saving scenario configuration order, when from movement
When the scenery control request of terminal such as mobile phone is reached, gateway is locally configured according to the scene number retrieval in scenery control request
Good scene command, and control command is issued to terminal unit successively.Based on the shortcoming of said method, prior art is utilized
ZigBee mesh network topologys and the characteristic of MANET, it is proposed that modification method, that is, pass through scene command distribution configuration each
On individual ZigBee terminal units, ZigBee terminal units can send scenery control order to other terminal units.So, even if
Gateway failure or ZigBee communication links go wrong, and configured good scene still can be with normal work, so as to change
The reliability based on ZigBee intelligent domestic systems is entered.
Said method alleviates the pressure of gateway by scene command is distributed configuration in the method for each terminal unit, carries
The high reliability of whole system.When the equipment configured under a scene controls excessive, not only terminal unit needs more
Memory space can also excessively cause network delay as single sends equipment control command, so as to make preserving the instruction set
Into be exactly have the phenomenon of time difference when target device is executed, affect Consumer's Experience.
Content of the invention
In order to solve shortcoming and defect present in prior art, the invention provides being used for reducing network delay and equipment
Execute the scenery control method of time difference.
In order to reach above-mentioned technical purpose, the invention provides the scenery control method based on ZigBee, for setting to source
The communication process of standby and target device is controlled, and the control method includes:
Gateway sends networking instruction to source device and target device so that the source device is with the target device in basis
The private network for including source device, target device is set up in the networking instruction;
The gateway sends sequence of scenes number to the source device, sends and the sequence of scenes number to the target device
Corresponding scene configuration information, the scene configuration information include operational order corresponding with the sequence of scenes number;
The source device broadcasts predetermined registration operation sequence of scenes number in the private network, if the target device is
Be stored with default scene configuration information corresponding with the predetermined registration operation sequence of scenes number, then execute and the default scene configuration
The corresponding operational order of information.
Optionally, the control method also includes:
The source device is made to send the sequence of scenes number request with very first time stamp to the gateway;
The gateway is asked according to the sequence of scenes number, is chosen and is stabbed time nearest sequence of scenes with the very first time
Number, and the sequence of scenes number nearest with the stamp time very first time is sent to the source device;
Wherein, also include the address mark of the source device in the sequence of scenes number request.
Optionally, the control method also includes:
The target device is made to ask to the scene configuration information that the gateway is sent with the second timestamp;
The gateway is asked according to the scene configuration information, is chosen the scene nearest with the second timestamp time and is matched somebody with somebody
Confidence ceases, and the scene configuration information nearest with the second timestamp time is sent to the target device;
Make the target device according to the nearest scene configuration information with the second timestamp time to the field that stored
Scape configuration information is updated;
Wherein, also include the address mark of the target device in the scene configuration information request.
Optionally, make the target device according to the scene configuration information nearest with the second timestamp time to depositing
The scene configuration information of storage is updated, including:
Extract the sequence of scenes number in the scene configuration information nearest with the second timestamp time;
Every item data in the sequence of scenes number is carried out item by item with the every item data in the sequence of scenes number for storing
Contrast, if there is different sequence of scenes number, then by the different scene sequence in the sequence of scenes number for having stored
Row number and operation is added from the corresponding scene configuration information of the different sequence of scenes number.
Optionally, the control method also includes:
The sequence of scenes number and scene configuration information corresponding with the sequence of scenes number are by being connected with the gateway
Control terminal generate;Or
The sequence of scenes number and scene configuration information corresponding with the sequence of scenes number are stored in advance in the source
In equipment;Or
The sequence of scenes number and scene configuration information corresponding with the sequence of scenes number are stored in advance in the net
The Central Shanxi Plain, and send to the source device after triggering predetermined registration operation.
Present invention also offers executing the scenery control based on ZigBee of time difference for reducing network delay and equipment
System, the control system include the source device and target device communicated based on ZigBee-network by gateway with the gateway,
In the control system:
The gateway is instructed for setting up the networking of private network for sending to the source device and the target device,
Sequence of scenes number is sent to the source device, scene configuration letter corresponding with the sequence of scenes number is sent to the target device
Breath, the scene configuration information include operational order corresponding with the sequence of scenes number;
The source device is used for obtaining sequence of scenes number from the gateway, broadcasts predetermined registration operation in the private network
Sequence of scenes number, and after triggering predetermined registration operation, sequence of scenes number is sent to target device;
The target device is used for obtaining scene configuration information from the gateway, and is receiving predetermined registration operation scene sequence
After row number, operational order corresponding with the default scene configuration information is executed.
Optionally, control panel being provided with the source device, being provided with button on the control panel, the button is
Entity button sets virtual key in the display device.
Optionally, the sequence of scenes number for storing in the source device is corresponded with the button.
Optionally, the target device is execution terminal or sensor terminal.
Optionally, the predetermined registration operation includes that the button is operated.
The beneficial effect brought of technical scheme that the present invention is provided is:
Reduced for the need of terminal unit memory capacity by way of the information for needing storage to be carried out classification storage
Ask, the sequence of scenes number for needing to execute is broadcasted in private network by source device, and the target of the corresponding scene serial number that is stored with sets
Standby directly executes operation, it is to avoid execute delay caused by the mutual forwarding of multiple equipment is needed in existing ZigBee-network.
Description of the drawings
In order to be illustrated more clearly that technical scheme, embodiment will be described below needed for accompanying drawing to be used
Be briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this area general
For logical technical staff, on the premise of not paying creative work, can be with according to these other accompanying drawings of accompanying drawings acquisition.
Fig. 1 is the schematic flow sheet of the scenery control method based on ZigBee that the present invention is provided;
Fig. 2 is the additional flow schematic diagram one of the scenery control method based on ZigBee that the present invention is provided;
Fig. 3 is the additional flow schematic diagram two of the scenery control method based on ZigBee that the present invention is provided.
Specific embodiment
The technical scheme of the embodiment of the present invention is explained and illustrated with reference to the accompanying drawing of the embodiment of the present invention, but under
It is only the preferred embodiments of the present invention to state embodiment, and not all.Embodiment in based on embodiment, those skilled in the art
On the premise of creative work is not made, obtained other embodiment, belongs to protection scope of the present invention.
" one embodiment " or " example " or " example " that quotes in this manual means that itself describes in conjunction with the embodiments
Special characteristic, structure or characteristic can be included at least one embodiment disclosed in this patent.Phrase is " in one embodiment
In " appearance of each position in the description is not necessarily all referring to same embodiment.
In addition, can be using term " coupling " and " coupling " and its derivative in specification and claims appended by the present invention
Word.It is to be understood by the skilled artisans that these terms are not intended as mutual synonym." coupling " is used for indicating each other can direct thing
Reason contact or electrical contact or can not two or more elements of direct physical contact or electrical contact co-operate each other or phase
Interaction." connection " is used for representing the connection setup between two or more elements coupled to each other.
The process step illustrated in the accompanying drawing appended by this specification is by including hardware (such as circuit, special logic list
Unit etc.), firmware (such as on general-purpose calculating appts or special purpose machinery run) or both combination processs logic execution.
Although each embodiment is described to process according to some order operations below, it is understood that, the step of some describe
Operation can be executed in different order.Additionally, some step operations can be executed in parallel rather than be sequentially performed.
Embodiment one
The invention provides the scenery control method based on ZigBee, for the communication process to source device and target device
It is controlled, as shown in figure 1, the control method includes:
101st, gateway sends networking instruction to source device and target device so that the source device is existed with the target device
Instructed to set up according to the networking and include the private network of source device, target device;
102nd, the gateway sends sequence of scenes number to the source device, sends and the scene sequence to the target device
The corresponding scene configuration information of row number, the scene configuration information include operational order corresponding with the sequence of scenes number;
103rd, the source device broadcasts predetermined registration operation sequence of scenes number in the private network, if the target device
Be stored with default scene configuration information corresponding with the predetermined registration operation sequence of scenes number, then execute and the default scene
The corresponding operational order of configuration information.
In force, in order to solve practicality ZigBee wireless communication technologys in prior art and there is communication delay, equipment to hold
The defect of row existence time difference, embodiments provides the scenery control method based on ZigBee, to entering using ZigBee
The communication mode of the wireless device in the scene of row communication is controlled, and reduces communication delay, avoids equipment from holding so as to play
The defect of existence time difference during row instruction.In the scene communicated using ZigBee, including gateway, and carry out with gateway
The source device and target device of radio communication.
Based on above-mentioned scene set up communication structure, the scenery control method, including:
First, gateway generates networking instruction based on current scene demand, networking instruction is sent to networking and is instructed so that source
Equipment and target device after networking instruction is received, can group build up the private network based on ZigBee wireless communication technologys.
Secondly, after private network is set up, gateway sends sequence of scenes number to the source device in private network, to privately owned net
Target device in network sends scene configuration information corresponding with sequence of scenes number.Sequence of scenes number is referred to and is treated in private network
Carry out the serial number of scenery control order.Scene configuration information includes operational order corresponding with sequence of scenes number.
In above-mentioned scenery control method, source device is merely responsible for preserving and sending sequence of scenes number, and target device is merely responsible for
Preserve and sequence of scenes number and scene configuration information corresponding with sequence of scenes number, carried out point by the information for storing will be needed
The mode of class storage is reduced for the demand of terminal unit memory capacity.When scenery control is carried out, source device will need to hold
Capable sequence of scenes number is broadcasted in private network, and the target device of the corresponding scene serial number that is stored with directly executes operation, keeps away
Exempt from existing ZigBee-network, to need multiple equipment to execute delay caused by forwarding mutually.
For the ease of being illustrated to sequence of scenes number and scene configuration information.
For example in scene one, the first luminaire, the second luminaire and the 4th luminaire is needed to light, the 3rd shines
Bright equipment extinguishes;In scene two, the first luminaire and the second luminaire is needed to extinguish, the 3rd luminaire and the 4th shines
Bright equipment is lighted.In above-mentioned two scene, scene one and scene two are sequence of scenes number, corresponding with scene one and scene two
The situation of lighting of luminaire is scene configuration information corresponding with sequence of scenes number.
Finally, after in private network, source device, target device get sequence of scenes number and scene configuration information, source
Equipment broadcasts predetermined registration operation sequence of scenes number in private network, target device after predetermined registration operation sequence of scenes number is received,
Sequence of scenes number in the scene configuration information for having been stored with itself is contrasted, if in the sequence of scenes number for itself having stored
Comprising predetermined registration operation sequence of scenes number, then execute operational order corresponding with predetermined registration operation sequence of scenes number.
For example, it is desired to the luminaire in current scene is controlled, source device is received to be needed to open the first illumination
Equipment, and extinguish second, third, the instruction of the 4th luminaire.The sequence of scenes that source device is stored at itself according to the instruction
Choose in number to the corresponding predetermined registration operation sequence of scenes number of the instruction, predetermined registration operation sequence of scenes number is carried out in private network
Broadcast, the target device of first to fourth luminaire of responsible control in private network after broadcast is received, at itself
Contrasted in the scene configuration information of storage, if the scene configuration information for itself having stored includes and predetermined registration operation scene
The corresponding sequence of scenes number of serial number, then be controlled to lighting for first to fourth luminaire, so as to complete to default behaviour
The response of work.
Carry out in the present invention radio communication based on communication protocol standard ZigBee, be based on IEEE802.15.4 standards
Low-power consumption LAN protocol.Specify that ZigBee technology is the radio communication skill of a kind of short distance, low-power consumption according to international standard
Art.This title (also known as ZigBee protocol) from Apiss eight words wave, due to Apiss (bee) be by circle in the air with " drone "
(zig) " dancing " for shaking wing comes and companion's transmission pollen place azimuth information, that is to say, that Apiss are by such side
Formula constitutes the communication network in colony.Be characterized in closely, low complex degree, self-organizing, low-power consumption, low data rate.Main
It is suitable for automatically controlling and remote control field, various equipment can be embedded in.In brief, ZigBee is exactly a kind of cheap
, the near radio networking mechanics of communication of low-power consumption.ZigBee is a kind of wireless network protocol of low speed short-distance transmission.
Zigbee protocol is respectively physical layer (PHY), MAC layer (MAC), transport layer (TL), Internet from top to bottom
(NWK), application layer (APL) etc..Wherein physical layer and MAC layer follow the regulation of IEEE802.15.4 standards.
Optionally, as shown in Fig. 2 the control method also includes:
201st, the source device is made to send the sequence of scenes number request with very first time stamp to the gateway;
202nd, the gateway is asked according to the sequence of scenes number, is chosen and is stabbed time nearest scene with the very first time
Serial number, and the sequence of scenes number nearest with the stamp time very first time is sent to the source device;
Wherein, also include the address mark of the source device in the sequence of scenes number request.
In force, in order to keep the actual effect of sequence of scenes number, need to make source device be communicated with gateway so that source
Equipment can obtain newest sequence of scenes information from gateway.
In step 201, source device generates very first time stamp corresponding with current time, is stabbed to gateway based on the very first time
The sequence of scenes number request with very first time stamp is sent, newest scene sequence is sent to source device according to request in order to gateway
Row number is asked.
In step 202., gateway receives the sequence of scenes number request with very first time stamp, in the field for itself having stored
Choose in scape serial number inventory and nearest sequence of scenes inventory is stabbed away from the very first time, and send to source device.
In sequence of scenes number request with very first time stamp in addition to the very first time stabs, also include the source for sending the request
The address mark of equipment, so after gateway receives request, the address device included according to request is identified, will with first when
Between stab time nearest sequence of scenes number and send to address and identify at the source device for representing, information now does not adopt the side of broadcast
Formula sends, and prevents other source devices and target device in private network clear according to nearest sequence of scenes number is stabbed away from the very first time
By mistake renewal is singly carried out.
Optionally, as shown in figure 3, the control method also includes:
301st, the target device is made to ask to the scene configuration information that the gateway is sent with the second timestamp;
302nd, the gateway is asked according to the scene configuration information, chooses the field nearest with the second timestamp time
Scape configuration information, and the scene configuration information nearest with the second timestamp time is sent to the target device;
303rd, make the target device according to the scene configuration information nearest with the second timestamp time to storing
Scene configuration information be updated;
Wherein, also include the address mark of the target device in the scene configuration information request.
In force, in order to keep the actual effect of scene configuration information, need to make target device be communicated with gateway, make
Obtain target device newest scene configuration information can be obtained from gateway.
In step 301, target device generates the second timestamp corresponding with current time, based on the second timestamp to net
Close the scene configuration information sent with the second timestamp to ask, sent to target device according to request in order to gateway newest
Scene configuration information is asked.
In step 302, gateway receives the scene configuration information request with the second timestamp, has been stored at itself
The sequence of scenes inventory nearest away from the second timestamp is chosen in scene configuration information inventory, and is sent to target device.
In scene configuration information request with the second timestamp in addition to the second timestamp, also include sending the request
The address mark of target device, so after gateway receives request, the address device included according to request is identified, will be with the
Two timestamp times nearest scene configuration information sends to address and identifies at the target device for representing, and information now is not adopted
The mode of broadcast sends, and prevents other target devices and source device in private network according to the scene nearest away from the second timestamp
Configuration information inventory carries out renewal by mistake.
Optionally, make the target device according to the scene configuration information nearest with the second timestamp time to depositing
The scene configuration information of storage is updated, including:
Extract the sequence of scenes number in the scene configuration information nearest with the second timestamp time;
Every item data in the sequence of scenes number is carried out item by item with the every item data in the sequence of scenes number for storing
Contrast, if there is different sequence of scenes number, then by the different scene sequence in the sequence of scenes number for having stored
Row number and operation is added from the corresponding scene configuration information of the different sequence of scenes number.
In force, the scene after back target device obtains scene configuration information from gateway, to itself storage
Configuration information is updated, and specific renewal process includes:
Target device extracts sequence of scenes number, the scene for then having been stored with itself from the scene configuration information for receiving
Serial number is compared, if the sequence of scenes number for getting does not include in the sequence of scenes number that itself stores, by which
Stored, the renewal so as to complete scene configuration information is processed.
Optionally, the control method also includes:
The sequence of scenes number and scene configuration information corresponding with the sequence of scenes number are by being connected with the gateway
Control terminal generate;Or
The sequence of scenes number and scene configuration information corresponding with the sequence of scenes number are stored in advance in the source
In equipment;Or
The sequence of scenes number and scene configuration information corresponding with the sequence of scenes number are stored in advance in the net
The Central Shanxi Plain, and send to the source device after triggering predetermined registration operation.
In force, the sequence of scenes number for storing in a source device and a target device and the producing method of scene configuration information
Varied, it is illustrated here.
(1) generated by control terminal.Here control terminal can be mobile terminal, typically mobile phone and flat board electricity
The mobile device with information transmit-receive function such as brain.Application program, use of the user according to itself are installed on mobile terminals
Demand clicks the scenery control effect for needing to realize on corresponding application program so that gateway is receiving mobile terminal transmission
Scenery control effect after, determine sequence of scenes number corresponding with scenery control effect and scene corresponding with sequence of scenes number
Configuration information, and then the content according to step 101 to 103 is controlled to scene.
(2) it is stored in advance in source device.When source device dispatches from the factory or user uses, producer or user by conventional or
Oneself amended sequence of scenes number and corresponding scene configuration information are stored in source device so that gateway, source device, mesh
Content of the marking device according to step 101 to 103 is controlled to scene.
(3) prestore in a gateway.When scene serial number and scene configuration information are stored in gateway, gateway is made to monitor
Triggering command so that when predetermined registration operation is triggered, the content shown in gateway execution step 101 to 103 is controlled to scene.
Here the operation button that predetermined registration operation can be provided on gateway is pressed or the control terminal being connected with gateway is to net
Close and send control instruction.
The present invention proposes the scenery control method based on ZigBee, and including building private network, gateway is sent out to source device
Sequence of scenes number being sent, scene configuration information corresponding with sequence of scenes number being sent to target device, source device is in private network
Broadcast predetermined registration operation sequence of scenes number so that target device executes corresponding with sequence of scenes number after combining sequence of scenes number comparison
Operation.Reduced for the demand of terminal unit memory capacity by way of the information for needing storage to be carried out classification storage,
The sequence of scenes number for needing to execute is broadcasted in private network by source device, and the target device of the corresponding scene serial number that is stored with is straight
Connect and execute operation, it is to avoid in existing ZigBee-network, need multiple equipment delay to be executed caused by forwarding mutually.
Embodiment two
The scenery control method based on ZigBee is proposed in embodiment one, then proposes and can realize in the present embodiment
The scenery control system based on ZigBee of above-mentioned scenery control method, the control system include gateway and the gateway base
The source device communicated in ZigBee-network and target device, in the control system:
The gateway is instructed for setting up the networking of private network for sending to the source device and the target device,
Sequence of scenes number is sent to the source device, scene configuration letter corresponding with the sequence of scenes number is sent to the target device
Breath, the scene configuration information include operational order corresponding with the sequence of scenes number;
The source device is used for obtaining sequence of scenes number from the gateway, broadcasts predetermined registration operation in the private network
Sequence of scenes number, and after triggering predetermined registration operation, sequence of scenes number is sent to target device;
The target device is used for obtaining scene configuration information from the gateway, and is receiving predetermined registration operation scene sequence
After row number, operational order corresponding with the default scene configuration information is executed.
In force, the scenery control system includes gateway, and the source being connected with gateway based on ZigBee communication agreement
Equipment and target device.In typical application scenarios, at least include a gateway in the scenery control system, as privately owned net
The coordinator of the network network structure to private network is managed;At least one source device and at least one target device.
ZigBee defines the equipment of 3 types, and every kind of equipment has the functional requirement of oneself:
ZigBee coordinators (Co-ordinator), are to start a kind of equipment with Configuration network, are the centromeres of network
Point, a ZigBee-network have only allowed a ZigBee coordinator;
ZigBee routers (Router), are a kind of equipment that supports and associate, can forward the message to other equipment,
ZigBee-network or tree network can have multiple ZigBee routers, ZigBee Star Networks not to support ZigBee routers;
ZigBee terminal units (EndDevice), execute the equipment of concrete function.
3 kinds of above equipment can be divided into full-function device (FFD) and half function device (RFD) according to functional completeness.Its
In, full-function device can be used as coordinator, router or terminal unit, and half function device can only be used as terminal unit.One
FFD can FFD other with multiple RFD or multiple communicate, and a RFD can only be communicated with a FFD.
The ZigBee communication network being made up of above-mentioned three kinds of equipment is being carried out as shown in previous embodiment step 101 is to 103
The step of before, it is necessary first to carry out the operation of netinit, specific initialization step includes:
1. determine network coordinator, first determine whether whether node is FFD nodes, then judge this FFD node whether at which
Whether coordinator be present in his network or in network.By active scan, a beacon request order (Beacon is sent
Request command), scanning time limit (T_scan_duration) is then set, if all do not had within the scanning time limit
Detect beacon, then FFD is considered as in its pos without coordinator, then now can just set up the ZigBee nets of oneself
Network, and the coordinator as this network is constantly be generated beacon and is broadcasted.
2. channel scan procedure is carried out.Including two processes of energy scan and active scan:First to specified channel or
The channel of person's acquiescence carries out energy measuring, to avoid possible interference.Letter is carried out to measured energy value incrementally
Road sorts, and abandons so much energy value beyond allowing the channel of energy level, selects to allow the channel of energy level simultaneously
It is available channel to mark these channels.Then active scan, network information search node communication radius in are carried out.These information
Broadcasted in the form of beacon frame in a network, node obtains these beacon frames by active channel scan mode, then according to this
A little information, find a best, relatively quiet channel, by the result for recording, select a channel, the channel exist
Minimum ZigBee-network, preferably without ZigBee equipment.During active scan, mac layers will abandon the service of phy layer datas
The all frames in addition to beacon for receiving.
3. network ID is set.After finding suitable channel, coordinator will for network select network identifier (PANID,
Value<=0x3FFF), this ID must be unique in the channel for being used, and can not conflict with other ZigBee-networks,
And can not be broadcast address oxFFFF (this address is reserved address, it is impossible to using).PANID can be by intercepting other networks
ID then select the mode of an ID that will not conflict obtaining, it is also possible to the channel of artificial invisible scanning was determined not later
PANID with other network conflicts.There are two kinds of address patterns in ZigBee-network:Extended address (64) and short address (16
Position), wherein extended address is distributed by IEEE tissues, for unique device identification;Short address is used for equipment mark in local network
Know, in one network, the short address of each equipment must be unique, and is passed through by his father's node distribution when node adds network
Communicated using short address.For coordinator, short address is typically set at 0x0000;
After the completion of previous step, the ZigBee mesh networks with regard to successful initialization wait for the addition of other nodes afterwards.
The most strong father node of signal in the range of choice (including coordinator) is added network when node networks, after success, a net will be obtained
Network short address simultaneously carries out sending and receiving for data by this address, and network topology and address will be stored in respective
In flash.
After initialization operation is carried out, source device and target device add network as network node by coordinator:
After node coordinator determines, node sets up connection addition network firstly the need of with coordinator.In order to set up connection, FFD is saved
Point needs to file a request to coordinator, and coordinator according to circumstances decides whether to allow which to connect after receiving the connection request of node
Connect, then the node of request connection is responded, node is set up with coordinator after being connected, and could realize the transmitting-receiving of data.Tool
The flow process of body can be divided into below step:
1. Network Search coordinator.First can active scan search ambient network coordinator, if scanning the time limit in
Detect beacon, then coordinator will be obtained for information about, at this moment just connection request is sent to coordinator.Selecting properly
Network after, mac layers will be asked to the PIB such as phyCurrentChannel, macPANID of physical layer and mac layers category in upper strata
Property is arranged accordingly.If be not detected by, after certain interval of time, node initiates to scan again.
2. association request command (Associate request command) is sent.Association request command is sent by node
Respond immediately to an acknowledgement frame (ACK) after receiving to coordinator, coordinator, while connection indication is sent to its upper strata,
Represent the connection request for having received node.But it is not intended that having built up connection, only represent that coordinator has been received
The connection request of node.After the upper strata of the mac layers of coordinator receives connection indication, by the resource situation according to oneself
(memory space and energy) decides whether the addition request for agreeing to this node, and then the mac layers to node send response.
3. mediators handle is waited.After node receives the ACK that coordinator adds request command, node mac will wait one
The section time, receive the connection response of coordinator.Within the predetermined time, if receiving connection response, it by this respond to
Its upper strata notice.And coordinator to node mac layers send response when one wait-for-response time (T_ can be set
ResponseWaitTime) waiting coordinator to add the process of request command to which, if the resource of coordinator is enough, coordinator
To the short address of node distribution one 16, and the connection response order comprising new address and successful connection state can be produced, then
This node is successfully set up connection and can start to communicate with coordinator.If coordinator resource is not enough, node to be added will
Solicited message is resend, is directly networked successfully.
4. data request command is sent.If coordinator agrees to that node is added in response time, then will produce association
Response command (Associate response command) simultaneously stores this order.After response time, node sends number
Respond immediately to ACK after receiving to coordinator, coordinator according to request command (Data request command), then by storage
Node is issued in associated response order.If after response time is arrived, coordinator does not also decide whether to agree to that node is added, then
Node will attempt to extract associated response order from the beacon frame of coordinator, can be to network successfully, otherwise again if success
Solicited message is sent until networking successfully.
5. reply.After node is subject to associated response order, an acknowledgement frame (ack) is replied to coordinator immediately, to confirm
Connection response order is received, now node will preserve short address and the extended address of coordinator, and the MLME of node is upwards
Layer sends connection and confirms that primitive, notice association add successful information.
Propose source device and target device to obtain from gateway in step 201-202,301-303 in embodiment one
The step of information realization self information updates, and the equipment in order to make gateway accurately can update request to initiation be carried out back
Multiple, the equipment for needing order to initiate to update request carries the device identification of itself in the request, specifically each device identification
Including 2 kinds of following addresses:
1.IEEEMAC addresses:
This is the address of a kind of 64, and this address is allocated by IEEE tissues, for unique mark equipment, the whole world
There is identical MAC Address without any two equipment.In ZigBee-network, it is extended address to be also sometimes MAC Address.
2.16 position short address:
16 short addresses are used for identifying equipment in the home network, and send data in a network, so if being in
It is possible in different networks with identical short address.It is given by the father node by it when a node adds network
Distribution short address.
240 different applications of each device node definable, each object are corresponded to a port, from 1 to
240.2 extra ports, port 0 and port 255 is further defined, port 0 is reserved to the data of ZDO (device object layer)
Interface, port 255 are used for all application broadcast datas.Port 241 to 254 is reservation.
Optionally, control panel being provided with the source device, being provided with button on the control panel, the button is
Entity button sets virtual key in the display device.Predetermined registration operation includes that the button is operated.
In force, in order to be controlled to source device, control panel can be installed on source device, on the control panel
Button is then provided with.The button can be entity button, or the virtual key being arranged in touch screen.
Optionally, the sequence of scenes number for storing in the source device is corresponded with the button.
So when needing to choose sequence of scenes, user directly can press corresponding with sequence of scenes number to be chosen
Button can complete to choose.
Optionally, the target device is execution terminal or sensor terminal.
In force, the device type belonging to target device can be the execution terminal with executive capability, for example, have
The headlamp switch circuit of network transmission-receiving function, the behaviour that the light of scene can be lighted according to the information for receiving or be extinguished
Make, can also be the sensor terminal with network transmission-receiving function, obtaining for variable data can be carried out according to the information for receiving
Take, and the variable data for getting is sent by ZigBee wireless networks.
The present invention proposes the scenery control system based on ZigBee, is based on ZigBee nets including gateway and the gateway
Source device and target device that network is communicated.By will need storage information carry out classify storage by way of reduce for
The sequence of scenes number for needing to execute is broadcasted in private network by the demand of terminal unit memory capacity, source device, and it is right to be stored with
The target device of sequence of scenes number is answered directly to execute operation, it is to avoid to need multiple equipment to forward in existing ZigBee-network mutually and lead
Cause executes delay.
Those skilled in the art will readily occur to its of the present invention after considering description and putting into practice invention disclosed herein
Its embodiment.The application is intended to any modification of the present invention, purposes or adaptations, these modifications, purposes or
Person's adaptations follow the general principle of the present invention and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.Description and embodiments are considered only as exemplary, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be appreciated that the precision architecture for being described above and being shown in the drawings is the invention is not limited in, and
And various modifications and changes can carried out without departing from the scope.The scope of the present invention is only limited by appended claim.
Claims (10)
1. the scenery control method based on ZigBee, for being controlled to the communication process of source device and target device, which is special
Levy and be, the control method includes:
Gateway sends networking instruction to source device and target device so that the source device is with the target device according to described
The private network for including source device, target device is set up in networking instruction;
The gateway sends sequence of scenes number to the source device, sends to the target device corresponding with the sequence of scenes number
Scene configuration information, the scene configuration information includes operational order corresponding with the sequence of scenes number;
The source device broadcasts predetermined registration operation sequence of scenes number in the private network, if the target device is stored
There is default scene configuration information corresponding with the predetermined registration operation sequence of scenes number, then execute and the default scene configuration information
Corresponding operational order.
2. the scenery control method based on ZigBee according to claim 1, it is characterised in that the control method is also wrapped
Include:
The source device is made to send the sequence of scenes number request with very first time stamp to the gateway;
The gateway is asked according to the sequence of scenes number, is chosen and is stabbed time nearest sequence of scenes number with the very first time,
And send the sequence of scenes number nearest with the stamp time very first time to the source device;
Wherein, also include the address mark of the source device in the sequence of scenes number request.
3. the scenery control method based on ZigBee according to claim 1, it is characterised in that the control method is also wrapped
Include:
The target device is made to ask to the scene configuration information that the gateway is sent with the second timestamp;
The gateway is asked according to the scene configuration information, chooses the scene configuration letter nearest with the second timestamp time
Breath, and the scene configuration information nearest with the second timestamp time is sent to the target device;
Scene of the target device according to the scene configuration information nearest with the second timestamp time to having stored is made to match somebody with somebody
Confidence breath is updated;
Wherein, also include the address mark of the target device in the scene configuration information request.
4. the scenery control method based on ZigBee according to claim 3, it is characterised in that make the target device root
The scene configuration information for having stored is updated according to the scene configuration information nearest with the second timestamp time, including:
Extract the sequence of scenes number in the scene configuration information nearest with the second timestamp time;
Every item data in the sequence of scenes number is contrasted item by item with the every item data in the sequence of scenes number for storing,
If there is different sequence of scenes number, then in the sequence of scenes number for having stored by the different sequence of scenes number with
And operation is added from the corresponding scene configuration information of the different sequence of scenes number.
5. the scenery control method based on ZigBee according to claim 1, it is characterised in that the control method is also wrapped
Include:
The sequence of scenes number and scene configuration information corresponding with the sequence of scenes number are by the control being connected with the gateway
Terminal processed is generated;Or
The sequence of scenes number and scene configuration information corresponding with the sequence of scenes number are stored in advance in the source device
In;Or
The sequence of scenes number and scene configuration information corresponding with the sequence of scenes number are stored in advance in the gateway,
And send to the source device after triggering predetermined registration operation.
6. the scenery control system based on ZigBee, the control system include that gateway and the gateway are based on ZigBee-network
The source device for being communicated and target device, it is characterised in that in the control system:
The gateway is instructed for setting up the networking of private network for sending to the source device and the target device, to institute
State source device and send sequence of scenes number, scene configuration information corresponding with the sequence of scenes number is sent to the target device,
The scene configuration information includes operational order corresponding with the sequence of scenes number;
The source device is used for obtaining sequence of scenes number from the gateway, broadcasts predetermined registration operation scene in the private network
Serial number, and after triggering predetermined registration operation, sequence of scenes number is sent to target device;
The target device is used for obtaining scene configuration information from the gateway, and is receiving predetermined registration operation sequence of scenes number
Afterwards, operational order corresponding with the default scene configuration information is executed.
7. the scenery control system based on ZigBee according to claim 6, it is characterised in that set at the source device
There is control panel, be provided with button on the control panel, the button is entity button or sets virtuality in the display device
Button.
8. the scenery control system based on ZigBee according to claim 7, it is characterised in that deposit in the source device
The sequence of scenes number of storage is corresponded with the button.
9. the scenery control system based on ZigBee according to claim 6, it is characterised in that the target device is for holding
Row terminal or sensor terminal.
10. the scenery control system based on ZigBee according to claim 7, it is characterised in that the predetermined registration operation bag
Include the button to be operated.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610863650.8A CN106506287A (en) | 2016-09-29 | 2016-09-29 | Scenery control method and system based on ZigBee |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610863650.8A CN106506287A (en) | 2016-09-29 | 2016-09-29 | Scenery control method and system based on ZigBee |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106506287A true CN106506287A (en) | 2017-03-15 |
Family
ID=58291186
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610863650.8A Pending CN106506287A (en) | 2016-09-29 | 2016-09-29 | Scenery control method and system based on ZigBee |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106506287A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107360034A (en) * | 2017-07-25 | 2017-11-17 | 美的智慧家居科技有限公司 | Gateway restoration methods, device and its equipment |
CN108037743A (en) * | 2017-12-01 | 2018-05-15 | 王建龙 | Scene sharing method, scenario building method, UE equipment and intelligent housing system |
CN108259281A (en) * | 2018-02-27 | 2018-07-06 | 中国地质大学(武汉) | Intelligent domestic system based on ZigBee and Raspberry Pi |
CN109525621A (en) * | 2017-09-20 | 2019-03-26 | 华为技术有限公司 | A kind of method of data synchronization, equipment and system based on ZigBee binding |
CN111431879A (en) * | 2020-03-18 | 2020-07-17 | 山东比特智能科技股份有限公司 | Scene response method for Zwave guest control system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1265753A (en) * | 1997-06-25 | 2000-09-06 | 三星电子株式会社 | Method and apparatus for creating home network macros |
US20100074116A1 (en) * | 2008-09-25 | 2010-03-25 | Wayne-Dalton Corp. | System and Method of Controlling a Wireless Radio-Frequency Network Using a Gateway Device |
CN202395761U (en) * | 2011-12-31 | 2012-08-22 | 上海融帜信息技术有限公司 | Internet access box with digital shortcut input and control |
CN102769555A (en) * | 2012-06-27 | 2012-11-07 | 喻应东 | Intelligent home system |
CN104142659A (en) * | 2013-11-12 | 2014-11-12 | 珠海优特电力科技股份有限公司 | Method and system for switching smart home scenes |
CN104735143A (en) * | 2015-03-18 | 2015-06-24 | 湖南天冠电子信息技术有限公司 | Batch control system and method based on smart home cloud platform |
CN105182777A (en) * | 2015-09-18 | 2015-12-23 | 小米科技有限责任公司 | Equipment controlling method and apparatus |
-
2016
- 2016-09-29 CN CN201610863650.8A patent/CN106506287A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1265753A (en) * | 1997-06-25 | 2000-09-06 | 三星电子株式会社 | Method and apparatus for creating home network macros |
US20100074116A1 (en) * | 2008-09-25 | 2010-03-25 | Wayne-Dalton Corp. | System and Method of Controlling a Wireless Radio-Frequency Network Using a Gateway Device |
CN202395761U (en) * | 2011-12-31 | 2012-08-22 | 上海融帜信息技术有限公司 | Internet access box with digital shortcut input and control |
CN102769555A (en) * | 2012-06-27 | 2012-11-07 | 喻应东 | Intelligent home system |
CN104142659A (en) * | 2013-11-12 | 2014-11-12 | 珠海优特电力科技股份有限公司 | Method and system for switching smart home scenes |
CN104735143A (en) * | 2015-03-18 | 2015-06-24 | 湖南天冠电子信息技术有限公司 | Batch control system and method based on smart home cloud platform |
CN105182777A (en) * | 2015-09-18 | 2015-12-23 | 小米科技有限责任公司 | Equipment controlling method and apparatus |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107360034A (en) * | 2017-07-25 | 2017-11-17 | 美的智慧家居科技有限公司 | Gateway restoration methods, device and its equipment |
CN109525621A (en) * | 2017-09-20 | 2019-03-26 | 华为技术有限公司 | A kind of method of data synchronization, equipment and system based on ZigBee binding |
CN109525621B (en) * | 2017-09-20 | 2020-09-18 | 华为技术有限公司 | Data synchronization method, equipment and system based on ZigBee binding |
CN108037743A (en) * | 2017-12-01 | 2018-05-15 | 王建龙 | Scene sharing method, scenario building method, UE equipment and intelligent housing system |
CN108259281A (en) * | 2018-02-27 | 2018-07-06 | 中国地质大学(武汉) | Intelligent domestic system based on ZigBee and Raspberry Pi |
CN111431879A (en) * | 2020-03-18 | 2020-07-17 | 山东比特智能科技股份有限公司 | Scene response method for Zwave guest control system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106506287A (en) | Scenery control method and system based on ZigBee | |
CN102057731B (en) | Method of establishing a wireless multi-hop network | |
JP6764495B2 (en) | How to configure a node and the node to be configured | |
RU2573750C2 (en) | Improved commissioning of wireless network systems | |
CN102148731B (en) | Smart home system and end device thereof | |
JP6408743B2 (en) | Mesh WLAN controller, WLAN device, and method of operation for WLAN provisioning | |
CN102687488B (en) | The address conflict with enhancing solves functional Radio Network System | |
CN107770832B (en) | Wireless relay ad hoc network method with anti-interference performance | |
US20040121792A1 (en) | Multi-protocol network and method of switching protocols | |
AU2020103213A4 (en) | AIPB- Routing Protocol Verification: Ad Hoc Routing Protocol Intelligent Verification Process Based on Beagle Bone Black kit | |
US20130344811A1 (en) | Method for operating and commissioning devices in a zigbee network | |
JP6730251B2 (en) | Methods for commissioning network nodes | |
JP7450762B2 (en) | Efficient commissioning of radio control systems | |
CN115412581B (en) | Mesh multi-scene fusion networking method and system and readable storage medium | |
CN110248320A (en) | Wireless self-organization network management method based on time synchronization and Frequency Synchronization | |
CN114390487A (en) | Robot communication device based on wireless Mesh network | |
CN108064089A (en) | A kind of non-stop layer node Ad Hoc network method based on ZigBee | |
KR100894502B1 (en) | Personal Area Network system and method of beacon scheduling the same | |
CN113438634B (en) | Intelligent door lock Bluetooth node role switching and networking method based on Internet of things | |
CN106101221B (en) | The information synchronization method based on distributed storage in intelligent illuminating system | |
CN104168626A (en) | Wireless network automatic networking method based on power-on synchronization | |
US11956648B2 (en) | Optimize commissioning in ZigBee network | |
CN114080002A (en) | System and method for realizing batch automatic networking of ZigBee devices | |
Camacho Martínez | Implementation and testing of LOADng: a routing protocol for WSN | |
CN108954696B (en) | Air conditioner control system and method based on Thread protocol |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170315 |
|
RJ01 | Rejection of invention patent application after publication |