This page last changed on Dec 17, 2014 by pierre2302.

hello

Is it possible to get the status of a virtual command with a URL ?

thank you

Yes....

yyyyyyyy/controller/rest/status/xxxxxxx

where yyyyyyyy= 192.168.2.222:8080 or equivelant controller address

and

where xxxxxx= sensor id from the controller.xml file located at \\OpenRemote\webapps\controller\controller.xml

it will return for "on":

<openremote xsi:schemaLocation="http://www.openremote.org http://www.openremote.org/schemas/controller.xsd"><status id="xxxxxx">on</status></openremote>

and

for "off":
<openremote xsi:schemaLocation="http://www.openremote.org http://www.openremote.org/schemas/controller.xsd"><status id="xxxxxx">off</status></openremote>

Posted by niedejb at Dec 28, 2014 23:15

Thank you for your answer

I tried: yyyyyyyy/controller/rest/status/xxxxxxx

It returns me: http://www.openremote.org/schemas/controller.xsd"><status id="xxxxxx">N/A</status></openremote> I do not understand why he indicates me this value

On the other hand I also tried yyyyyyyy/controller/rest/control/xxxxxxx/on or off and this command is functional on my panel I see the change of state

Posted by pierre2302 at Dec 29, 2014 17:56

Could you have the wrong sensor id number perhaps?

From my controller.xml....5789733 is what I used for xxxxxxx:

-<sensor id="5789733" type="custom" name="VM_5_sensor">

<include ref="3601" type="command"/>

<state name="off" value="0"/>

<state name="on" value="1"/>

Thought an example might help...

Posted by niedejb at Dec 29, 2014 18:07

I am sorry, it is me who me trunk I had taken the switch id instead of sensor id

Thank you very much it's perfect

Posted by pierre2302 at Dec 29, 2014 21:01
Document generated by Confluence on Jun 05, 2016 09:39