Changes between Version 14 and Version 15 of ZigbeeGateway


Ignore:
Timestamp:
Oct 13, 2010, 3:17:39 PM (14 years ago)
Author:
Sensei
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ZigbeeGateway

    v14 v15  
    12121. Through a Zigbee USB dongle attached to the PC. In this case the PC needs to be in the rario coverage of the Zigbee island.
    13132. Through IP connection to an external concentrator. This concentrator is an element that simple translates the Zigbee binary message into IP and transports it using a TCP/IP socket.
    14  [[Image(zb2senseigw_connection.JPG, 50%, center)]]
     14 [[Image(zb2senseigw_connection.JPG, 40%, center)]]
    1515 
    1616
     
    155155
    156156The Gateway has the following features regarding **Resource End Point (REP) implementation**:
    157 * Allows **publication** of individual resources (sensors and actuators) into a Resource Directory.
     157* Allows **publication** of individual resources (sensors and actuators) into a Resource Directory, using the [wiki:RpResDescription Resource Description Format].
    158158* Allows **getting** data from resources and **acting** over them using **RESTful** access.
    159159* Allows **subscription** to resources. Notification can be requested upon one or several of the following conditions:
     
    167167
    168168=== RAI interface ===
    169 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**).
     169This Gateway creates a REST interface for allowing applications to iterate with the Zigbee island resources. This interface is defined in [wiki:RpObservationMeasurement Observation & Measurement].
    170170Each resource has its one URL, with the following format: "//**BASE_URL/nodeMAC/X/number**//"
    171171* //nodeMAC// is the node MAC address in hexadecimal capital letters (16 characters).
     
    174174
    175175Over this resource URL the following operations can be done:
    176 * 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.
     176* GET http method is used for getting an "xml" with the sensor or actuator value. An xml with the format explained in [wiki:RpObservationMeasurement Observation & Measurement] is obtained.
    177177* PUT http method is used for changing a parameter, or acting over an actuator.
    178178
    179179=== Subscriptions ===
    180180A 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: 
    181 "//**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**).
     181"//**BASE_URL/nodeMAC/X/number/SubscriptionID**//". //"SubscriptionID"// is whatever text allowed in the URL names.
     182To test the Subscription Module you have to issue a post request to a resource url
     183(i.e.  http://localhost:8081/2098765432142017/sensei/resources/rai/s/0/sub_id ) with the following xml text:
     184{{{
     185<?xml version="1.0" encoding="UTF-8"?>
     186<Subscription>
     187        <URL> where you want to receive notifications</URL>
     188        <Period> maximum time between notifications in ms</Period>
     189        <Threshold>
     190                <Operation> 0: equal to, 1: greater than, or 2: less than</Operation>
     191                <Value> Send a notification when this threshold has been passed</Value>
     192        </Threshold>
     193        <OnlyOnChange>If present, send notification only if the value has changed </OnlyOnChange>
     194</Subscription>
     195}}}
    182196* A PUT http method over this subscription URL is used for modifying it.
    183197* A GET http method over this subscription URL returns the subscription xml information.
     
    185199* A POST http method over this subscription URL returns an error if it exist or add a new subscription if it does not exist.
    186200
    187 GET over "//BASE_URL/nodeMAC/X/number**?Subscription**//" can be used for getting the list of subscriptions of a resource.
    188 
    189 GET over "//**BASE_URL/nodeMAC **//" returns an html page with node information, sensors and actuators, and links for the subscriptions.
     201* GET over "//BASE_URL/nodeMAC/X/number**?Subscription**//" can be used for getting the list of subscriptions of a resource.
     202* GET over "//**BASE_URL/nodeMAC **//" returns an html page with node information, sensors and actuators, and links for the subscriptions.
    190203
    191204
     
    213226This section details the message (7.) of figure. The new gateway informs about node mobility to the old gateway with a PUT http method addressing the node id (not resource id) with the following xml content:
    214227{{{
     228<?xml version="1.0" encoding="UTF-8"?>
    215229<Mobility>
    216         <newREP-Locator> newURL </newREP-Locator>
     230        <newREP-Locator> new URL of the resource </newREP-Locator>
    217231        <Credentials>
    218                 < ZB2SENSEI_PASSWD> password </ZB2SENSEI_PASSWD>
     232                <ZB2SENSEI_PASSWD> password </ZB2SENSEI_PASSWD>
    219233        </Credentials>
    220234</Mobility>
     
    223237In the response, if the credentials are accepted, the old gateway informs about all the subscriptions that the resources of the node contains, with the following xml format:
    224238{{{
     239<?xml version="1.0" encoding="UTF-8"?>
    225240<SubscriptionNodeInfo>
    226241        <SubscriptionInfo sensor="0">
    227                 <Subscription>
    228                          … Subscription info
    229                 <Subscription>
    230                 <Subscription>
    231                          … Subscription info
    232                 <Subscription>
     242                <Subscription> content described in Subscriptions section </Subscription>
     243                <Subscription> content described in Subscriptions section </Subscription>
     244                …
    233245        </SubscriptionInfo>
    234246        <SubscriptionInfo sensor="1">
    235                          …
     247                <Subscription> content described in Subscriptions section </Subscription>
     248                …
    236249        </SubscriptionInfo>
     250        …
    237251        <SubscriptionInfo actuator="0">
    238                 <Subscription>
    239                          … Subscription info
    240                 <Subscription>
    241252                …
    242253        </SubscriptionInfo>
     254        …
    243255</SubscriptionNodeInfo>
    244256}}}
    245257
    246 
    247 
    248 
    249 
    250 
    251 
    252 
    253 
    254 
    255