Blockly, 2 same situations one works other won't Topic is solved

Moderator: leecollings

Post Reply
balosa
Posts: 21
Joined: Sunday 17 May 2020 12:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

Blockly, 2 same situations one works other won't

Post by balosa »

Hi all,

I got 2 Sonoff Dual switches to turn my shutters up and down, one is on the ground floor (beganegrond) and one is on the small room upstairs (kleinekamer)

First I installed the switch on the ground floor and made the following blockly, which works perfect !
Notice the trigger is DEVICE. (The locked virtual switch ensures the blockly won't run twice in the same minute when triggered)

blockly_bg.jpg
blockly_bg.jpg (182.52 KiB) Viewed 638 times

I installed a switch of the same type (sonoff Dual) and adjusted the blockly for this switch, but it won't do anything, the blockly isn't triggered it seems.
When I switch it manual it works, Domoticz is also changing the status of the switch so that all seems ok.

After some testing I found out that if I change the trigger to TIME the blockly triggers the switch

Same blockly but adjusted for the small room shutters.

blockly_kk.jpg
blockly_kk.jpg (180.28 KiB) Viewed 638 times

Just to understand, why does the switch downstairs works with the DEVICE trigger and the other switch only works with the TIME trigger, while the setup is the same, hope someone can clarify this to me.


Maybe not the right forum for this, but should using a dzvents or lua scrips be more stable, unfortunately I am not able to make a script so I can't test this.

Thanks in advance.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Blockly, 2 same situations one works other won't

Post by waaren »

balosa wrote: Saturday 25 July 2020 13:23 Just to understand, why does the switch downstairs works with the DEVICE trigger and the other switch only works with the TIME trigger, while the setup is the same, hope someone can clarify this to me.
All Blockly's set to device triggered are executed when a (any) device is updated. If there are no devices updated at the time you check for, the script is not executed.
Time triggered Blockly's are executed every minute, on the minute.

Have you checked your first Blockly when set as time triggered?
Maybe not the right forum for this, but should using a dzvents or lua scrips be more stable, unfortunately I am not able to make a script so I can't test this.
dzVents or classic Lua are just as stable as a Blockly script but you will have much more possibilities.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
balosa
Posts: 21
Joined: Sunday 17 May 2020 12:50
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Contact:

Re: Blockly, 2 same situations one works other won't

Post by balosa »

I set the 1st blockly also as a TIME trigger instead of the device trigger, and it also works.
I still don't understand why it also works as device trigger though since there are no other (device) triggers at that moment that I know of.

thanks for the response, I will let them stay as time triggers
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest