On for 240 min does not work
Moderator: leecollings
-
- Posts: 8
- Joined: Friday 23 October 2015 17:26
- Target OS: Linux
- Domoticz version:
- Contact:
On for 240 min does not work
Hi,
I wrote a Blocky script to switch on/off my e-bike charger.
When I manual switch it on it has to be off after 4 hours (240 min)
E-bikeLader and E-bikeLader1 is a dummy switch, FietsLaders is the switch.
When I use 5 or 30 or 60 minutes it works fine but with 240 minutes blocky does not switch off after 240 minutes.
Can someone help me if I do somthings wrong or is this a bug in 2021.1 build 13.222
I wrote a Blocky script to switch on/off my e-bike charger.
When I manual switch it on it has to be off after 4 hours (240 min)
E-bikeLader and E-bikeLader1 is a dummy switch, FietsLaders is the switch.
When I use 5 or 30 or 60 minutes it works fine but with 240 minutes blocky does not switch off after 240 minutes.
Can someone help me if I do somthings wrong or is this a bug in 2021.1 build 13.222
- Treve
- Posts: 107
- Joined: Thursday 05 November 2015 10:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v4.11474
- Location: Rotterdam, NL
- Contact:
Re: On for 240 min does not work
Try to use,
IF E-bikelader = ON
SET E-bikelader = OFF after 14400 seconds
I use this 3 hours blockly (10800 sec.) for years now.
IF E-bikelader = ON
SET E-bikelader = OFF after 14400 seconds
I use this 3 hours blockly (10800 sec.) for years now.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
-
- Posts: 8
- Joined: Friday 23 October 2015 17:26
- Target OS: Linux
- Domoticz version:
- Contact:
Re: On for 240 min does not work
I changed the blokly but after 4 1/2 hour it was still on.
I changed the name E-bikeLader to FietsLaders because E-bikeLader is a dummy and FietsLaders is the switch.
- jvdz
- Posts: 2269
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: On for 240 min does not work
Doesn't it do a "set FietsLaders Off after 14400" each minute making it never switch off? (I am not too familiar with Blockly as I prefer coding it in LUA.
)

New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
- Treve
- Posts: 107
- Joined: Thursday 05 November 2015 10:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v4.11474
- Location: Rotterdam, NL
- Contact:
Re: On for 240 min does not work

This is my blockly which works like a charm on Version: 4.11474.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
- Treve
- Posts: 107
- Joined: Thursday 05 November 2015 10:37
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v4.11474
- Location: Rotterdam, NL
- Contact:
On for 240 min does not work

This is the logfile as proof it works.
I use a Neo CoolcamZWave wall plug device with on/off switch on the device.
When push the on/off button, the switch go off after three hours.
- RFXtrx433E,
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
- AEON Labs ZW090 Z-Stick Gen5 EU
- Hue v2.1
- Raspberry Pi 3 Model B, Raspbian Stretch Full on USB-Stick.
- Domoticz 4.11474
Devices: KaKu, Z-Wave, Hue.
for testing:
Raspberry 4, 2GB, SSD
Domoticz 2022.1
Ikea Hub, Fyrtur curtain
-
- Posts: 25
- Joined: Friday 19 April 2019 22:29
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.1
- Location: Netherlands
- Contact:
Re: On for 240 min does not work
I think that’s the problem.jvdz wrote:Doesn't it do a "set FietsLaders Off after 14400" each minute making it never switch off? (I am not too familiar with Blockly as I prefer coding it in LUA.)
Verzonden vanaf mijn iPad met Tapatalk Pro
Dz-beta | Dashticz 3.8.10 BETA | Tradfri | RF-Link | Z-Wave | Harmony | Unify | P1 |
-
- Posts: 8
- Joined: Friday 23 October 2015 17:26
- Target OS: Linux
- Domoticz version:
- Contact:
Re: On for 240 min does not work
I am desperate.
I've reset domoticz to 4.10717 stable and it still doesn't work.
I can switch up to 1 hour, anything above an hour the switch just won't turn off.
I have this installed on Ubuntu Server 18.04.5, could Ubuntu play a part in this?
In 4.10717 I have only one new switch installed.
I've reset domoticz to 4.10717 stable and it still doesn't work.
I can switch up to 1 hour, anything above an hour the switch just won't turn off.
I have this installed on Ubuntu Server 18.04.5, could Ubuntu play a part in this?
In 4.10717 I have only one new switch installed.
- jvdz
- Posts: 2269
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: On for 240 min does not work
Try removing the lines that test for the Sunday time as those make this script a Time script, which means it will run each minute.
So just try the top part as shown in this post without anything else in it:
So just try the top part as shown in this post without anything else in it:
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 8
- Joined: Friday 23 October 2015 17:26
- Target OS: Linux
- Domoticz version:
- Contact:
Re: On for 240 min does not work
@ JVDZ
I already did it.
In settings the timeout sensors were set to 60 min, I set this to 300 min.
I just restarted the timer and will see if it turns off in 2 hours.
I already did it.
In settings the timeout sensors were set to 60 min, I set this to 300 min.
I just restarted the timer and will see if it turns off in 2 hours.
- jvdz
- Posts: 2269
- Joined: Tuesday 30 December 2014 19:25
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.107
- Location: Netherlands
- Contact:
Re: On for 240 min does not work
Guess you mean to say 120 minutes as 300min = 5 hours!Pierre1958 wrote: ↑Wednesday 02 June 2021 13:15 In settings the timeout sensors were set to 60 min, I set this to 300 min.
I just restarted the timer and will see if it turns off in 2 hours.

You have also set the Trigger field to "Device" !?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
-
- Posts: 8
- Joined: Friday 23 October 2015 17:26
- Target OS: Linux
- Domoticz version:
- Contact:
Re: On for 240 min does not work
Setting the senor timeout value to 300 min didn't help.
What do you mean by set the Trigger field to "Device"?
Is it a must to set a time here?
Whatever I do the timer works for up to 60 minutes. Within this time it switches off correctly.
If I now want to extend the switch-off time to, for example, 120 minutes, it will NOT switch off anymore.
It seems like there is a 60 minute timer block on somewhere or Domoticz restarts after 60 minutes and Blockly doesn't remember its turn on time or even Blockly stops altogether.
@JVDZ What do you mean by set the Trigger field to "Device"?
Is it a must to set a time here?
Whatever I do the timer works for up to 60 minutes. Within this time it switches off correctly.
If I now want to extend the switch-off time to, for example, 120 minutes, it will NOT switch off anymore.
It seems like there is a 60 minute timer block on somewhere or Domoticz restarts after 60 minutes and Blockly doesn't remember its turn on time or even Blockly stops altogether.
- waltervl
- Posts: 5766
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: On for 240 min does not work
I think @jvdz is referring to the Blockly Triggers: https://www.domoticz.com/wiki/Blockly#Triggers
If you want to trigger on a device change as in your case you should use the device Trigger (pull down menu in Edit Blockly Events page). Default it is set to "All" so every minute it will run and (re)set the delay.
A total different approach would be to use the Off Delay in Device Edit form: https://www.domoticz.com/wiki/Managing_ ... _Off_Delay
(note that is differnt than the off delay in a Scene or Group: The Off delay on switch device in a Group/Scene causes a device to switch Off with a delay of the set amount of seconds after the switchOff command is given. )
If you want to trigger on a device change as in your case you should use the device Trigger (pull down menu in Edit Blockly Events page). Default it is set to "All" so every minute it will run and (re)set the delay.
A total different approach would be to use the Off Delay in Device Edit form: https://www.domoticz.com/wiki/Managing_ ... _Off_Delay
The Off delay on a switch device causes a device to switch Off with a delay of the set amount of seconds after the device switched to On.
(note that is differnt than the off delay in a Scene or Group: The Off delay on switch device in a Group/Scene causes a device to switch Off with a delay of the set amount of seconds after the switchOff command is given. )
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 8
- Joined: Friday 23 October 2015 17:26
- Target OS: Linux
- Domoticz version:
- Contact:
Re: On for 240 min does not work
Sorry, I set the trigger to DEVICE but somehow blockly doesn't switch at a time setting of more than 60 minutes, less then 60 minutes it works perfect.
Why exactly 60 minutes?
Why exactly 60 minutes?
-
- Posts: 8
- Joined: Friday 23 October 2015 17:26
- Target OS: Linux
- Domoticz version:
- Contact:
Re: On for 240 min does not work
SOLVED
I have installed a clean new Ubuntu version.
The timer problem has been solved with this, even a timer setting of 4 hours now works perfectly.
Thanks to everyone who contributed
I have installed a clean new Ubuntu version.
The timer problem has been solved with this, even a timer setting of 4 hours now works perfectly.
Thanks to everyone who contributed
Who is online
Users browsing this forum: No registered users and 1 guest