Event on wrong time Topic is solved

Moderator: leecollings

Post Reply
dflandre
Posts: 9
Joined: Monday 24 June 2019 10:14
Target OS: Linux
Domoticz version: 4.10717
Location: France
Contact:

Event on wrong time

Post by dflandre »

I have a problem with a blockly script. I send an order to open or close shutters at certain times. In my script, the opening is scheduled at 6:25 though the shutters are operated at 6:05!
For other movement commands, that's fine. I do not understand where the problem comes from. Can you help me ?
Sorry for en english, I use Google to translate.
David.

J'ai un soucis avec un script Blockly. J'envoie une commande d'ouverture ou de fermeture de volets à certaines heures. Dans mon script, l'ouverture est programmée à 6:25 pourtant les volets sont actionnée à 6:05 !
Pour les autre commandes de mouvements, c'est correct. je ne comprend pas d'où vient le soucis. Pouvez-vous m'aidez ?
David.
Attachments
Annotation 2019-06-24 104516.png
Annotation 2019-06-24 104516.png (62.28 KiB) Viewed 2246 times
mySensors -> Domoticz -> InfluxDB -> Grafana
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Event on wrong time

Post by waaren »

dflandre wrote: Monday 24 June 2019 10:47 I have a problem with a blockly script. I send an order to open or close shutters at certain times. In my script, the opening is scheduled at 6:25 though the shutters are operated at 6:05!
I do not understand where the problem comes from. Can you help me ?
Did you check if no other timers / scripts could interfere with this ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dflandre
Posts: 9
Joined: Monday 24 June 2019 10:14
Target OS: Linux
Domoticz version: 4.10717
Location: France
Contact:

Re: Event on wrong time

Post by dflandre »

I've just checked it and I confirm there is nothing else.
mySensors -> Domoticz -> InfluxDB -> Grafana
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Event on wrong time

Post by waaren »

dflandre wrote: Monday 24 June 2019 13:13 I've just checked it and I confirm there is nothing else.
I cannot reproduce this on my test system. Could you add some log statements in the action areas so you will clearly see which of the if conditions triggered the action ?
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dflandre
Posts: 9
Joined: Monday 24 June 2019 10:14
Target OS: Linux
Domoticz version: 4.10717
Location: France
Contact:

Re: Event on wrong time

Post by dflandre »

I done it this way.
I'm waiting for the result.
Attachments
Annotation 2019-06-24 143545.png
Annotation 2019-06-24 143545.png (83.28 KiB) Viewed 2231 times
mySensors -> Domoticz -> InfluxDB -> Grafana
dflandre
Posts: 9
Joined: Monday 24 June 2019 10:14
Target OS: Linux
Domoticz version: 4.10717
Location: France
Contact:

Re: Event on wrong time

Post by dflandre »

Here is the continuation :
I changed the trigger time of the command in the script (6:25 -> 6:45).
The command is always activated at 6:05. In the log, we see that it comes from this script. The trace "Log volets 1" is found at 6:05.
Attachments
Annotation 2019-06-25 080820.png
Annotation 2019-06-25 080820.png (78.6 KiB) Viewed 2220 times
Annotation 2019-06-25 080420.png
Annotation 2019-06-25 080420.png (3.07 KiB) Viewed 2220 times
mySensors -> Domoticz -> InfluxDB -> Grafana
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Event on wrong time

Post by waaren »

dflandre wrote: Tuesday 25 June 2019 8:28 Here is the continuation
Thx. I am going to set up some tests to analyze further. Can you please copy the exported Blockly and paste it here ? That will make it easier to simulate your setup.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dflandre
Posts: 9
Joined: Monday 24 June 2019 10:14
Target OS: Linux
Domoticz version: 4.10717
Location: France
Contact:

Re: Event on wrong time

Post by dflandre »

waaren wrote: Tuesday 25 June 2019 10:38 Thx. I am going to set up some tests to analyze further. Can you please copy the exported Blockly and paste it here ? That will make it easier to simulate your setup.
Here the code.
Thx.
Attachments
Blockly code.txt
(6.32 KiB) Downloaded 61 times
mySensors -> Domoticz -> InfluxDB -> Grafana
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Event on wrong time

Post by waaren »

dflandre wrote: Tuesday 25 June 2019 10:58 Here the code.
Thx.
Ok I setup the test environment and will report back as soon as I have some results.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Event on wrong time

Post by waaren »

dflandre wrote: Monday 24 June 2019 10:47 I have a problem with a blockly script. I send an order to open or close shutters at certain times. In my script, the opening is scheduled at 6:25 though the shutters are operated at 6:05!
Found what is causing this !
The time condition in Blockly expects a time in the format of hh:mm and it turns out that Blockly is rather strict on this. So if you enter the times as 0:25 and 6:25 and the likes, the condition is evaluating to true at 0:05 and 6:05. If you enter the times with the leading zero, the if parts are evaluating to true at the expected times.
Logs from my Blockly tests below.

Code: Select all

2019-06-25 22:15:00.923  Status: Log volets 3.1 22:15
2019-06-25 22:16:01.193  Status: Log volets 3_2 22:16
2019-06-26 00:05:00.454  Status: Log volets_1.1 0:25
2019-06-26 00:26:08.131  Status: Log volets 1-2 00:26
2019-06-26 06:05:00.555  Status: Log volets 2.1 6:25
2019-06-26 06:26:00.417  Status: Log volets 2_2 06:26
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dflandre
Posts: 9
Joined: Monday 24 June 2019 10:14
Target OS: Linux
Domoticz version: 4.10717
Location: France
Contact:

Re: Event on wrong time

Post by dflandre »

OK
Thank you for your help.
David.
mySensors -> Domoticz -> InfluxDB -> Grafana
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Event on wrong time

Post by waaren »

waaren wrote: Wednesday 26 June 2019 8:22
dflandre wrote: Monday 24 June 2019 10:47 I have a problem with a Blockly script. I send an order to open or close shutters at certain times. In my script, the opening is scheduled at 6:25 though the shutters are operated at 6:05!
The time condition in Blockly expects a time in the format of hh:mm and it turns out that Blockly is rather strict on this. So if you enter the times as 0:25 and 6:25 and the likes, the condition is evaluating to true at 0:05 and 6:05. If you enter the times with the leading zero, the if parts are evaluating to true at the expected times.
Solved in V4.11060 by @gizmocuz by patching www/app/events/blockly_xml_parser.js
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest