Automation for notification of offline event not working

I am having difficulty triggering a notification when my device goes offline.
As I haven’t used automation before, I suspect this is were the problem lies.

(1) in my void myTimerEvent() block, I have a heartbeat:
Blynk.virtualWrite(V5, online);
(2) in datastreams, I have my “online” stream (V5) defined. Please see image below for automation and datastream definitions.

Any idea why this wouldn’t work?

Thanks in advance.

Do you have a data invalidation rule set-up for your V5 datastream?

Pete.

Yes, please see below:

I guess the problem has become evident now…!!! V4 versus V5…!!!

But you don’t have a default value defined either.

Pete.

(1) you are correct, that is more than likely the problem.
(2) the write statement in my original post is incorrect, my sketch shows
Blynk.virtualWrite(V4, online); // send heartbeat
where online = 1

Thank you so much for your help !!

I’ve tried it before with no success. I guess it’s not even possible.

I corrected the rule, and still it did not work.

Thanks Pete and John93

1 Like

You should receive a notification when your device goes offline, so there’s no need to use automation.

1 Like

I do (as the owner of the device and app), but other users do not, reason why I am trying to make the automation work.

I can show you how to achieve that using a third-party app if you like.

I would be interested in the 3rd party app you mention, Can you tell me what it is please. I have tried and had some sucess with Pushover to date.

I’m interested - please and thank you !

Hey @bobcroft Can you explain what are you trying to achieve exactly? Why are you using pushover?
I assume you’re looking for a different method to send and receive notifications in order to replace Blynk events, am I right?

Hey @nandomtl1 I’m using an app called Automate. The idea is to continuously monitor the notification bar looking for incoming Blynk notifications, then perform an action based on a specific keyword. For example, if the message content is “device went offline,” perform an action like sending email, sending SMS, making HTTP request, etc. It’s not the best approach, but it’s working properly. If you like the idea and would like to try it, I’ll send you more details.

1 Like

Hi Bob, if you’re using Node-Red then it’s easy to use Blynk notifications to tell you that one of your devices has gone offline.
Of course, it won’t tell you if the Node-Red server has gone offline, but you should get that notification from Blynk - I certainly do.

I used Pushover for a while with Blynk legacy, because it allowed more functionality than the Blynk Legacy notifications, but haven’t used it for a long time.

If you tell us more about what you’re trying to achieve then I can probably point you in the right direction.

I’m travelling at the moment, so don’t have as much access to stuff as I would if I was at home, but I should certainly be able to help a bit and give pointers.

Pete.

@John93 - can you provide a link to Automate?

Thanks !

Shouldn’t it be possible to use “Events” to send a notification/email when a device goes offline? I guess I would have to “enable notifications”, but I can’t do that, as the cursor shows a “not” sign

Screen Shot 2023-02-19 at 13.15.13|313x184

You’re an Android user, right?

That’s not possible. Online and offline events are included by default in every template, and both can’t be modified.

Hi Peter, sorry for the delay in replying, it has been a busy weekend. I too am using Blynk 2 notifications sucessfully based on some guidance given by you earlier this year. However, I wanted to investigate other options and was interested in what John93 would propose.