Hi,
anyone has suggestions how to add a piece of code to my dzVents scripts to surpress notifications for a period of time. Trigger should be adjustable either receiving 5(x) notifications within 10 minutes(y), once this occured stop the notifications for 2 hours(z).
Reason behind this that I use a number of scripts for monitoring, scripts can be either triggered via device or timer, there are occassions the monitoring scripts keeps sending notifications and after a few notifications it becomes annoying.
Any suggestion is welcome.
Thank you
script to supress notifications for period of time
Moderator: leecollings
-
- Posts: 23
- Joined: Wednesday 28 March 2018 20:56
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.11307
- Location: Nederland
- Contact:
Re: script to supress notifications for period of time
Maybe using some fuzzy logic?
Use a variable and add 1 to it for every notification send.
Use this variable as a condition to send the notification. So if the value is 10 or higher, do not Sent notification.
In a separate script, every 2 hours, reduce the variable by one.
Make a separate push button to reset the variable to 0. (Can push it from your phone).
The 10 mentioned above you could set in a separate variable or in a counter device, so you can tweak it easier and use the same across all scripts.
Even the period of removing 1 from the variable you could manage via a variable.
So, when the load is high you get 10 messages and then 1 (random) every 2 hours.
Push the reset button when things calm down or you sorted the problem
Tweak the parameters to get the behavior you want.
Hope this helps....
Verzonden vanaf mijn iPhone met Tapatalk
Use a variable and add 1 to it for every notification send.
Use this variable as a condition to send the notification. So if the value is 10 or higher, do not Sent notification.
In a separate script, every 2 hours, reduce the variable by one.
Make a separate push button to reset the variable to 0. (Can push it from your phone).
The 10 mentioned above you could set in a separate variable or in a counter device, so you can tweak it easier and use the same across all scripts.
Even the period of removing 1 from the variable you could manage via a variable.
So, when the load is high you get 10 messages and then 1 (random) every 2 hours.
Push the reset button when things calm down or you sorted the problem
Tweak the parameters to get the behavior you want.
Hope this helps....
Verzonden vanaf mijn iPhone met Tapatalk
HUE, Tradfri, Zwave, RFXCOM, rooted TOON, PS4
- papoo
- Posts: 126
- Joined: Friday 22 January 2016 22:14
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 4.10
- Location: France
- Contact:
Re: script to supress notifications for period of time
a 100% functional waaren script for this
https://www.domoticz.com/forum/viewtopi ... 42#p204958
https://www.domoticz.com/forum/viewtopi ... 42#p204958
Who is online
Users browsing this forum: No registered users and 1 guest