Blockly script "ghost triggered" without condition beeing met?

Moderator: leecollings

Post Reply
baustromverteiler
Posts: 5
Joined: Monday 03 April 2023 10:12
Target OS: -
Domoticz version:
Contact:

Blockly script "ghost triggered" without condition beeing met?

Post by baustromverteiler »

I have a blockly script to turn on/off a heating element if the average solar power return to the grid in the past 5 minutes exceeds 1000 watts, trigger type is set to device, it looks like this:
Screenshot 2023-11-22 203618.png
Screenshot 2023-11-22 203618.png (38.49 KiB) Viewed 1580 times
Now the script triggers every 5 minutes _without_ the condition being met (return to the grid beeing 0 at the moment), the logfile gives me these entrys on turn on / off:

2023-11-22 20:35:00.885 EventSystem: Event triggered: Heizstab_Ueberschuss_2
2023-11-22 20:35:00.911 RelaisboardEG2: Light/Switch (Heizstab Badezimmer)

2023-11-22 20:40:00.888 EventSystem: Event triggered: Heizstab_Ueberschuss_2
2023-11-22 20:40:00.928 RelaisboardEG2: Light/Switch (Heizstab Badezimmer)

Also strangely the script is named "Heizstab_Ueberschuss" and not "Heizstab_Ueberschuss_2" as it shows up in the log. I found another post where someone states that the number after the underline refers to the trigger type but I could not find any reference to this.

Any help to get rid of these ghost triggers is appreciated :)

regards, max
User avatar
waltervl
Posts: 5394
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Blockly script "ghost triggered" without condition beeing met?

Post by waltervl »

What is the trigger you have defined (all, device, time etc)?
From the script it should be device. But from your issue you probably selected All which could lead it to be triggered every 5 minutes. But if you update the device every 5 minutes with another script it would lead to an update of the device and so trigger of your script.

https://www.domoticz.com/wiki/Blockly
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
willemd
Posts: 630
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Blockly script "ghost triggered" without condition beeing met?

Post by willemd »

I am no expert in blockly, I moved away from it to dzVents after some initial tries, but looking at your setup, I would expect:

1) you have something that calculates a 5 minute average and then updates a device
2) you have a blockly logic that must do something depending on the updated value, so it seems logical that it triggers after that update
3) then it checks the blockly logic and finds that 0<=999 and therefore switches heiztab badezimmer off

Is that not what your are seeing? Why do you consider it to be a ghost trigger?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests