45 | | == Specification == |
46 | | |
47 | | The two ways of connecting to a Zigbee island (dongle or concentrator) are quite similar, the dongle and external concentrator have primitives for connecting to a Zigbee island and for interchanging messages. In the case of dongle it is done through a library (*.dll). In the case of the external concentrator it is done using a TCP/IP messaging. |
48 | | |
49 | | The software engages to the island, discovers nodes, and for each node it discovers resources, that is, sensors and actuators. This software operates under the following Zigbee configuration: |
50 | | * It has been tested upon Zigbee 2007. Zigbee Pro should work depending on the Zigbee dongle or concentrator. |
51 | | * It is needed to known a priori physical Zigbee parameters: |
52 | | * Frequency channel number (11 to 26). |
53 | | * Zigbee net password. |
54 | | * Extended PAN Identification helps but not needed. |
55 | | * Not all the Zigbee profiles are detected. It have been tested under temperature, light, human presence, acceleration sensors, proprietary location sensors and electricity on/off actuator. |
56 | | |
57 | | The Gateway has the following features regarding **Resource End Point (REP) implementation**: |
58 | | * Allows **publication** of individual resources (sensors and actuators) into a Resource Directory. |
59 | | * Allows **getting** data from resources and **acting** over them using **RESTful** access. |
60 | | * Allows **subscription** to resources. Notification can be requested upon one or several of the following conditions: |
61 | | * **Periodic time**. If active, it sends a new notification after "period time" passes without having sent a notification. |
62 | | * **Value change**. If active, it sends a notification when detected that the value has changed. |
63 | | * **Threshold**. When the value goes beyond a threshold a notification is sent. |
64 | | * Allows **mobility**. Several gateways can be located in the vicinity and in the case that the Zigbee island allows nodes to move, both gateways communicate each other to properly handle the mobility. |
65 | | |
66 | | In order to not saturate the islands with possible huge requests coming from the internet world, the gateway do not bypass all the requests to the island. For that reason the gateways stores the last value of the resources in order to respond by itself to requests targeting the same resource that arrives at the same time. |
67 | | |
165 | | == Mobility == |
| 142 | == Specification == |
| 143 | |
| 144 | The two ways of connecting to a Zigbee island (dongle or concentrator) are quite similar, the dongle and external concentrator have primitives for connecting to a Zigbee island and for interchanging messages. In the case of dongle it is done through a library (*.dll). In the case of the external concentrator it is done using a TCP/IP messaging. |
| 145 | |
| 146 | The software engages to the island, discovers nodes, and for each node it discovers resources, that is, sensors and actuators. This software operates under the following Zigbee configuration: |
| 147 | * It has been tested upon Zigbee 2007. Zigbee Pro should work depending on the Zigbee dongle or concentrator. |
| 148 | * It is needed to known a priori physical Zigbee parameters: |
| 149 | * Frequency channel number (11 to 26). |
| 150 | * Zigbee net password. |
| 151 | * Extended PAN Identification helps but not needed. |
| 152 | * Not all the Zigbee profiles are detected. It have been tested under temperature, light, human presence, acceleration sensors, proprietary location sensors and electricity on/off actuator. |
| 153 | |
| 154 | The Gateway has the following features regarding **Resource End Point (REP) implementation**: |
| 155 | * Allows **publication** of individual resources (sensors and actuators) into a Resource Directory. |
| 156 | * Allows **getting** data from resources and **acting** over them using **RESTful** access. |
| 157 | * Allows **subscription** to resources. Notification can be requested upon one or several of the following conditions: |
| 158 | * **Periodic time**. If active, it sends a new notification after "period time" passes without having sent a notification. |
| 159 | * **Value change**. If active, it sends a notification when detected that the value has changed. |
| 160 | * **Threshold**. When the value goes beyond a threshold a notification is sent. |
| 161 | * Allows **mobility**. Several gateways can be located in the vicinity and in the case that the Zigbee island allows nodes to move, both gateways communicate each other to properly handle the mobility. |
| 162 | |
| 163 | In order to not saturate the islands with possible huge requests coming from the internet world, the gateway do not bypass all the requests to the island. For that reason the gateways stores the last value of the resources in order to respond by itself to requests targeting the same resource that arrives at the same time. |
| 164 | |
| 165 | |
| 166 | === RAI interface === |
| 167 | This Gateway creates a REST interface for allowing applications to iterate with the Zigbee island resources. This interface is defined in [[#RpObservationMeasurement]] (**Check proper LINK to the xml specification TODELETE**). |
| 168 | Each resource has its one URL, with the following format: "//**BASE_URL/nodeMAC/X/number**//" |
| 169 | * //nodeMAC// is the node MAC address in hexadecimal capital letters (16 characters). |
| 170 | * //X// is the letter "s" for a sensor or "a" for an actuator. |
| 171 | * //number// is the number of sensor or actuator, starting with "0". |
| 172 | |
| 173 | Over this resource URL the following operations can be done: |
| 174 | * GET http method is used for getting a "xml" with the sensor or actuator value. An xml with the format defined in [[#RpObservationMeasurement]] is obtained. |
| 175 | * PUT http method is used for changing a parameter, or acting over an actuator. |
| 176 | |
| 177 | === Subscriptions === |
| 178 | A POST http method over the resource URL is used for adding a new subscription. For that, the URL must contain after the resource URL the subscription identity: |
| 179 | "//**BASE_URL/nodeMAC/X/number/SubscriptionID**//". //"SubscriptionID"// is whatever text allowed in the URL names. The xml format for a subscription request is (**PUT A LINK TO XML SUBSCRIPTION FORMAT IF ANY**). |
| 180 | * A PUT http method over this subscription URL is used for modifying it. |
| 181 | * A GET http method over this subscription URL returns the subscription xml information. |
| 182 | * A DELETE http method over this subscription URL is used for deleting it. |
| 183 | * A POST http method over this subscription URL returns an error if it exist or add a new subscription if it does not exist. |
| 184 | |
| 185 | GET over "//BASE_URL/nodeMAC/X/number**?Subscription**//" can be used for getting the list of subscriptions of a resource. |
| 186 | |
| 187 | GET over "//**BASE_URL/nodeMAC **//" returns an html page with node information, sensors and actuators, and links for the subscriptions. |
| 188 | |
| 189 | |
| 190 | === Mobility === |
219 | | == RAI interface == |
220 | | This Gateway creates a REST interface for allowing applications to iterate with the Zigbee island. This interface is defined in [RpObservationMeasurement] (**Check proper LINK to the xml specification TODELETE**). |
221 | | Each resource has its one URL, with the following format: "//**BASE_URL/nodeMAC/X/number**//" |
222 | | * //nodeMAC// is the node MAC address in hexadecimal capital letters (16 characters). |
223 | | * //X// is the letter "s" for a sensor or "a" for an actuator. |
224 | | * //number// is the number of sensor or actuator, starting with "0". |
225 | | |
226 | | Over this resource URL the following operations can be done: |
227 | | * GET http method is used for getting a "xml" with the sensor or actuator value. |
228 | | * PUT http method is used for changing a parameter, or acting over an actuator. |
229 | | |
230 | | === Subscriptions === |
231 | | A POST http method over the resource URL is used for adding a new subscription. For that, the URL must contain after the resource URL the subscription identity: |
232 | | "//**BASE_URL/nodeMAC/X/number/SubscriptionID**//". //"SubscriptionID"// is whatever text allowed in the URL names. The xml format for a subscription request is (**PUT A LINK TO XML SUBSCRIPTION FORMAT**). |
233 | | * A PUT http method over this subscription URL is used for modifying it. |
234 | | * A GET http method over this subscription URL returns the subscription xml information. |
235 | | * A DELETE http method over this subscription URL is used for deleting it. |
236 | | * A POST http method over this subscription URL returns an error if it exist or add a new subscription if it does not exist. |
237 | | |
238 | | GET over "//BASE_URL/nodeMAC/X/number**?Subscription**//" can be used for getting the list of subscriptions of a resource. |
239 | | |
240 | | GET over "//**BASE_URL/nodeMAC **//" returns an html page with node information, sensors and actuators, and links for the subscriptions. |
| 244 | |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | |
| 252 | |
| 253 | |