Page 1 of 1

Get Device State using REST API

PostPosted: Thu Oct 08, 2015 7:47 am
by FFS
I know this isn't necessarily specific to the Wunderground Plugin, but how can I get the device states using the REST API?
On the REST examples page I've seen stuff like ;

http://127.0.0.1:8176/devices/office-ce ... method=put

to change states and thought I could do a GET like;

http://127.0.0.1:8176/devices/[WundergoundDeviceName]?Current Conditions - Temperature&_method=get

but that doesn't work.

I'm looking access stuff like [WundergoundDeviceName]Current Conditions - Temperature and [WundergoundDeviceName]Detailed Forecast 1, etc...

Thanks for any help!
M

Re: Get Device State using REST API

PostPosted: Thu Oct 08, 2015 9:43 am
by howartp
Do the first few paragraphs on the Restful page not help?

http://wiki.indigodomo.com/doku.php?id= ... stful_urls

I'm not familiar with parsing them, but they return .txt, .json and .xml collections of either the device list or individual devices?


Sent from my iPhone using Tapatalk

Re: Get Device State using REST API

PostPosted: Thu Oct 08, 2015 11:02 am
by jay (support)
The RESTful API predates the IOM and custom devices/states, so at the moment you can't get arbitrary states. Addressing this is on our feature request list.

Re: Get Device State using REST API

PostPosted: Thu Oct 08, 2015 4:11 pm
by FFS
Cool - thanks for the reply Jay!

For now I guess I can make a Device State Changed Trigger and Insert Device State into a Variable and access them that way... unless someone has a better idea.

M