Page 1 of 1

Get notification just once from temperature sensor

Posted: Sunday 02 July 2017 11:22
by duelago
Hello gurus,

New to this fun stuff :D I have a temperature sensor in a Sauna and I want to get a notification when it's up to a certain temperature. This works fine, but how can I construct a blockly that stop sending me notifications (for like 12 hours) once I received the first one?


TIA,
/David

Re: Get notification just once from temperature sensor

Posted: Sunday 02 July 2017 12:52
by mrf68
Hi David,

you could add a dummy switch. Let the blockly check this switch: if it is Off, then send the message and turn if On. As long as the dummy switch is On, it will not send the message. You can turn the dummy Off by hand, or have it turned Off at a specific time.
You could also use a User Variable for this.

Regards,
Martin

Re: Get notification just once from temperature sensor

Posted: Sunday 02 July 2017 15:56
by duelago
mrf68 wrote:Hi David,

you could add a dummy switch. Let the blockly check this switch: if it is Off, then send the message and turn if On. As long as the dummy switch is On, it will not send the message. You can turn the dummy Off by hand, or have it turned Off at a specific time.
You could also use a User Variable for this.

Regards,
Martin
Thanks! Still scratching my head to get it to work exactly the way I want. Added the dummy switch and I get notifications, but the problem is how I can mute the notifications automatically after the first one arrived.

I want something like:
If sauna > 50 degrees
Set sauna dummy switch on
Send notification because sauna dummy switch is on
Turn sauna dummy off for 12 hours

/David

Re: Get notification just once from temperature sensor

Posted: Sunday 02 July 2017 16:42
by mrf68
The script where you check the temperature should not turn the dummy switch on, it should only turn it off for 12 hours (if that is what you want). You initially turn it On yourself and that's it. If temp > 50 and switch = On, then send message and turn switch Off for 12h. After 12h Domoticz should turn the dummy On.

Re: Get notification just once from temperature sensor

Posted: Sunday 02 July 2017 17:26
by duelago
mrf68 wrote:The script where you check the temperature should not turn the dummy switch on, it should only turn it off for 12 hours (if that is what you want). You initially turn it On yourself and that's it. If temp > 50 and switch = On, then send message and turn switch Off for 12h. After 12h Domoticz should turn the dummy On.
Thanks. I got it working by changing the notification interval to 12 hours on the settings page, but I think your solution is better :)

Re: Get notification just once from temperature sensor

Posted: Sunday 02 July 2017 19:52
by mrf68
The most important thing is that it does what you want it to do. Have fun in optimizing your home automation. ;)