Page 1 of 1
Eventsystem starts at 00:00 and execute event every minute
Posted: Saturday 04 February 2017 8:48
by htilburgs
Domoticz version: v3.5877
I'm having strange behaviour from the Eventsystem. After working fine for several weeks, suddenly (out of the blue) the EvenSystem starts triggering one specific event at 00:00 and keeps doing this every minute:
OpenZWave: Domoticz has send a Switch command!, Level: 0, NodeID: 2 (0x02)
In this case it's my Fibaro Roller Shutter2. Every minute it's become triggered to open. And will not stop, until I de-activate the blocky event.
I've attached the blocky event. What it does is looking at the day of week and time, opens the shutter and send a notification to Telegram.
I cannot figure out, why this events suddenly starts doing this after working fine for several weeks. Other events (2 more) are working fine and do not have this behavioure.

- OpenShutter.PNG (102.37 KiB) Viewed 1324 times
Re: Eventsystem starts at 00:00 and execute event every minute
Posted: Saturday 04 February 2017 9:29
by jvdz
I am not a fan of Blockly and always use LUA scripts for logic, but guess that the AND relation in the second test is connected to Sunday only.
So the test ends up being:
If Saturday then do this
or if Sunday and 7:45 then also do this
Jos
Re: Eventsystem starts at 00:00 and execute event every minute
Posted: Saturday 04 February 2017 9:40
by htilburgs
Ok, sounds logic, because it started at 00:00 (change from friday to saterday). I've changed it to:

- OpenShutter2.PNG (99.42 KiB) Viewed 1314 times
You say that you always use LUA scripts for logic.
I've never worked with LUA. Do you have an example for me (for example this situation), so I can take a look at LUA if this is an option for me?
Re: Eventsystem starts at 00:00 and execute event every minute
Posted: Saturday 04 February 2017 11:58
by Domosapiens
No need for LUA.
Blockly is great and can even be maintained by my children.
(one day you pass away and then they have to!)
Maintenance is underestimated by most of the board members.
Blockly:
- at 00:00 the Event system is reset (I think a recent change, not seen it before)
- If all conditions are met, Blockly will start over and over (that's what you see also)
- Choose Blockly and below that Device (right side of the Event editor)
- build balance in your Blockly: start with a top AND and add left and right additional AND's
- add the current condition of your screens to the AND structure
- in case of Time: use > instead of = for robust programming
I think something like this will work:
Code: Select all
IF ((NOT Saturday AND NOT Sunday) AND (Time > 07:45 AND Rolluik NOT Level 0%))
DO
Set Rolluik = Level 0%
Else IF ....
Look at the ((..)..(..)) pairs for balance
Success
Re: Eventsystem starts at 00:00 and execute event every minute
Posted: Saturday 04 February 2017 12:03
by tozzke

should do the trick (if your 'Rolluik' is actually set with 'level (%)' and not just On/Off)
Although this will trigger every second of 7:45 (so 7:45:00. 7:45:01, 7:45:02 etc).
This could be prevented by adding a variable so you'll get something like this:

Re: Eventsystem starts at 00:00 and execute event every minute
Posted: Saturday 04 February 2017 12:30
by htilburgs
My Shutter "Rolluik" is using %. At evening (Time=Sunset) I set the level to 100%
At morning it should completely open, that's why I set the level to 0%. This works even if the level is >0% and <100% (I have children....

)
But using a user-variable is also good thinking. Thanks for all the help.
Problem is solved, but executing can be on different ways.
Playtime for the next couples of days

and trying different methods!