This page last changed on Jul 07, 2014 by qinghuaatbc.

hello,

i use http/json to get weather with json format, example [ 20 ],

i put regular expression \ [(.+)\ ] to remove the brackets, but it doesn't work.

can somebody help me?

thanks

wang qinghua

Hello,
which programming languge do you use.
In the object oriented languages (like Java or .net or php )you can use a json Parser

Posted by computerfreak90 at Jul 09, 2014 17:12

Hi - Wunderground is excellent for xml weather data - heres an example of current temp...

Create a command...
Name : Wunderground_Temp
Protocol : HTTP
Command URL : http://api.wunderground.com/api/[userkey]/conditions/q/pws:IBRISTOL29.xml
HTTP Method : GET
XPath Expression : //response/current_observation/temperature_string
Polling Interval : 10m

Create a sensor...
Name : CurrentTemp
Command : Wunderground_Temp

Create a label...
Sensor = CurrentTemp

Also have a look here http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+HTTP+Protocol

HTH

Posted by rich.sperrin at Jul 13, 2014 18:40

With the 10m interval you are at risk to overrun the boundary of the free Wunderground account.
More detail on (weather)-XML data parsing is here: http://www.openremote.org/display/docs/OpenRemote+2.0+How+To+-+Use+XML+Data+Sources

Posted by pz1 at Jul 14, 2014 14:02
Document generated by Confluence on Jun 05, 2016 09:36