I had an event in blockly to run if no one was home and the front or back door sensor was triggered but, because my door sensors are always "on" and you can't (as far as I'm aware) define "other devices" or "device changed" in blockly, it run true every time the last person left the house and the "someone home" switch turned off.
So, I tried to do the same thing with lua using the script below but it runs true even if "someone home" is "on". I can't see what I have done wrong.
Help with Lua script please
Moderator: leecollings
-
markk
- Posts: 267
- Joined: Tuesday 14 January 2014 14:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Help with Lua script please
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
-
mrf68
Re: Help with Lua script please
Remove first ( and place it in front of the other ( after 'and' .
-
manjh
- Posts: 859
- Joined: Saturday 27 February 2016 12:49
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: NL
- Contact:
Re: Help with Lua script please
sensors remain on because no off signal is sent.
Edit the device and set the "off delay" to a value like 5 or so. That way the sensor will turn off by itself.
Edit the device and set the "off delay" to a value like 5 or so. That way the sensor will turn off by itself.
Hans
-
markk
- Posts: 267
- Joined: Tuesday 14 January 2014 14:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help with Lua script please
@mrf68 thanks for that. much appreciated. you wouldn't believe how long that has had me stumped.
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
-
markk
- Posts: 267
- Joined: Tuesday 14 January 2014 14:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Help with Lua script please
@manjh - they are SelectPlus motion sensors. for some reason, unknown to me, the off delay has not effect. they just stay on!
Running Domoticz on Pi3 with RFXtrx433e. LWRF power sockets and dimmer switches. Integrated my existing wirefree alarm PIRs and door contacts with domoticz. Geofencing with Pilot. Harmony Hub. Tado for Heating. Now playing with mysensors.
Who is online
Users browsing this forum: No registered users and 1 guest