dzvents script for control of heatpump
Posted: Monday 16 October 2017 22:14
Hello,
Though I'm new to the forum but im using domoticz for over a year now and i think its really great. I recently start to use the dzvents scripting.
I'm trying to get a script to work to control my heatpump. The idea is to switch a dummy switch when there is need for heating in one of my rooms. i use dummy thermostats that switch a relay for the valves on the floorheating. Im using a lua script for this and this is working fine.
I started with only the ground floor and when i get it to work i want to add the second floor to.
I've been struggling with it for a few days now and it is very unpredictable.
This is the script im using :
I have changed the layout a few times and added and removed stuff, but the outcome is mostly the same.
Sometimes the switch is enabled but will not switch off and vice-versa.
I hope someone can help me to get this to work.
Regards Eeduu
Though I'm new to the forum but im using domoticz for over a year now and i think its really great. I recently start to use the dzvents scripting.
I'm trying to get a script to work to control my heatpump. The idea is to switch a dummy switch when there is need for heating in one of my rooms. i use dummy thermostats that switch a relay for the valves on the floorheating. Im using a lua script for this and this is working fine.
I started with only the ground floor and when i get it to work i want to add the second floor to.
I've been struggling with it for a few days now and it is very unpredictable.
This is the script im using :
Code: Select all
return {
on = {
devices = {
'verwarming woonkamer',
'verwarming SLK beneden',
'verwarming keuken',
'verwarming badkamer'
}
},
execute = function(domoticz, device)
if ((device.name =='verwarming woonkamer'or 'verwarming SLK beneden' or'verwarming keuken'or 'verwarming badkamer') and device.state == 'On') then
domoticz.devices ('warmtevraag') .switchOn().checkFirst() else
if ((device.name == 'verwarming woonkamer'and'verwarming SLK beneden' and 'verwarming keuken'and'verwarming badkamer')and device.state == 'Off') then
domoticz.devices ('warmtevraag') .switchOff ().checkFirst()
end
end
end
}
Sometimes the switch is enabled but will not switch off and vice-versa.
I hope someone can help me to get this to work.
Regards Eeduu