I would like to get somes values from a weather station website and store these data into Domoticz.
The API request is :
Code: Select all
http://centronautico.cm-faro.pt/report.php
Code: Select all
<td class="ws3">3</td>
<td class="ws3">5</td>
Code: Select all
<img src="images/wd_SE.gif" alt="SE" /></td>
Code: Select all
local scriptVar = 'getWidInfo'
return
{
on =
{
timer =
{
'every minute',
},
httpResponses =
{
scriptVar,
},
},
logging =
{
level = domoticz.LOG_DEBUG,
marker = scriptVar,
},
execute = function(dz, item)
if item.isTimer or item.isDevice then
dz.openURL(
{
url = "http://centronautico.cm-faro.pt/report1.php",
method = 'GET',
callback = scriptVar,
})
elseif item.ok then -- statusCode == 2xx
end
}