dzVents temperature switch
Moderator: leecollings
-
- Posts: 26
- Joined: Friday 15 September 2017 21:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Netherlands
- Contact:
dzVents temperature switch
Hi Forum,
After a lot of reading and trying still strugling to get this dzVents script working.
I use the Omnik script to read the temperature.
This is a Custom Device.
The fan should cool the inverterabove 25 degrees Celcius.
Can somebody please give me a suggestion why the script is faulty?
return {
on = {
timer = 'every minute'
},
execute = function(domoticz)
local Sensor = domoticz.devices( 'Omnik temperature' )
if (Sensor.temperature) >= 25) then
domoticz.devices( 'Omnik Ventilator' ).switchOn()
end
end
}
btw what tochoose by
event name,
dzVents,
???
Thanks Paul
After a lot of reading and trying still strugling to get this dzVents script working.
I use the Omnik script to read the temperature.
This is a Custom Device.
The fan should cool the inverterabove 25 degrees Celcius.
Can somebody please give me a suggestion why the script is faulty?
return {
on = {
timer = 'every minute'
},
execute = function(domoticz)
local Sensor = domoticz.devices( 'Omnik temperature' )
if (Sensor.temperature) >= 25) then
domoticz.devices( 'Omnik Ventilator' ).switchOn()
end
end
}
btw what tochoose by
event name,
dzVents,
???
Thanks Paul
-
- Posts: 1355
- Joined: Friday 29 August 2014 11:26
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Ermelo
- Contact:
Re: dzVents temperature switch
Try to remove all the ( and ) in your if-statement.
And next time post the errors you get. That helps
And next time post the errors you get. That helps
Creator dzVents - RPi3, loads of zwave devices, esp8266, evohome.
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: dzVents temperature switch
Can you please use the [ code ] and [ /code ] blocks. It will make everything easier to read
Thanks.
Thanks.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
-
- Posts: 26
- Joined: Friday 15 September 2017 21:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Netherlands
- Contact:
Re: dzVents temperature switch
Hi and thanks for your support.
I will try to make it more readable......
Now changed the script as suggested :
Can it be the problem with the Custom Sensor?
Or the fact that "spacebar" is used between Omnik temperature?
Thanks again!
Paul
I will try to make it more readable......
Now changed the script as suggested :
Code: Select all
return {
on = {
timer = 'every minute'
},
execute = function(domoticz)
local Sensor = domoticz.devices('Omnik temperature')
if Sensor.temperature >= 25 then
domoticz.devices('Omnik Ventilator').switchOn()
end
end
}
Or the fact that "spacebar" is used between Omnik temperature?
Thanks again!
Paul
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzVents temperature switch
Problem is that you forgot a pair of {}
Please find corrected script below.
Code: Select all
return {
on = { timer = { 'every minute' } },
execute = function(domoticz)
local Sensor = domoticz.devices('Omnik temperature')
if Sensor.temperature >= 25 then
domoticz.devices('Omnik Ventilator').switchOn()
end
end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 26
- Joined: Friday 15 September 2017 21:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Netherlands
- Contact:
Re: dzVents temperature switch
Thanks waaren,
If you three guys think that the script is o.k. but it is still not working....Could it be that my devices are not correct?
I had a typo in the previous script but that seems o.k. now.
Now will try to debug, after finding out how exactly.
Thanks!
Paul
If you three guys think that the script is o.k. but it is still not working....Could it be that my devices are not correct?
I had a typo in the previous script but that seems o.k. now.
Now will try to debug, after finding out how exactly.
Thanks!
Paul
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: dzVents temperature switch
Sounds so easy Was trying to get something like this for a few weeks. Now I've two of these scripts running for the two ventilators I've got, but could those also be combined in one script?
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: dzVents temperature switch
I have my fan's as on/off switch and the temperature is coming from two temperature devices, not custom sensors.Remicade wrote: ↑Thursday 02 August 2018 20:56 Thanks waaren,
If you three guys think that the script is o.k. but it is still not working....Could it be that my devices are not correct?
I had a typo in the previous script but that seems o.k. now.
Now will try to debug, after finding out how exactly.
Thanks!
Paul
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: dzVents temperature switch
What about looking at the log in the GUI ? [SETUP][LOG][ALL] do you see anything there on every minute :00 ?Remicade wrote: ↑Thursday 02 August 2018 20:56 Thanks waaren,
If you three guys think that the script is o.k. but it is still not working....Could it be that my devices are not correct?
I had a typo in the previous script but that seems o.k. now.
Now will try to debug, after finding out how exactly.
Thanks!
Paul
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
-
- Posts: 26
- Joined: Friday 15 September 2017 21:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10717
- Location: Netherlands
- Contact:
Re: dzVents temperature switch
Hi EdwinK,
That did the trick.
Made a new device, but now Type Temp.
In the Omnik changed IDX.
The script is now running and switching my OmnikVentilator.
Thanks for the help!
Paul
That did the trick.
Made a new device, but now Type Temp.
In the Omnik changed IDX.
The script is now running and switching my OmnikVentilator.
Thanks for the help!
Paul
- EdwinK
- Posts: 1820
- Joined: Sunday 22 January 2017 21:46
- Target OS: Raspberry Pi / ODroid
- Domoticz version: BETA
- Location: Rhoon
- Contact:
Re: dzVents temperature switch
i thought this would be working, as the fan in the living room doesn't have to be on at night.
Same would be for the bedroom fan; but then during night-time. But unfortunately, this doesn't seem to work.
Code: Select all
return {
on = { timer = { 'every minute at daytime' } },
execute = function(domoticz)
local Sensor = domoticz.devices('HSKTemp')
if Sensor.temperature >= 20 then
domoticz.devices('FAN Huiskamer').switchOn()
end
end
}
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Who is online
Users browsing this forum: Bing [Bot] and 1 guest