Hi guys
I recently discovered this great tool! Many congratulations to all the makers.
I'm confused about making blockly events though. I'm just playing around a little bit and I found that when I create a blockly, for example:
if outsidetemperature > 15
send mail
or
if lightswitch = on
send mail
it will keep sending mails every 30secs or so, as long as the condition is met. Is this normal? I would expect to only send it one time, when the condition was not met before, but is met now.
I know I can bypass this by creating a local variable that will store the previous value, but this is more work.
Is there an easier way?
Event triggers - confused
Moderator: leecollings
- emme
- Posts: 909
- Joined: Monday 27 June 2016 11:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: latest
- Location: Milano, Italy
- Contact:
Re: Event triggers - confused
You can choose to use the NOTIFICATION option on each device to trigger the event (you would need a bash script to do that) instead of use Blocky or LUA
OR.....
you can use a global variable (naming it LightSwitchNotify for example) and evaluate it in the script:
If lightswitch = ON and variable LightSwitchNotify = 0
send mail
LightSwitchNotify = 1
elseIf lightswitch = OFF and variable LightSwitchNotify = 1
set variabe LightSwitchNotify = 0
OR.....
you can use a global variable (naming it LightSwitchNotify for example) and evaluate it in the script:
If lightswitch = ON and variable LightSwitchNotify = 0
send mail
LightSwitchNotify = 1
elseIf lightswitch = OFF and variable LightSwitchNotify = 1
set variabe LightSwitchNotify = 0
The most dangerous phrase in any language is:
"We always done this way"
"We always done this way"
Who is online
Users browsing this forum: No registered users and 1 guest