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

Geofencing for my bracelet project

#1

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.

0 Likes

#2

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.

0 Likes

#3

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

0 Likes

#4

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.

0 Likes

#5

@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:

0 Likes

#6

There are certain examples online for geofencing. Like: https://learn.adafruit.com/geofencing-with-the-fona-808-and-adafruit-io/geofencing-alerts

0 Likes

#7

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 ?

0 Likes

#8

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 https://www.blynk.io/plans/ and choose the plan you like. After that we will get in touch and guide you through the process.

0 Likes

#9

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 ?

0 Likes

#10

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.

0 Likes

#11

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:

0 Likes

#12

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

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

0 Likes

#13

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?

0 Likes

#14

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, ?

0 Likes

#15

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.

0 Likes

#16

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.

0 Likes

#17

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

0 Likes

#18

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

BLYNK_WRITE(vPin) {
  if (param.asInt()) {
    timeDisplay();
    dateDisplay();
    String emailAddress = "xxxxxxxxxx@gmail.com";
    String subject = "Hello";
    String body = "Your project sent this message at " + String(currentTime) + " on " + String(currentDate);
    Blynk.email(emailAddress.c_str(), subject.c_str(), body.c_str());
  }
}
0 Likes

#19

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

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

Maybe

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

Give it a try!

0 Likes

#20

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