Getting activity from gpslogger

I am really impressed with this device tracker, and I could see references about it, so I would like to share my impressions.

I have create a simple template sensor that give me the activity reported from Android to gpslogger, and gpslogger to HA.

This is so simple as:

sensor:
  - platform: template
    sensors:
      my_activity:
        friendly_name: "Mi actividad"
        value_template: "{{states.device_tracker.feb80fa9.attributes.activity}}"

device_tracker.feb80fa9 is my gpslogger sensor, with custom url as in official documentation.
Android gps_logger is a great application that can run with really minimum battery usage, almost unpercentible, even with https (note that you can accect the certificate if it is self-signed)

I have been seen accurate reporting in a galaxy S5 of:
STILL, ON_FOOT, and IN_VEHICLE

You can use this on any automation you imagine… Here a little example:

- id: '1535373898347'
  alias: In car
  trigger:
  - entity_id: sensor.my_activity
    platform: state
    to: 'IN_VEHICLE' # can be ON_FOOT,WALKING, IN_VEHICLE, STILL, RUNNING, ON_BICYCLE, TILTING, UNKNOWN, desconocido ó vacio
  condition: []
  action:
  - data_template:
  message: '@{{now().strftime("%H:%M")}} [{{now().day}}/{{now().month}}]'
  title: '{{states.device_tracker.feb80fa9.attributes.activity}}: a {{states.device_tracker.feb80fa9.attributes.speed}} km/h'
service: notify.pushbullet

I think that this “activity from mobile” is a great sensor that could be more spread.

Thanks a lot for this great HA !!!

1 Like