Page 1 of 1

resetAllEvents not triggered

Posted: Friday 25 November 2022 18:31
by Bertvdw
I try too make use of the system event resetAllEvents.
But it looks like the event is not triggered.

Am i doing something wrong?
I used the attached script to test.

Gr. Bert

Re: resetAllEvents not triggered

Posted: Sunday 27 November 2022 16:10
by waltervl
So if you save a dzvents script this script is not triggered?

What if you go less complex and just log if the script is run?

Re: resetAllEvents not triggered

Posted: Sunday 27 November 2022 18:17
by willemd
Is it not triggered or is it triggered but does not produce any output?

I have never created new local functions in DZvents, but looking at your text I wonder whether the line "local Main" is needed and does not create trouble, since on the next line you start the actual function definition "local function Main ( ipDev )". I don't recognise this construct when comparing to other languages. You need to declare it first? Is it in the documentation somewhere?

I would first add extra log statements to the script before and after running Main.

Re: resetAllEvents not triggered

Posted: Tuesday 06 December 2022 16:03
by Bertvdw
Sorry for my late reaction, i've been away for some time .

@Waltervl:
indeed the script is not triggered when i save athe scripts.
I use the same construction also to test if the script is triggered by a device or a variable.
also the system events for start and backup are logged if i declare them.
However, when i remove all the extra parts, an just log the system event, i doesn't show up for the 'resetAllEvents' trigger and it does show up for the 'start' trigger.

@willemd
The script is not triggered by this event.
If i put some other events to it ( for example device or timer events) then the script is triggerd and produces the expected output.

Greetz Bert