HTTP DEVICE - parse XML response
Posted: 22 Nov 2017 15:25
I want to implement my Homematic bidcos devices as HTTP DEVICE in Z-WAY. Switching on and off works without any problems. What I have not solved yet, is the query of the current device status. As a return value, I get an XML response. I am still not sure which parse string I have to enter in the HTTP DEVICE property field "Inline Javascript to parse incoming data to 'on'/'off' strings", to get the right device status back to Z-Way.
----------------------------------------------
status check
----------------------------------------------
http://192.168.99.99/config/xmlapi/stat ... nt_id=4711
----------------------------------------------
Answer: Devive ON
----------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<state>
<datapoint value="true" ise_id="4711"/>
</state>
----------------------------------------------
Answer: Devive OFF
----------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<state>
<datapoint value="false" ise_id="4711"/>
</state>
I am grateful for every proposed solution.
Best regards
Bodo