Page 1 of 1

Bug Widget Alert and notification

Posted: Wednesday 20 November 2024 9:48
by seby901
I have a relatively simple problem, but I don't know if it's a bug or something I don't understand.

I've created an “alert'” widget .
Capture.JPG
Capture.JPG (12.2 KiB) Viewed 1164 times
Via mqtt, I can receive “INCONNU” or “BLEU” or "BLANC” or “ROUGE” messages.
Capture1.JPG
Capture1.JPG (56 KiB) Viewed 1164 times
I'd just like to receive a notification on my e-mail when the status changes from "INCONNU" to "BLANC" or from "INCONNU" to "ROUGE".
I've activated the 'Alert' widget's notification function, but it doesn't work.
Capture2.JPG
Capture2.JPG (94.72 KiB) Viewed 1164 times
so I tried to write a simple “blocky” script and it didn't work.
I created a variable dedicated to this function in order to have a log.

Re: Bug Widget Alert and notification

Posted: Wednesday 20 November 2024 10:07
by waltervl
For an Alert sensor the value to trigger on is the Alert level, not the text. See also for example
https://wiki.domoticz.com/Dummy_for_vir ... ert_sensor

Level =
0=gray icon,
1=green icon,
2=yellow icon,
3=orange icon,
4=red icon

So in the notification you use value (Valeur) 0, 1, 2, 3 or 4
or something like for example bigger than 1 to send a notification when level is 2, 3 or 4

Re: Bug Widget Alert and notification

Posted: Wednesday 20 November 2024 14:14
by seby901
Is it the same for “blocky” scripts? Can't you make a comparison on the text?

Re: Bug Widget Alert and notification

Posted: Wednesday 20 November 2024 15:09
by waltervl
Perhaps possible with dzvents but the main value for an Alert device is the alert level (0-5) and not the text. So to use an alert device you have to set Alert Level AND text and use the level to trigger actions.