I would like to read data from a (Homewizard) device with a http-request. The syntax for this is http://ipaddress:port/password/telist which asks for a list of data from thermometers/humiditymeters.
The respons of this string is only one line. Here’s an example.
{"status": "ok", "version": "3.35", "request": {"route": "/telist" }, "response": [{"id":0,"name":"Woonkamer","channel":1,"model":0,"te":20.2,"hu":44,"te+":21.6,"te+t":"00:00","te-":18.2,"te-t":"07:13","hu+":44,"hu+t":"11:48","hu-":39,"hu-t":"00:00","outside":"no","favorite":"no"},{"id":1,"name":"Buiten","channel":2,"model":0,"te":3.6,"hu":82,"te+":4.1,"te+t":"10:54","te-":3.1,"te-t":"04:00","hu+":84,"hu+t":"02:33","hu-":81,"hu-t":"00:00","outside":"yes","favorite":"no"},{"id":2,"name":"Schuur","channel":3,"model":0,"te":7.4,"hu":68,"te+":8.7,"te+t":"00:00","te-":6.9,"te-t":"03:12","hu+":68,"hu+t":"07:35","hu-":65,"hu-t":"00:00","outside":"no","favorite":"no"}]}
I would like to read from this line the data from the three devices id0, id1 and id2. From them the name (“name”), the temperature (“te”) and humidity (“hu”) and put them in variables ($name0, $temp0, $hum0, $name1, $temp1, $hum1, $name2, $temp2 and $hum2 ) to present them in the Pimatic screen.
I read the post #1348 but I just don’t manage to get tis job done. Anybody?