Changes between Version 12 and Version 13 of ZigbeeGateway


Ignore:
Timestamp:
Oct 4, 2010, 1:45:14 PM (14 years ago)
Author:
Sensei
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ZigbeeGateway

    v12 v13  
    4343The executable files will be located on ".\bin\release" or ".\bin\debug" directory (depending on the configuration).
    4444
    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 
    6845== Configuration ==
    6946Two xml files need to be edited for configuring properly the software package before running it. These configuration files allow to establish most of the behaviour of the package without the need of compile the software.
     
    154131The upper side tags are used for debugging. It contains **Commands** that can be raised manually to the island for testing purposes, **Events** receives from WS&AN, and traces of **Orders** receives from SENSEI.
    155132
    156 == Troubleshooting ==
     133=== Troubleshooting ===
    157134**It appears the error message: //"Error while connecting to Zigbee dongle"//:** Ensure that a zigbee dongle is properly inserted in the PC. Ensure that no other application is using the dongle. Remove and insert it again.
    158135
     
    163140**It does not publish the resources in the Resource Directory:** Ensure that the proxy variables are properly adjusted depending on your internet connection, and the resource directory URL is properly filled in the configuration file.
    164141
    165 == Mobility ==
     142== Specification ==
     143
     144The 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
     146The 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
     154The 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
     163In 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 ===
     167This 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**).
     168Each 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
     173Over 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 ===
     178A 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
     185GET over "//BASE_URL/nodeMAC/X/number**?Subscription**//" can be used for getting the list of subscriptions of a resource.
     186
     187GET over "//**BASE_URL/nodeMAC **//" returns an html page with node information, sensors and actuators, and links for the subscriptions.
     188
     189
     190=== Mobility ===
    166191Zigbee gateway resolves the mobility of a node between several gateways. In the case of Zigbee there is no possibility of storing information inside nodes that helps to the mobility. So gateways need to resolve the problem by themselves.
    167192Figure shows how mobility is treated by Zigbee gateways.
     
    217242}}}
    218243
    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