It would be great if it was possible to trigger a device on a status or value of another device.
e.g. Blinds closes when the sun sensor is above a specific value, bathroom fan activates when humidity reaches a certain level, spot on the driveway activates when PIR senses moving during the night, etc.
I know you can do a lot with scripting, but I found out that the most easy one (dzvents) has his strange behaviors. It is also not userfriendly for people who are not familiar with scripting.
More options to trigger devices
Moderators: leecollings, remb0
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: More options to trigger devices
Can you please elaborate on what you call "strange behaviors"
I might be able to explain / clarify.
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: 2
- Joined: Wednesday 18 November 2020 20:48
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: More options to trigger devices
I copied a very simple script and adjust it to my needs. It switched a light on when temerature was below 14 degrees. It worked. I changed the light to a blind and I received "attempt to call a nil value (field 'SwitchOff'". I changed switchoff() to close(), same result. I changed back to the light. Fault persists. I wasn't able to make the script working.
Not working script below:
Not working script below:
Code: Select all
return {
on = {
timer = { 'every minute' } },
execute = function(domoticz)
local Sensor = domoticz.devices('Temp Druiven')
if Sensor.temperature < 14 then
domoticz.devices('SWD Staande lamp TV').SwitchOff()
end
end
}
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: More options to trigger devices
Case matters...alexkoel wrote: ↑Wednesday 18 November 2020 23:17 I copied a very simple script and adjust it to my needs. It switched a light on when temerature was below 14 degrees. It worked. I changed the light to a blind and I received "attempt to call a nil value (field 'SwitchOff'". I changed switchoff() to close(), same result. I changed back to the light. Fault persists. I wasn't able to make the script working.
The method SwitchOff() does not exist. Try again and use switchOff()
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
Who is online
Users browsing this forum: No registered users and 1 guest