Geofencing for my bracelet project

hi everyone, i have my project with ESP8266-12E “Nodemcu” using blynk app for geolocation in MAP of blynk app, and now i want to use geofencing using trigger gps in blynk and i don’t know what is the code should be add in my sketch and how i will be informed if the bracelet has in or out in the map.

GPS trigger widget is triggered by the location of the phone. If you need to trigger based on bracelet location, then you need to search for some references on how to work with geofencing or coordinate arrays.

hi pravel thank you for your answer, but in my bracelet i have a tinygps and i have already a map in blynk app to see the place of the bracelet, know i want to get notification when the bracelet is out of place selected by trigger gps setting in blynk app

As already stated, GPS trigger is for the phone only.

As you have already done, you make up your own code for use of an external GPS device that communicates to the Blynk MCU, then that can feed to a map on the App for visual of location.

But setting the zoning will have to be done manually some other way. Perhaps by taking the current bracelet location and calculating range supplied by a widget (Slider, Text Input, etc) that sends a notification when exceeded. Google for methods used.

@dkmohammed Google around to see if there is a way of spoofing/replacing your phone’s GPS with an external BT device… No guarantees, but perhaps then the GPS Trigger Widget may use that signal instead?

Not really a Blynk thing as much as a Phone hack. Probably requires rooting as well.

Of course, this would only work if the external device was in range of the phone… in which case just use the phone :stuck_out_tongue:

There are certain examples online for geofencing. Like:

thank you pavel i will try this, what about publish my project in app blynk like app in play store how can i do this ?

We don’t have a ready-to-use geofencing feature in the app that will allow users to set the fence, however there are options we can discuss. Either to find a suitable workaround, or developing this feature for you in case you subscribe to 1 year of Business Plan.

If you want to publish your app, please visit and choose the plan you like. After that we will get in touch and guide you through the process.

maybe i will use just the distance to get notification if the bracelet is out this distance like LED, if i sending data through email i see in the app blynk HTML what i received in my email ?

Sounds doable. You can compare bracelet location + smrtphone location and perform math calculations to measure the distance. Once this distance is over certain threshold, you can send email or change LED in the app, or do any other thing.

What’s in the email is fully up to you.

i see in the blynk app Email option, it’s used to send data HTML to a adresse email, what about the plan of publish app android 190$ is most expensive, is that another way to get app android with 50$ for exemple, ? :confused:

Sorry, I don’t understand your question about email and HTML.

Pricing plans can’t be changed at the moment. Sorry for that.

in the blynk app i see EMAIL, this option is used to send data in app to adresse mail?, and for the plans can i cancel my subscribe if i used the plans of 199$ for 20day?

hi everyone, i have build my bracelet project with blynk app to geolocating the bracelet in the map, and i will add more option in my bracelet, and i need yu suggestion about the option, in my mind i have the idea about option to get notification when the bracelet as taken away my hand but i don’t know what the component used to this, ?

Hi bylnkers, can i add image in interface app Blynk with value and button, and for notification email can i send data like latitude,longitude.

Unfortunately no… although it has been requested.

Sure, you can send any text you want. Search this forum for examples.

PS, no need to keep creating new topics for this geofencing project.

absolutly right ! but if i need to send for example variable like latitude, longitude how can i do it?

You convert them to Strings… for example I use this with RTC to send time and date email

  if (param.asInt()) {
    String emailAddress = "";
    String subject = "Hello";
    String body = "Your project sent this message at " + String(currentTime) + " on " + String(currentDate);, subject.c_str(), body.c_str());

You may write a range for lat/long based on your actual position coordinates.
Something like

> if (lat between X and Y)
> if (long between A and B)


if (sq(lat) + sq(long) > k) // where k is the square radius in lat/long magnitude

Give it a try!

Heh… @Rodrigo_Cavalheiro Please take note of the Time Date stamps before posting in old topics. If after 10 months this OP didn’t fix the issue, and considering he hasn’t been seen in this forum since
Jun 28, 2018, then he may be wandering about out there lost and away from the computer :rofl:

1 Like