A Python module that can receive NMEA GPS data from a Teltonika router. transform it to OwnTracks format and send it to a MQTT broker.
To build the module, run:
poetry install
.venv/bin/python -m teltonika_owntracks
Inspect settings.py
to see how the bridge can be configured.
The Python module starts a TCP packet listener that listens on a TCP port (8500) for NMEA sentences. These NMEA sentences come e.g. from a Teltonika router that has been configured to forward the NMEA GPRMC or GARMC sentences to this machine.
Don't forget to open the firewall on your computer for this particular port.
The listener will read and interpret the NMEA sentences and will convert then to OwnTracks data packets that are the sent to the configured MQTT server.
The bridge can also be run in a docker container. For example:
docker buildx build . -t etxean/teltonika-owntracks --push
docker compose up -d
Using netcat
, you can send messages to a TCP port. Start this in powershell with
nc localhost 8500
And then send NMEA messages. These can be generated e.g. using https://nmeagen.org/