HTTP/HTTPS poller xml parser
Posted: Tuesday 22 November 2022 0:07
Hello
I'm aiming to retrieve data from my heat pump. I'm using HTTP/HTTPS poller & an xml parser script.
The heat pump is providing data into an xml file.
The data from this xml wich I'm trying to retrieve is "ACTUAL TEMPERATURE 2"
Here is a litte portion of the xml file (which is pretty big) containing the "ACTUAL TEMPERATURE 2" data. Actual value which I want to retreive in domoticz is "22,1°C".
I've created a lua xml parser script which I want to use to retreive data and use it in domoticz
This is not working.
Domoticz logs show an error
" Error getting data from url"
Is there somebody who could help me correct my lua script ?
Thank you in advance
I'm aiming to retrieve data from my heat pump. I'm using HTTP/HTTPS poller & an xml parser script.
The heat pump is providing data into an xml file.
The data from this xml wich I'm trying to retrieve is "ACTUAL TEMPERATURE 2"
Here is a litte portion of the xml file (which is pretty big) containing the "ACTUAL TEMPERATURE 2" data. Actual value which I want to retreive in domoticz is "22,1°C".
Code: Select all
<div class="clear"></div></div>
<form id="werte" action="#" onsubmit="saveValues(this);return false;"><div id="content">
<div class="span-11 append-1" style="float:left"><table class="info"><tr><th colspan="2" class="round-top">ROOM TEMPERATURE</th></tr> <tr class="even">
<td class="key">ACTUAL TEMPERATURE 2</td>
<td class="value">22,1°C</td>
</tr>
I've created a lua xml parser script which I want to use to retreive data and use it in domoticz
Code: Select all
s = request['content'];
local ACTUAL_TEMPERATURE_2 = domoticz_applyXPath(s,'<td class="key">ACTUAL TEMPERATURE 2</td><td class="value">(.-)</td>')
domoticz_updateDevice(343,'',ACTUAL_TEMPERATURE_2)
Domoticz logs show an error
" Error getting data from url"
Is there somebody who could help me correct my lua script ?
Thank you in advance