Cannot make dzVents work after reinstall
Posted: Tuesday 16 April 2019 21:25
I have just reinstalled my system, and now the scripts seems not to work. I got a lot of help when I asked this question, and everything worked perfect. I do have a backup, so it's not a big problem. Here is my previous question about how to do this. https://www.domoticz.com/forum/viewtopi ... 59&t=27392
My scripst look like this:
return {
on = { timer = { 'every minute' } },
execute = function(domoticz)
local Sensor = domoticz.devices(1) -- Temperature
local SETPOINT = domoticz.devices(13) -- SetPoint
SETPOINT.updateSetPoint(SETPOINT.setPoint) -- This will refresh the setPoint with current value
if (Sensor.temperature <= (SETPOINT.setPoint - 0.2)) then -- turn on heat
domoticz.devices(7).switchOn().checkFirst()
elseif (Sensor.temperature >= (SETPOINT.setPoint + 0.2)) then -- turn off heat
domoticz.devices(7).switchOff().checkFirst()
else
-- within hysteresis range
domoticz.devices(7).switchOff().checkFirst()
end
end
}
I observe that the temperatures are updated on the Dashboard. I can also turn the relays connected to the GPIO device if I use the switch manually, but the scripts will not turn on / off went the setPoint is +- .2 degrees.
Only difference I know about is that I did not install a MQTT broker on the new installation - have been using Mosqyitto broker on the other system, since I also was running Node-Red.
If you want, I can post the whole installation procedure.
Best regards
Ulf
My scripst look like this:
return {
on = { timer = { 'every minute' } },
execute = function(domoticz)
local Sensor = domoticz.devices(1) -- Temperature
local SETPOINT = domoticz.devices(13) -- SetPoint
SETPOINT.updateSetPoint(SETPOINT.setPoint) -- This will refresh the setPoint with current value
if (Sensor.temperature <= (SETPOINT.setPoint - 0.2)) then -- turn on heat
domoticz.devices(7).switchOn().checkFirst()
elseif (Sensor.temperature >= (SETPOINT.setPoint + 0.2)) then -- turn off heat
domoticz.devices(7).switchOff().checkFirst()
else
-- within hysteresis range
domoticz.devices(7).switchOff().checkFirst()
end
end
}
I observe that the temperatures are updated on the Dashboard. I can also turn the relays connected to the GPIO device if I use the switch manually, but the scripts will not turn on / off went the setPoint is +- .2 degrees.
Only difference I know about is that I did not install a MQTT broker on the new installation - have been using Mosqyitto broker on the other system, since I also was running Node-Red.
If you want, I can post the whole installation procedure.
Best regards
Ulf