Page 1 of 1

dzVents and Danfoss wall radiator thermostats

Posted: Thursday 18 January 2018 18:20
by kilowat
Hello,

what can be wrong with this simple script:
return {
active = true,
on = {
devices = {
'my switch'
}
},
execute = function(domoticz, switch)
if (switch.state == 'On') then
domoticz.log('Hey! I am on!')
domoticz.devices('Living Room Thermostat').updateSetPoint(21)
else
domoticz.log('Hey! I am off!')
end
end
}

I am getting following error in log:
"Error: Error opening url: http://127.0.0.1:8080/json.htm?type=com ... 0&svalue=5"

Device idx is OK...

Thank you

Re: dzVents and Danfoss wall radiator thermostats

Posted: Thursday 18 January 2018 19:53
by waaren
Do you have 127.0.0.1;127.0.0.* in Setup -> Settings -> System -> "Local Networks (no username/password):" -> Networks: ?

Re: dzVents and Danfoss wall radiator thermostats

Posted: Thursday 18 January 2018 19:53
by kilowat
Looks like I am doing everything in proper way.
In this thread, sample scripts use the same functions: viewtopic.php?f=59&t=20585&p=159269&hil ... ua#p159269

So maybe it is some more generic problem with accessing local domoticz API?

Re: dzVents and Danfoss wall radiator thermostats

Posted: Thursday 18 January 2018 19:55
by kilowat
waaren wrote: Thursday 18 January 2018 19:53 Do you have 127.0.0.1;127.0.0.* in Setup -> Settings -> System -> "Local Networks (no username/password):" -> Networks: ?
It was that... thank you