Get Device State using REST API

Posted on
Thu Oct 08, 2015 7:47 am
FFS offline
Posts: 21
Joined: Jan 24, 2011

Get Device State using REST API

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

Posted on
Thu Oct 08, 2015 9:43 am
howartp offline
Posts: 4559
Joined: Jan 09, 2014
Location: West Yorkshire, UK

Re: Get Device State using REST API

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

Posted on
Thu Oct 08, 2015 11:02 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Get Device State using REST API

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.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Oct 08, 2015 4:11 pm
FFS offline
Posts: 21
Joined: Jan 24, 2011

Re: Get Device State using REST API

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

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests

cron