Home/Support/Support Forum/What is the http code to get current data from a single xbee?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

What is the http code to get current data from a single xbee?

0 votes
Hi,

I'm trying to get the xml or json for a single xbee connected to an xbee gateway.

If I use:

https://my.idigi.com/ws/v1/streams/inventory.xml?category=data

I can get a feed for all of the connected devices. What I want to do is get all of the data for one device with a single call that would only return the portion below or something like this. Any ideas?

Thanks,

Geoff


<stream>
<id>
dia/channel/{deviceID}/wine_closet/humidity
</id>
<type>DOUBLE</type>
<value>61.0</value>
<units>%</units>
<timestamp>2017-12-24T06:17:33.000Z</timestamp>
<server_timestamp>2017-12-24T06:18:08.354Z</server_timestamp>
<history_uri>
/ws/v1/streams/history/dia/channel/{deviceID}/wine_closet/humidity
</history_uri>
</stream>
<stream>
<id>
dia/channel/{deviceID}/wine_closet/light
</id>
<type>DOUBLE</type>
<value>0.0</value>
<units>brightness</units>
<timestamp>2017-12-24T06:17:33.000Z</timestamp>
<server_timestamp>2017-12-24T06:18:08.354Z</server_timestamp>
<history_uri>
/ws/v1/streams/history/dia/channel/{deviceID}/wine_closet/light
</history_uri>
</stream>
<stream>
<id>
dia/channel/{deviceID}/wine_closet/low_battery
</id>
<type>STRING</type>
<value>False</value>
<timestamp>2017-03-06T01:07:22.625Z</timestamp>
<server_timestamp>2017-03-06T01:07:22.700Z</server_timestamp>
<history_uri>
/ws/v1/streams/history/dia/channel/{deviceID}/wine_closet/low_battery
</history_uri>
</stream>
<stream>
<id>
dia/channel/{deviceID}/wine_closet/temperature
</id>
<type>DOUBLE</type>
<value>56.9</value>
<units>F</units>
<timestamp>2017-12-24T06:17:33.000Z</timestamp>
<server_timestamp>2017-12-24T06:18:08.354Z</server_timestamp>
<history_uri>
/ws/v1/streams/history/dia/channel/{deviceID}/wine_closet/temperature
</history_uri>
</stream>
asked Dec 29, 2017 in Web Services by geoffsharris New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
Have you logged in and looked at the sample application Digi provides for this?

https://xbeegateway.herokuapp.com/#/login
answered Dec 29, 2017 by mvut Veteran of the Digi Community (11,300 points)
...