Hi all,
hope you can help me out with this one! At my house I have a Raspberry Pi with rfxtrx433e. Every night at some time (depending who is at home, and if there are surtain triggers on or off) I switch a couple of lights, grouped by a group, off. But sometimes not all the lights are going off. I suggest it happens because of to quick sended signals to my 433 switches (kaku look-a-likes).
The script to shut off the lights is in LUA. But is there a solution to put a delay in shutting off each device in the group? I've searched for it but couldn't find a delay option in LUA itself. So perhaps there is an other solution for this problem. I have put them into a group because of not always every light is going off. When I resend it to the lights the one which isn't going off will turn off eventually. And it isn't always the same one...
Delay in shutting off devices in a group
Moderators: leecollings, remb0
-
SteGe
- Posts: 40
- Joined: Saturday 02 July 2016 13:54
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Delay in shutting off devices in a group
Synology DS3615xs | Raspberry pi 3b |
RFXtrx433E | MySensors | Z-wave | Philips Hue | Ikea Tradfri |
Sunscreen | Power switches | Toon | Harmony | UE Smartradio |
Weatherstation | Doorbell | Letterbox reader | Lux | Temp | Humidity | Motion |
RFXtrx433E | MySensors | Z-wave | Philips Hue | Ikea Tradfri |
Sunscreen | Power switches | Toon | Harmony | UE Smartradio |
Weatherstation | Doorbell | Letterbox reader | Lux | Temp | Humidity | Motion |
- Egregius
- Posts: 2592
- Joined: Thursday 09 April 2015 12:19
- Target OS: Linux
- Domoticz version: v2024.7
- Location: Beitem, BE
- Contact:
Re: Delay in shutting off devices in a group
First: it's better to check if the device is on before sending on off signal. That way you prevent sending unnescessary commands.
Second: Not sure about lua, but in php you can easily sleep (seconds) or even usleep (microseconds).
Second: Not sure about lua, but in php you can easily sleep (seconds) or even usleep (microseconds).
- Siewert308SW
- Posts: 294
- Joined: Monday 29 December 2014 15:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: The Netherlands
- Contact:
Re: Delay in shutting off devices in a group
Some how and is known for some time delay times in Scenes aint working that well.
But in Groups they do, you can create a group with some lights and set a ON or OFF delay.
Like the screenshot below:
In one of my groups the light will be triggered with a delay of two seconds when ON or OFF.

In lua you can do it like:
But in Groups they do, you can create a group with some lights and set a ON or OFF delay.
Like the screenshot below:
In one of my groups the light will be triggered with a delay of two seconds when ON or OFF.

In lua you can do it like:
Code: Select all
commandArray[1]={['Schemerlamp']='On AFTER 5'}
commandArray[2]={['Wandlampen']='On AFTER 10'}
commandArray[3]={['Sta lamp']='On AFTER 15'}
commandArray[4]={['Vaas lamp']='On AFTER 20'}
Setup:
- DS923+ Docker
Domoticz Latest Stable
Mosquitto / ZwaveJSUI @ Aeotec Z-Stick Gen5+ / PiHole Unbound
P1 USB Gas/Power, HW watermeter
- A lot of Zwave switches, contacts, plugs, smoke/Co2 ect
- DiY 7.5kWh Solar Storage @ GitHuB
- DS923+ Docker
Domoticz Latest Stable
Mosquitto / ZwaveJSUI @ Aeotec Z-Stick Gen5+ / PiHole Unbound
P1 USB Gas/Power, HW watermeter
- A lot of Zwave switches, contacts, plugs, smoke/Co2 ect
- DiY 7.5kWh Solar Storage @ GitHuB
-
SteGe
- Posts: 40
- Joined: Saturday 02 July 2016 13:54
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: RE: Re: Delay in shutting off devices in a group
I already do that at first. But when I mentioned that not all the lights where turned off I have tried to shut down the whole scene.Egregius wrote:First: it's better to check if the device is on before sending on off signal. That way you prevent sending unnescessary commands.
Second: Not sure about lua, but in php you can easily sleep (seconds) or even usleep (microseconds).
sent by tapatalk
Synology DS3615xs | Raspberry pi 3b |
RFXtrx433E | MySensors | Z-wave | Philips Hue | Ikea Tradfri |
Sunscreen | Power switches | Toon | Harmony | UE Smartradio |
Weatherstation | Doorbell | Letterbox reader | Lux | Temp | Humidity | Motion |
RFXtrx433E | MySensors | Z-wave | Philips Hue | Ikea Tradfri |
Sunscreen | Power switches | Toon | Harmony | UE Smartradio |
Weatherstation | Doorbell | Letterbox reader | Lux | Temp | Humidity | Motion |
-
SteGe
- Posts: 40
- Joined: Saturday 02 July 2016 13:54
- Target OS: NAS (Synology & others)
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: RE: Re: Delay in shutting off devices in a group
Thanks, will try the array option you meantioned. Could use it on multiple scripts I have.Siewert308SW wrote:Some how and is known for some time delay times in Scenes aint working that well.
But in Groups they do, you can create a group with some lights and set a ON or OFF delay.
Like the screenshot below:
In one of my groups the light will be triggered with a delay of two seconds when ON or OFF.
In lua you can do it like:
Code: Select all
commandArray[1]={['Schemerlamp']='On AFTER 5'} commandArray[2]={['Wandlampen']='On AFTER 10'} commandArray[3]={['Sta lamp']='On AFTER 15'} commandArray[4]={['Vaas lamp']='On AFTER 20'}
Could you explain what the exact purpose of the off on delay is? I have tried to understand it by the wiki and the manual but couldn't get a clear discription about the exact working.
sent by tapatalk
Synology DS3615xs | Raspberry pi 3b |
RFXtrx433E | MySensors | Z-wave | Philips Hue | Ikea Tradfri |
Sunscreen | Power switches | Toon | Harmony | UE Smartradio |
Weatherstation | Doorbell | Letterbox reader | Lux | Temp | Humidity | Motion |
RFXtrx433E | MySensors | Z-wave | Philips Hue | Ikea Tradfri |
Sunscreen | Power switches | Toon | Harmony | UE Smartradio |
Weatherstation | Doorbell | Letterbox reader | Lux | Temp | Humidity | Motion |
Who is online
Users browsing this forum: No registered users and 1 guest