Skip to content

Instantly share code, notes, and snippets.

@tubalainen
Last active April 26, 2024 12:32
Show Gist options
  • Save tubalainen/f88e78d0e97aebe67c35fd63b9fc7f79 to your computer and use it in GitHub Desktop.
Save tubalainen/f88e78d0e97aebe67c35fd63b9fc7f79 to your computer and use it in GitHub Desktop.
ESP8266 GPS Tracker user Tasmota GPS and Home Assistant
# GPS tracker for Home Assistant using Tasmota
## The GPS module
Get your self an ESP8266 and a GPS module, for GPS module I do recommend the NEO-6M module: https://www.aliexpress.com/item/1005002579586721.html
## The Tasmota firmware
The Tasmota firmware is based on the "basic" setup with the enabled options '#define USE_GPS' and '#define USE_FLOG' set
It you want to download a pre-compiled version, it is available here: https://www.pucebaboon.com/TASMOTA/
Download and flash Tasmota-GPS.bin, configure the GPS RX/TX pins (I use D1 and D2), wifi, mqtt and device name
Also set "SetOption56 1" and "SetOption57 1" if you got many access points using the SSID - otherwise (dumb) Tasmota will not roam.
## Create a "Rule1"
Create a rule using the terminal like this: Rule1 ON GPS#lat DO Var1 %value% ENDON ON GPS#lon DO Var2 %value% ENDON ON GPS#vAcc DO Var3 %value% ENDON ON GPS#hAcc DO publish2 tele/%topic%/GPS {"latitude":%var1%,"longitude":%var2%,"gps_accuracy":%value%,"vertical_accuracy":%var3%} endon;"}"}
(The rule above is not created by myself, its a mix of configs and finalized by a fellow ESP Facebooker named Michael.)
## Create a device_tracker entity in Home Assistant
Home Assistant Configuration.yaml
device_tracker:
- platform: mqtt_json
devices:
Helga: tele/Device_name/GPS
## Other sensors from Tasmota to Home Assistant will be added automatically if you got MQTT discovery on in Home Assistant.
@ChipMIK1
Copy link

As far as i remember speed isnt calculated in Tasmota. I could imagine its in the serial string from the GPS and just not used, at least by me, but almost 2 years ago so unfortunately i cant remember and wasnt relevant for my purpose as i use it in a lawnmover.

@lety2000
Copy link

Hello, I need some help to create the entity. I use the ESp8266 with Dht-22 and the Neo 6m Module. On the Tasmote-Website I can follow all Sensor dates: Humidity, Temperature and all GPS-Informations. The Dht-22 senor is detected as a Sensor in Homeassistant. I tried to add the Code in configuration.yaml to create a new entity. But I fail. Can you tell me, wich entries i have to modify, that my senor gets an entity.
[Helga] is the users name? What is [tele] for? My Sensor is named "Temp1" so I added this as Device_name. What ist [GPS] for?
Many thanks, for answering my questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment