Page 1 of 1

Notification option only when changing state

Posted: Wednesday 22 April 2020 8:28
by pimseb
Hello,

Would it be possible to add an option within the switch notifications ? I'd like to be notified only when a switch is changing its state (for example from on to off).
I have some devices that send "on" state more than one time (motion detector) making me receive several notifications instead of only one. If there was an option to tick like "only notify when state change" it would be great and avoid us to use/write lua scripts
Thank you

Re: Notification option only when changing state

Posted: Wednesday 22 April 2020 9:43
by waaren
pimseb wrote: Wednesday 22 April 2020 8:28 Would it be possible to add an option within the switch notifications ? I'd like to be notified only when a switch is changing its state (for example from on to off).
Probably too many different options to satisfy all when implementing this in the code. Some would like to have a notification only from switching from Off to On or the other way around. Some would only have max 1 notifications per hour for one device and every notification for another device. Etc..
Using a dzVents script all these requirements can be full-filled.
Happy to help with that if needed

Re: Notification option only when changing state

Posted: Thursday 12 August 2021 23:29
by wizworks
I too would find this option useful for switch objects. I created a notification to monitor when a particular switch goes off (triggered by a temp sensor) I get multiple notifications that the switch went off every time the temp was read. This isn't useful and creates a lot of noise.

It would be better to have a check box in the notification setup screen whereby when checked, will only notify on a switch state change. This would make a whole lot of sense.

Can this be done? it would be user friendly and asking someone to write a script takes away from an area where Domoticz generally shines (compared to Home Assistant) which is intuitive operation - ie. "click and drool".

Re: Notification option only when changing state

Posted: Friday 13 August 2021 0:59
by waltervl
wizworks wrote: Thursday 12 August 2021 23:29 I too would find this option useful for switch objects. I created a notification to monitor when a particular switch goes off (triggered by a temp sensor) I get multiple notifications that the switch went off every time the temp was read. This isn't useful and creates a lot of noise.
If you do this setting of the switch by a temperature with dzVents scripting you can use the checkfirst() function, then the switch will not be triggered if already switched so no additional notifications.