gps
Platypush documentation
gps
- 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.
Triggers:
platypush.message.event.gps.GPSVersionEvent
when a GPS device advertises its version dataplatypush.message.event.gps.GPSDeviceEvent
when a GPS device is connected or updatedplatypush.message.event.gps.GPSUpdateEvent
when a GPS device has new data
Requires:
gps (
pip install gps
)gpsd daemon running (
apt-get install gpsd
orpacman -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.