2 Devices, Same ESP8266, Different GPS codes to V Pins

I am new to this who world but by far, not a complete newbie.
I have installed Blynk local server and have a login on phone 1.
This gives GPS Trigger when signal in and out or a selected area.

If I open on another phone, how can I have both devices writing their own GPS Triggers to virtual pins, but on the same board (only have 1 x ESP8266 at present)
That way, when either device comes into range, or triggers a high, V1 or V2, I can act accordingly and trigger the Relay

I am sure someone else has tried this and I have looked, searched and tried but can’t find the answer. Some people say it can’t, some say it can, some say 2 pieces of hardware, some say bridge, and so on…

The issue is that it seems Blynk (currently) is really only designed to run on one phone at a time. So, while it can obviously be used with many phones all using same account, or via sharing, the Server doesn’t seem to know or care… it just treats all as the same.

And while I personally haven’t tried… as I rarely go places far enough to have distinct GPS coordinates on seperate devices. I think with two phones in two places on same account/project… the GPS stream widget will supply the Server with both streams… but on SAME vPin as remember, the App & GPS Streaming Widget doesn’t know it is duplicated.

But how to distinguish them in the sketch is another story without any clear answer as far as I am aware.

And as for GPS trigger… well, same thing… which phone triggers will depend on which phone is in the range… but the App/Server/Sketch would probably treat them all as the same phone.

I think you almost have to have multiple projects and each phone works on it’s own project with one of them assuming the “master” designation, and by utilising Blynk Bridge the “master” project might be able to distinguish individual phones GPS triggers, etc. HOWEVER that will require multiple devices for the “master” & “slave” code to run on each.

You see the reason there is no solid answers yet? :stuck_out_tongue: Way too many ifs and not enough “discrete phone” support… at least not without going with a commercial App account.

Many thanks for taking the time to reply, and so exhaustively

I kinda gathered it wouldn’t be quite as simple as I thought.

Seems as though it is pretty difficult to have 2 projects on different phones talking to the same physical device, ie triggering different V Pins when gps changes, per user account, so no sharing.
That would make sense in my mind as an easy fix, ie device 1 talks to ESP8266 and write to V1, device 2, talks to the same ESP8266 using the same token (can’t find where to change this in the local blynk server for the project) and write to V2
That way, within ArduinoIDE I could act accordingly if V1 or V2 goes high

If this is not as straightforward as something obvious I am missing on the config, It would seem I am best to just get a second device online in the server, and using a second account on the local server, simply bridge the V pins together, thus giving me the option of individual GPS activations and the same output option to trigger the relay ?

There’s a problem with this statement.

The devices (phones) don’t talk to the ESP8266, they talk to the Blynk server. An ESP can use the same auth code (token) as the project running on one of the phones and use this to extract data from the Blynk server, but the phone to server communication isn’t reliant on this. When you creat a project on your phone you’re asked what sort of MCU you’ll be using, but this is just to ensure that the correct type and number of digital and virtual pins are made available within in the app.

I guess (and I’ve not tried this) that there is a possible solution which is running different projects on each phone, then using one ESP running Bridge code to obtain data from each phone.
Obviously this project couldn’t be used for anything else other than obtaining GPS stream data.
You could have a different (shared if you wish) project running on both phones that allows you to do other stuff like talking to devices within the home, and even displaying map data of the position of both phones if you’re clever about how you pull this data across into the shared app.

I stress that I haven’t tried this, and don’t have much use for such functionality myself so I’m probaly not going to try it out for myself.

Pete.