class platypush.backend.gps.GpsBackend(gpsd_server='localhost', gpsd_port=2947, **kwargs)[source]

Bases: Backend

This backend can interact with a GPS device and listen for events.



  • gps (pip install gps)

  • gpsd daemon running (apt-get install gpsd or pacman -S gpsd depending on your distro)

Once installed gpsd you need to run it and associate it to your device. Example if your GPS device communicates over USB and is available on /dev/ttyUSB0:

[sudo] gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock

The best option is probably to run gpsd at startup as a systemd service.

__init__(gpsd_server='localhost', gpsd_port=2947, **kwargs)[source]
  • gpsd_server (str) – gpsd daemon server name/address (default: localhost)

  • gpsd_port (int or str) – Port of the gpsd daemon (default: 2947)


Starts the backend thread. To be implemented in the derived classes if the loop method isn’t defined.