On for 240 min does not work

Moderator: leecollings

Post Reply
Pierre1958
Posts: 8
Joined: Friday 23 October 2015 17:26
Target OS: Linux
Domoticz version:
Contact:

On for 240 min does not work

Post by Pierre1958 »

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
Laders.jpg
Laders.jpg (161.9 KiB) Viewed 1040 times
User avatar
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

Post by Treve »

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.
- 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
Pierre1958
Posts: 8
Joined: Friday 23 October 2015 17:26
Target OS: Linux
Domoticz version:
Contact:

Re: On for 240 min does not work

Post by Pierre1958 »

laders1.jpg
laders1.jpg (35.28 KiB) Viewed 1005 times
@Treve thank you for yuour responce.

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.
User avatar
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

Post by jvdz »

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
User avatar
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

Post by Treve »

Image
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
User avatar
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

Post by Treve »

Image

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
Dickey
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

Post by Dickey »

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. :) )
I think that’s the problem.


Verzonden vanaf mijn iPad met Tapatalk Pro
Dz-beta | Dashticz 3.8.10 BETA | Tradfri | RF-Link | Z-Wave | Harmony | Unify | P1 |
Pierre1958
Posts: 8
Joined: Friday 23 October 2015 17:26
Target OS: Linux
Domoticz version:
Contact:

Re: On for 240 min does not work

Post by Pierre1958 »

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.
User avatar
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

Post by jvdz »

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:
Pierre1958 wrote: Monday 31 May 2021 11:51 laders1.jpg@Treve thank you for your response.
Jos
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Pierre1958
Posts: 8
Joined: Friday 23 October 2015 17:26
Target OS: Linux
Domoticz version:
Contact:

Re: On for 240 min does not work

Post by Pierre1958 »

@ 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.
laders2.jpg
laders2.jpg (24.88 KiB) Viewed 951 times
User avatar
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

Post by jvdz »

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.
Guess you mean to say 120 minutes as 300min = 5 hours! ;)

You have also set the Trigger field to "Device" !?
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
Pierre1958
Posts: 8
Joined: Friday 23 October 2015 17:26
Target OS: Linux
Domoticz version:
Contact:

Re: On for 240 min does not work

Post by Pierre1958 »

Setting the senor timeout value to 300 min didn't help.
laders3 (2).jpg
laders3 (2).jpg (118.01 KiB) Viewed 930 times
@JVDZ
What do you mean by set the Trigger field to "Device"?
Is it a must to set a time here?
laders4.jpg
laders4.jpg (253.31 KiB) Viewed 930 times

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.
User avatar
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

Post by waltervl »

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
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
Pierre1958
Posts: 8
Joined: Friday 23 October 2015 17:26
Target OS: Linux
Domoticz version:
Contact:

Re: On for 240 min does not work

Post by Pierre1958 »

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?
Pierre1958
Posts: 8
Joined: Friday 23 October 2015 17:26
Target OS: Linux
Domoticz version:
Contact:

Re: On for 240 min does not work

Post by Pierre1958 »

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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest