This page last changed on Nov 05, 2014 by dsaaltink.

I passed to get openremote working with the HomeWizard. I only don't know how to get the status of a switch.
I know the html command but it gives me all the status of all switches. Can somebody help me how to get the correct status of 1 switch? I managed to switch a light on and off but i need to create two switches because the feedback to the sensor ins't working (i think)

Hope somebody can help me out.

http://ip adres/password/get-status

Your result is a JSON structure. You have to use a JSONPath expression on your HTTPCommand to parse the result. And you need a polling interval eg. 1s to keep the status up-to-date.
You posted the result as a picture, so it's hard to copy paste into a JSON editor.

Posted by mredeker at Nov 06, 2014 08:46

Thanks Marcus, i'm a nono on this Bellow the output. Also on text file

{[^output.txt]"status": "ok", "version": "2.76", "request": {"route": "/get-status" }, "response": {"switches" : [{"id":0,"type":"dimmer","status":"off","dimlevel":0},{"id":1,"type":"dimmer","status":"off","dimlevel":0},{"id":2,"type":"dimmer","status":"off","dimlevel":0},{"id":3,"type":"dimmer","status":"off","dimlevel":0},{"id":4,"type":"dimmer","status":"off","dimlevel":0},{"id":6,"type":"dimmer","status":"off","dimlevel":0}], "uvmeters": [], "windmeters": [], "rainmeters": [], "thermometers": [{"id": 1, "te": 9.0, "hu": 79}], "energymeters": [], "energylinks": [], "heatlinks": [], "kakusensors": [{"id":0,"status":"no","timestamp":"07:31"},{"id":1,"status":"no","timestamp":"13:18"},{"id":2,"status":"no","timestamp":"12:58"},{"id":3,"status":null,"timestamp":"00:00"},{"id":4,"status":null,"timestamp":"00:00"},{"id":5,"status":null,"timestamp":"00:00"},{"id":6,"status":null,"timestamp":"00:00"},{"id":7,"status":null,"timestamp":"00:00"},{"id":8,"status":null,"timestamp":"00:00"}]}}
Posted by dsaaltink at Nov 06, 2014 13:25

hint: include your textual code in {code}..{code} tags to make it readable here

Posted by pz1 at Nov 06, 2014 13:40


Posted by dsaaltink at Nov 06, 2014 13:48

The status of the first switch would be returned like this: response.switches[0].status

Posted by mredeker at Nov 06, 2014 13:52
Document generated by Confluence on Jun 05, 2016 09:36