# Solution for GPS tracking of the vehicle

**URL:** <https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745>\
**Category:** General\
**Created:** [22 August 2022 09:42 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745 "2022-08-22T09:42:00Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)\
**Post date:** [22 August 2022 09:42 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/1 "2022-08-22T09:42:01Z")

</div>

Dear all,  
I have an idea of creating flow, that will track GPS location of my car. I was thinking of installing a GPS sensor into the car and create everything on my own, but I see there are already sensors like [this](https://www.ebay.com/itm/403724304587?hash=item5dffd800cb:g:C5AAAOSwJ9VeF9qX&amdata=enc%3AAQAHAAAA4LhJjtgxVJxM6q7dG0wdQaP5K4X81qmfHGvaMpYUK760dioO7UYZ9uQfH4bVZx3fKPvJzq0fUp%2Bo1M3EirdBIaYiWpu%2Bp6wSRPy3rLwYv7AFQ8V56DR5yAMgPgmu2tQE1jUh90EjxDo%2FO3dEPAm09AW3WhyTYHYRpIIOxA9nIWA4WPRNbwanMx1DhbfBYu5NDZtWPfmyxXCOJE703Jo2xDSWznS91pMUS4Xo%2FGjmjrLgKvd8xGr9awUc7Ea07d5QQ7W0v2S%2FCzTYRqoRHG1mtiiS4YvP80sitqMkM18QV5SU%7Ctkp%3ABk9SR6qfqszYYA) available.  
Does anyone of you have any idea/experience with something like this. My end goal is to store GPS location into the DAtabase....after that I am manipulation this data in visualization tool....  
Thx!

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [22 August 2022 10:00 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/2 "2022-08-22T10:00:39Z")

</div>

Can you explain where the data is stored?

Is the RasPi in/on the car?

How does it _talk_ to the rest of your _network_?

Looking at that link, it will probably need a SIM and a _phone plan_ if it sends the data back to you remotely.  
So that isn't as cheap as it looks.

---

<div class="post-metadata">

**Author:** ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)\
**Post date:** [22 August 2022 11:24 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/3 "2022-08-22T11:24:21Z")

</div>

The sensor will be stored somewhere in the car, connected to 12V.  
I as thinking of two scenarios:

1. Real time.  
-Device is connected to the internet through internet. All the data is stored on cloud DB. It is connected to the interent either through SIM car or through hotspot (wifi) of the cas. In that case I can track it wherever. It is good also in case, the car is stolen.
2. Non-real time.  
-In that case data is stored on the devices (edge) and it is transferred to the cloud database, when it is connected to the wifi in my garage.

Even first option is not so costly...as I was checking there are data plans available for few euros per months. I don't think I will need a lot of data for sending coordinates.  
Regards

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [22 August 2022 11:28 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/4 "2022-08-22T11:28:46Z")

</div>

Maybe where you are.

But _we_ have only just got fast internet. (_The land down under_) and sometimes things like that can be very costly.

By the way, I have only now opened a thread on something similar.

You may want to look at the `node-red-contrib-web-worldmap` node.

> **[node-red-contrib-web-worldmap](https://flows.nodered.org/node/node-red-contrib-web-worldmap)**
>
> A Node-RED node to provide a web page of a world map for plotting things on.

It may help you.

My mind is blown looking at it and what it can do.  
I'm still stumbling with some things, but it may be useful to you.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [22 August 2022 11:56 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/5 "2022-08-22T11:56:29Z")

</div>

Four years ago some of my IoT students worked on a mini-project to track the route taken by someone riding a bicycle. They used an app called Owntracks on an Android mobile phone to send the data via a remote MQTT broker to a Raspberry Pi at school where Node-RED wrote the 'points' away to a MySQL database and displayed the tracks on a Node-RED Dashboard. This meant the students could see the position of the cyclist in realtime and could play the results back (offline) from the dB.

The benefit of this approach is you don't need any extra hardware apart from a mobile phone.

If I was tackling the project again I'd probably see how the Telegram app shapes up for this application.

I published it on 'Share Your Projects'

> [@Tracking a Mobile Device](https://discourse.nodered.org/t/tracking-a-mobile-device/1466):
>
> [Tracking a Mobile Device](http://resources-area.co.uk/node-red-flows/tracking_a_mobile_device.pdf) The above link will take you to a copy of the tutorial sheet I've written for my 11 to 13-year-old students to Track a Mobile Device in their After-School IoT Club. Hope you find it useful. Regards from David.

Here's a direct link to the tutorial I wrote for my students.  
[http://resources-area.co.uk/node-red-flows/tracking\_a\_mobile\_device.pdf](http://resources-area.co.uk/node-red-flows/tracking_a_mobile_device.pdf)

**EDIT:**  
I've just seen in the tutorial the students used [www.cloudmqtt.com](http://www.cloudmqtt.com) as their broker.  
Not sure if that company still offers a free teir.  
[Beebotte](https://beebotte.com/plans) do offer a free plan for up 50k messages/day - so worth considering.

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [22 August 2022 12:24 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/6 "2022-08-22T12:24:23Z")

</div>

I may be using that myself.

---

<div class="post-metadata">

**Author:** ![FireWizard52](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/firewizard52/32/34508_2.png) [@FireWizard52](https://discourse.nodered.org/u/FireWizard52)\
**Post date:** [22 August 2022 13:28 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/8 "2022-08-22T13:28:29Z")

</div>

Four or five years ago I created my first Node-Red project and it was more or less like this.

My car transmits the lat/lon co-ordinates, if it is in parking position. For privacy reasons, it is not transmitted, if the car is moving. This is a decision of the car manufacturer (Volvo) and cannot be changed. However my mobile phone has the, already mentioned before, app "Owntracks" installed (an alternative version NextTracks also exists). This app sends the co-ordinates to my private MQTT broker. Think of security/encryption. I do not see a significant increase of costs as it is lightweight communication from my mobile phone.

I see a lot of car trackers, that uses MQTT. So I suggest have a look at that.

I use it for various functions.

- Display the car position on the worlmap node ( together with phone position). Just for fun
- As Owntracks has also a companion application (ot-recorder) you can always recall the history.
- Use the co-ordinates to calculate the distance from my car to the home location, both as km and time. See: [http://project-osrm.org](http://project-osrm.org)
- If my car is at home (the distance car-home \< 10 m) I'm able to lock/unlock the car by NR and/or Google Home.

So some idea's.

Regards

---

<div class="post-metadata">

**Author:** ![demokedes](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/demokedes/32/19082_2.png) [@demokedes](https://discourse.nodered.org/u/demokedes)\
**Post date:** [22 August 2022 13:29 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/9 "2022-08-22T13:29:17Z")

</div>

Hm...I know that one....that is my backup plan....I am using even more elegant solution:  
Using "Find my Iphone" node from Apple....it is asking apple, hat is the location of phone.  
It requires iphone, but you can get used one ith poor battery for 50$.  
Nevertheles, I prefer to have proper solution ith smal chip/sensor.  
Any idea?

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [22 August 2022 15:11 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/10 "2022-08-22T15:11:07Z")

</div>

Just been looking at this device on Amazon-UK.

> **[DB2 GPS Tracker – From Rewire Security - Self Install Vehicle Tracking System...](https://www.amazon.co.uk/Vehicle-Caravan-Tracker-Tracking-Motorbike/dp/B07KJRGJKT)**
>
> DB2 GPS Tracker – From Rewire Security - Self Install Vehicle Tracking System for Tracking Fleet, Car, Van, Caravan, Motorbike, Motorcycle in Real-time - Pay As You Go, Web Platform and Mobile App : Amazon.co.uk: Electronics & Photo

Looks dead easy to fit and not too expensive for the monthly subscription fees.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [21 October 2022 15:11 UTC](https://discourse.nodered.org/t/solution-for-gps-tracking-of-the-vehicle/66745/11 "2022-10-21T15:11:45Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
