Node-red Geo fencing, Google maps

454 views
Skip to first unread message

Waqas Ahmed

unread,
Mar 29, 2016, 8:32:05 AM3/29/16
to Node-RED
Hello everyone.

First of all thank you so much guys for such a very useful tool "Node red".

I am going to install a security set up in my car, which involves, Raspberry Pi 2, Node-red, SIM808 board, Relays, Finger print scanner etc. etc.

I have plan to make SIM808 interact with node-red through serial communication.

I want to create a white list of roads according to Google maps (Other maps are not suitable for my current location). If my car is on those roads, it does not need any security check, otherwise, It should ask for valid finger print to go on. Relay will be used to turn off car in case of non white listed area.

I have already tried "https://www.npmjs.com/package/node-red-node-geofence" but it does not support google maps.

May someone guide me regarding geofencing in node red according to google maps?

Mark Setrem

unread,
Mar 29, 2016, 9:19:21 AM3/29/16
to Node-RED
Fortunately there is no node written that will help you achieve your idea.
The thought of a cars engine and power steering suddenly cutting out scares me and could easily endanger people around the car when it happens.


Julian Knight

unread,
Mar 31, 2016, 4:15:26 PM3/31/16
to Node-RED
Ha! No worse than the current electronic management controls which are woefully protected. But I think the idea is only to prevent the maps from showing anything outside the normal area - trying to control a teenager maybe?! :-)

I'm afraid that you will be hunting through the Google Maps API for that.

However, there might be an easier route. Owntracks can set geofences. So you could pretty easily interface that with NR. Owntracks actually uses MQTT so it is pretty simple to either interface directly from NR (as I've done - I have a notification when I get within the geofence that is round our house) or you can actually make a local MQTT broker listen to the Owntracks server.

Mark Setrem

unread,
Mar 31, 2016, 4:37:17 PM3/31/16
to Node-RED
Julian,  Perhaps you could read the initial post again.

"Relay will be used to turn off car in case of non white listed area."   

To me reads that if the car is in a non approved area the car is automatically turn off.  Nothing about preventing maps from displaying this is about automatically cutting power to the engine, power steering, brakes etc.   Which I still think is dangerous

Julian Knight

unread,
Mar 31, 2016, 5:02:32 PM3/31/16
to Node-RED
Ah, you got me there! Actually, I'm fairly sure this would be illegal pretty much everywhere - certainly in all Western countries. It would certainly invalidate any insurance.

There are some odd exceptions in the UK however. If you are a farmer there's all sorts you can get away with.
As you say though, I would't recommend that on the roads.

Maybe a speed limiter would be good instead? Even so check with local regulations and your insurers. And if you are given the go-ahead, make sure you REALLY understand how it behaves when the system fails (which it will!) and design in fail-safe.

Probably better to stick with the maps thing and add in both in-car warnings and a notification to some external "authority".

Dave C-J

unread,
Mar 31, 2016, 6:14:26 PM3/31/16
to node...@googlegroups.com
OK - so it's a while ago... but... depending on your country... different rules may apply...

Greg EVA

unread,
Apr 1, 2016, 12:01:30 PM4/1/16
to Node-RED
I used to work with a company that used relays tied to cellular modem/controllers that did just this sort of thing; and this was in the U.S. as well as elsewhere in the world.

The main thing is this sort of digital/physical interface really REALLY begs the question of how to safely handle it, and perhaps even avoid its use.  Setting off a recorded message yelling at you to turn around and return to authorized zone before the car is shut off in 5 minutes may be an option.  Another is that the car must be stopped before the shutdown can initiate, and will not be able to restart.

The legal and safety concerns and questions far outweigh the technical ones; but if you have to ask how to do this, you should likely not undertake it on your own!

Julian Knight

unread,
Apr 1, 2016, 6:16:24 PM4/1/16
to Node-RED
Ha ha! I remember that when it came on the news. I also know that there are many parts of the world where stopping a car is the LAST thing you ever want to do. I remember hearing about some place in Brazil where people actually speed up to go through red lights because stopping is too dangerous!
Reply all
Reply to author
Forward
0 new messages