event without an event

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
schnurzel59
Normal user
Posts: 32
Joined: 18 Feb 2019, 12:41
Location: Germany
Contact:

event without an event

#1 Post by schnurzel59 » 20 Mar 2019, 13:16

Hi,
When will an event be triggered?
A simple test:
The following device is created.
Device.jpg
Device.jpg (40.46 KiB) Viewed 1144 times
A Rule for the Test:

Code: Select all

on Testdev#Testvalue do
  event,RuleIsBeingExecuted
endon
Here the Log:

Code: Select all

150758: EVENT: Testdev#Testvalue=0.00
150879: ACT  : event RuleIsBeingExecuted
150892: Command: event
150893: EVENT: RuleIsBeingExecuted
151150: ACT  : let,1,3.60*1.2
151164: Command: let

...........

160758: EVENT: Testdev#Testvalue=0.00
160879: ACT  : event RuleIsBeingExecuted
160893: Command: event
160894: EVENT: RuleIsBeingExecuted
161098: ACT  : let,1,4.32*1.2
161111: Command: let
So every 60 seconds the rule is started.Why? No value was changed in the device. That does not make sense.
It should only be displayed with a status change an event and an action to be performed. Or am I wrong?
Greetings Martin

Oh God, my English is horrible.

User avatar
grovkillen
Core team member
Posts: 3607
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: event without an event

#2 Post by grovkillen » 20 Mar 2019, 14:27

You have set the interval to 60 seconds. Set it to 0 of you want it to be manually invoked.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

User avatar
schnurzel59
Normal user
Posts: 32
Joined: 18 Feb 2019, 12:41
Location: Germany
Contact:

Re: event without an event

#3 Post by schnurzel59 » 20 Mar 2019, 21:17

I can not set the interval to 0 It is automatically set to 60s.
Greetings Martin

Oh God, my English is horrible.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: event without an event

#4 Post by Shardan » 20 Mar 2019, 22:19

Which version are you using?

I'm just working on some Rules depending on a dummy variable and I'm able to set the the time intervall without problems?

(Tested with mega-20190311)
Regards
Shardan

User avatar
schnurzel59
Normal user
Posts: 32
Joined: 18 Feb 2019, 12:41
Location: Germany
Contact:

Re: event without an event

#5 Post by schnurzel59 » 20 Mar 2019, 22:34

I use the mega-20190315
I can set all values, only not 0.
Greetings Martin

Oh God, my English is horrible.

User avatar
ThomasB
Normal user
Posts: 696
Joined: 17 Jun 2018, 20:41
Location: USA

Re: event without an event

#6 Post by ThomasB » 21 Mar 2019, 03:19

Like some other ESPEasy devices, the dummy (P033) plugin does not support a zero interval value. That means it cannot be disabled. So you have to expect repeated (interval) data and handle it in your rules.

If the interval data is a deal killer in your application then there is a workaround if you don't mind compiling your own ESPEasy version. It requires adding one line of code in the device's PLUGIN_DEVICE_ADD code section.

In _P033_Dummy.ino find this line:

Code: Select all

Device[deviceCount].TimerOption = true;
And below it add this:

Code: Select all

Device[deviceCount].TimerOptional = true;         // Allow user to disable interval function.
This change will allow you to set the interval to zero.

- Thomas

User avatar
schnurzel59
Normal user
Posts: 32
Joined: 18 Feb 2019, 12:41
Location: Germany
Contact:

Re: event without an event

#7 Post by schnurzel59 » 21 Mar 2019, 17:26

Hi,
I thought the interval only refers to the transfer of data to the controller. (Home Matic).
if I now set the interval to 0, the values are no longer transmitted automatically. But here is the second problem.
It does not matter which Arduino IDE version or directory structure I use in the libraries.
There are always compilation errors of different types. I'm programming my Arduinos for a few years
without any problems. But compiling the ESP stuff made my hair go gray.
So I have to adapt my rules to the circumstances.

Thank you anyway
Greetings Martin

Oh God, my English is horrible.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests