Automation trigger endless notifications (Android)

hasan_
Posts: 20
Joined: Wed Apr 05, 2023 9:03 am

Automation trigger endless notifications (Android)

Postby hasan_ » Wed Aug 09, 2023 3:48 pm

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

ESP_Piyush
Posts: 289
Joined: Wed Feb 20, 2019 7:02 am

Re: Automation trigger endless notifications (Android)

Postby ESP_Piyush » Wed Aug 09, 2023 3:51 pm

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?

hasan_
Posts: 20
Joined: Wed Apr 05, 2023 9:03 am

Re: Automation trigger endless notifications (Android)

Postby hasan_ » Fri Aug 11, 2023 10:41 am

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

ESP_Piyush
Posts: 289
Joined: Wed Feb 20, 2019 7:02 am

Re: Automation trigger endless notifications (Android)

Postby ESP_Piyush » Fri Aug 11, 2023 11:17 am

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.

hasan_
Posts: 20
Joined: Wed Apr 05, 2023 9:03 am

Re: Automation trigger endless notifications (Android)

Postby hasan_ » Wed Aug 30, 2023 11:51 am

Thanks Piyush,

Still facing repeated trigger notifications, quite annoying. I hope this is being addressed and hopefully be fixed soon? Thanks

cloudmiracle
Posts: 8
Joined: Sat Aug 26, 2023 6:43 am

Re: Automation trigger endless notifications (Android)

Postby cloudmiracle » Sun Sep 03, 2023 4:33 am

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.

Who is online

Users browsing this forum: No registered users and 47 guests