Hi,
Just wanted to point out the when an Automation condition is satisfied, it just continually does the action (which is fine) but also constantly keeps sending push notifications that the automation is triggered (every second).
Ideally, it should be: trigger_once_while_true
or, an option to trigger once or repeatedly.
Either of those can solve this problem. Please look into this!
Thank you,
Hasan
Automation trigger endless notifications (Android)
-
- Posts: 309
- Joined: Wed Feb 20, 2019 7:02 am
Re: Automation trigger endless notifications (Android)
Thanks for reporting the issue. Can you also specify the automation trigger and action you had set so that we will have sufficient info to reproduce and debug?
Re: Automation trigger endless notifications (Android)
Thank you Piyush,
I can confirm the problem exists in general. (Tried multiple combinations of conditions/actions with temperature, switches, custom etc)
The App sends Push notifications each time it updates while the Automation condition is 'true'. (If updateAndReport() occurs every 5 second, it would send Notifications every 5 seconds). However, one notification is sufficient as long as the condition remains true.
For the developers: Please add a trigger_once_while_true logic into Automation. i.e. send notification only at the instance where the Automation condition turns from (previously) false to (now) true.
Thanks!
Hasan
I can confirm the problem exists in general. (Tried multiple combinations of conditions/actions with temperature, switches, custom etc)
The App sends Push notifications each time it updates while the Automation condition is 'true'. (If updateAndReport() occurs every 5 second, it would send Notifications every 5 seconds). However, one notification is sufficient as long as the condition remains true.
For the developers: Please add a trigger_once_while_true logic into Automation. i.e. send notification only at the instance where the Automation condition turns from (previously) false to (now) true.
Thanks!
Hasan
-
- Posts: 309
- Joined: Wed Feb 20, 2019 7:02 am
Re: Automation trigger endless notifications (Android)
Thanks for providing the details. From the original message, it wasn't clear that the device is explicitly generating the same event multiple times. We will check how this can be handled.
Re: Automation trigger endless notifications (Android)
Thanks Piyush,
Still facing repeated trigger notifications, quite annoying. I hope this is being addressed and hopefully be fixed soon? Thanks
Still facing repeated trigger notifications, quite annoying. I hope this is being addressed and hopefully be fixed soon? Thanks
-
- Posts: 8
- Joined: Sat Aug 26, 2023 6:43 am
Re: Automation trigger endless notifications (Android)
Perhaps this can help, example code that triggers notification only once when physical input1 is enabled:-
In order to set your code to send notification only once when the event occurs and not continuously, add the following code to the sketch so that the event occurs ----sends notification-----resets event.
bool current_state1 = LOW;
bool previous_state1 = LOW;
void setup()
pinMode(input1, INPUT_PULLUP);
void loop();
current_state1 = digitalRead(input1);
if (current_state1 != previous_state1) {
if (current_state1 == HIGH) {
delay (100);
bot.sendMessage(CHAT_ID, "Unit1 is OFF", "");}
if (current_state1 == LOW){
delay (100);
bot.sendMessage(CHAT_ID, "Unit1 is ON", "");}
previous_state1 = current_state1;
}
In this manner the sketch will send notification (in this case TelegramApp) only once when input1 becomes HIGH. It will only send notification next time when the input1 goes LOW and then HIGH again.
In order to set your code to send notification only once when the event occurs and not continuously, add the following code to the sketch so that the event occurs ----sends notification-----resets event.
bool current_state1 = LOW;
bool previous_state1 = LOW;
void setup()
pinMode(input1, INPUT_PULLUP);
void loop();
current_state1 = digitalRead(input1);
if (current_state1 != previous_state1) {
if (current_state1 == HIGH) {
delay (100);
bot.sendMessage(CHAT_ID, "Unit1 is OFF", "");}
if (current_state1 == LOW){
delay (100);
bot.sendMessage(CHAT_ID, "Unit1 is ON", "");}
previous_state1 = current_state1;
}
In this manner the sketch will send notification (in this case TelegramApp) only once when input1 becomes HIGH. It will only send notification next time when the input1 goes LOW and then HIGH again.
Who is online
Users browsing this forum: Bing [Bot] and 77 guests