Http API triggers Automation Just Once. never repeat

Hello, this is first time i ever report this community.
i’m using esp32, temp/humi sensor and LteCatM1 module that is not support Blynk Library.
So, in my project, use ‘http api’ (/external/update…) for update temp/humi value
like this:

setup(){
...
getSensorData();
...
String data = "GET /external/api/batch/update";
    data += "?token=" BLYNK_AUTH_TOKEN "&";
    data += "v0=" + String(t) + "&" + "v1=" + String(soil_m) + "&" + "v2=" + String(ec);

    data += " HTTP/1.1\r\n";
    data += "Host: sgp1.blynk.cloud\r\n";
    data += "Connection: keep-alive\r\n\r\n";
...
[esp32 deep sleep func]
}

loop(){}

this http message is sent periodically. [Once every 10 minutes]
USING ESP32 Deep Sleep Function:

setup(){
...
esp_sleep_enable_timer_wakeup(600e6); // 10min; 1s = 1,000,000us
    esp_deep_sleep_start();
}
loop(){}

Finally, the esp32 only execute setup().
in setup(),

  1. get sensor data
  2. make http message with it and send to blynk (http api:update)
  3. Zzz(10min)
    repeatedly.

[Body: Issue or error]
My blynk-automation Scenario:
Temperature datastream from esp32 triggers push notification alert on Device Owner’s Blynk APP.
so i did like this:

{1}
if temp>=20, push in-app notification.

{2}
Limit period : 15min

[BUT]
Although Temperature datastream is updated from http message successfully,
Just Once push notification arrived.
i changed Automation: Limit Period value: 1sec, 5min, 15min…
but result is not changed

{3}
temperature > 20 all day,

{4}
but alert just once 8:46:58 PM
(I SET AUTOMATION at 8:40 PM with period: 1sec, 5min, 15min )

Why the Blynk Automation do Action just once?
whatever limit period, Never Repeat Action.

HELP. PLZ.

@sori Please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Copy and paste these if you can’t find the correct symbol on your keyboard.

Pete.

that is not backtick
just meaning bla bla bla (other codes)

All code posted to the forum need to gave triple backticks at the beginning and end. Please edit your post and add triple backticks as requested, otherwise your unformatted code will be removed.

Pete.

i understand thx
the post is edited

is it Error?
or
because of my mistake?

Can anyone work this out?

in addition,
in the state of using WIFI to connect blynk,
blynk iot app alert just ‘TWICE’ push notification: first alert, (limit period), second alert
then over.
After second alert, it never alert.

Is blynk ‘Automations’ is an Incomplete, Experimental function?
Please let me know if there is a problem with my setup.

@sori hello, here are a few possible issues:

  • When you send the data via parameters, you need to encode them. For example, if you send a temperature like 20,333 you need to encode the value into %2C. If you send the temperature like 20.333 you should be good and no encoding is required
  • When you form a string like v0=" + String(t) + "&" + "v1=" + String(soil_m) + "&" + "v2=" + String(ec) you need to be sure all parameters are correct, so you need to add some validation, so you don’t send something like v1=NaN or something else that could break the URL parsing on the server side
  • Automations are triggered only when the temperature condition changes. So when your condition is higher 20 it’s triggered. After that is the condition is always > 20 it’s not triggered. It’s by design, to avoid unnecessary spamming. The value should go back to < 20 and then again to > 20 in order to trigger again. The limit period is added, so you can ignore the cases when the value jumps above and below 20 to often.

If that’s the case then this part of the documentation is very confusing…

because it implies that if the temperature continuously exceeds 40 then notifications will be sent every hour while this is true, if the limit period is 1 hour.

Pete.

me too
i red that.
I know spam notifications can be a problem, so I was expected to be able to keep the limit of 20 messages per hour by setting the limit period even if it’s always a repeated notification when temp>20.

After that is the condition is always > 20 it’s not triggered. It’s by design, to avoid unnecessary spamming. The value should go back to < 20 and then again to > 20 in order to trigger again.

i understand.
The function I thought of was a notification function that repeatedly alerts every period until the trigger condition is released.