BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Check Connection status of a blynk device using a different device


#1

I thought that there is some built in blynk library method for checking connection status of a blynk device using a different blynk device, but is not. The SmartPhone application monitors that through the server, so the info exists but only the app can get it.

At the moment, as Gunner thought me, we can use an extra vpin as heartbeat so the master device can monitor its activity, which is not bad.

Probably it will reduce the activity of both devices by not having to check eachother and letting the server use the info that already has and use it to trigger a pin only if its the case.


#2

You can do it with an API call:
http://blynk-cloud.com/auth_token/isHardwareConnected

It obviously needs each device to have it’s own auth_token and if the two devices are geographically separate then you should replace blynk-cloud.com with the IP address of the Blynk cloud server where your project is stored.
You also need to poll the server on a frequent basis to know when the on/offline status has changed.

Full API documentation here:
https://blynkapi.docs.apiary.io/#

Pete.


#3

you can do that with bridge widget :wink:


#4

I am using bridge to monitor the heartbeat. If the monitored device gets offline the value remains the same which would be detected by the master device. At least this is what i am working on at the moment.

I had a look on the Api call, but the bridge + heartbeat thing looks easier.
Thanks!

LE: i just realised how the bridge works. it ONLY allows to SEND data, or to alter a Vpin on a different device, and NOT request. Am i right?


#5

I use 2 timers and I compare T to T-1

Video_00420


#6

Correct… A bridge command only needs to be setup and processed on the SENDER side… It is a One-Way process, if you want data back, you need to setup and process bridge commands on the other device heading back.

Think of two people communicating across a valley with megaphones (conical devices which amplify your voice)… the megaphone is only needed for the one doing the talking… 2 megaphones = full 2 way communication… 3 megaphones = the makings of a party :stuck_out_tongue:


#7

O.T. after your tooth ( self ) extraction, your humor improved a lot!