All Projects → codingcyclist → ha_strava

codingcyclist / ha_strava

Licence: MIT license
Pipe your Activity Data from Strava directly into Home Assistant

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ha strava

traindown-dart
Dart (and Flutter) library for the Traindown Markup Language. This is the reference implementation for now. It is first to receive features and fixes.
Stars: ✭ 16 (-74.6%)
Mutual labels:  fitness, fitness-tracker
strava
PHP Class for the Strava API (v3)
Stars: ✭ 117 (+85.71%)
Mutual labels:  strava, fitness
homeassistant-elasticsearch
Publish Home-Assistant events to Elasticsearch
Stars: ✭ 97 (+53.97%)
Mutual labels:  hass, custom-component
traindown
Public site
Stars: ✭ 35 (-44.44%)
Mutual labels:  fitness, fitness-tracker
garmin health
Python 3.x library to access Garmin Connect Health API
Stars: ✭ 32 (-49.21%)
Mutual labels:  fitness, fitness-tracker
ledfxrm
Custom Integration for Home Assistant to control a any (local/remote) LedFX-server - State: beta
Stars: ✭ 31 (-50.79%)
Mutual labels:  hass, custom-component
StravaHeatmap
Make a simple heatmap from your strava data
Stars: ✭ 23 (-63.49%)
Mutual labels:  strava, strava-data
Script My Workout
🏃 Programmable workouts from the comfort of your terminal 🏃
Stars: ✭ 19 (-69.84%)
Mutual labels:  fitness, fitness-tracker
hass-addons
Hass.io Addon Repository
Stars: ✭ 16 (-74.6%)
Mutual labels:  hass
HomeAssistantConfig
My Home Assistant Configuration
Stars: ✭ 87 (+38.1%)
Mutual labels:  hass
homeassistant-midea-air-appliances-lan
This Home Assistant custom component adding support for controlling Midea air conditioners and dehumidifiers on local network.
Stars: ✭ 101 (+60.32%)
Mutual labels:  hass
hass bletracker
Custom python3 script for better location tracking on HASS. Also enables using iTag bluetooth device as a tracker + smart home button
Stars: ✭ 26 (-58.73%)
Mutual labels:  hass
homeassistant-conf
🏡 Configuration for my Home Assistant instance (Intel NUC)
Stars: ✭ 14 (-77.78%)
Mutual labels:  hass
breaking changes
Component to show potential breaking_changes in the current published version based on your loaded components
Stars: ✭ 83 (+31.75%)
Mutual labels:  custom-component
SmartSpin2k
Transform your spin bike into a Smart Trainer!
Stars: ✭ 88 (+39.68%)
Mutual labels:  fitness
ha-eskom-loadshedding
Fetches loadshedding data from Eskom
Stars: ✭ 48 (-23.81%)
Mutual labels:  custom-component
panasonic smart app
🔛 Panasonic Smart App integration for Home Assistant.
Stars: ✭ 42 (-33.33%)
Mutual labels:  custom-component
hassio-vagrant
Vagrant box running Hass.io / Home Assistant
Stars: ✭ 42 (-33.33%)
Mutual labels:  hass
Heatmiser-for-home-assistant
Heatmiser Neo-Hub / Neostat support for home-assistant.io
Stars: ✭ 48 (-23.81%)
Mutual labels:  hass
strava-box
🏃‍♂️🏃‍♀️ Update a gist to contain your YTD exercise metrics from Strava
Stars: ✭ 34 (-46.03%)
Mutual labels:  strava

Strava Home Assistant Integration

Custom Component to integrate Activity Data from Strava into Home Assistant.

Buy Me A Coffee

Features

  • Gives you access to up to 10 of your most recent activities in Strava.
  • Supports both the metric and the imperial unit system
  • Activity data in Home Assistant auto-updates whenever you add, modify, or delete activities on Strava
  • Exposes 5 customizeable sensor entities for each Strava activity
  • Easy set-up: only enter your Strava Client-ID and -secret and you're ready to go

For every Strava activity, the Strava Home Assistant Integration creates a device entity in Home Assistant (max 10 activities). Each of these virtual device entities exposes five sensor entities which you can customize to display one of the following activity KPIs:

  • Duration (Minutes),
  • Pace (Minutes/Mile ; Minutes/Km)
  • Speed (Miles/Hour; Km/Hour)
  • Distance (Miles; Km)
  • # Kudos
  • Kalories (cKal),
  • Elevation Gain (Feet, Meter)
  • Power (Watts)
  • # Trophies

One additional sensor entity will be available for every Strava activity to display Date & Title of the underlying activity. To map a name to an activities's GPS start location, Strava Home Assistant relies on the free API at geocode.xyz. In the event that Strava Home Assistant cannot fetch a location name from geocode.xyz, it'll put "Paradise City" as the default location.

Since every Strava activity gets its own virtual device, you can use the underlying sensor data in your Dashboards and Automations, just as you'd use any other sensor data in Home Assistant. To learn how to display information about your most recent Strava Activities, please reference the UI-configuration example below.

Installation

First, set up remote access to your Home Assistant Installation

To use the Strava Home Assitant integration, your Home Assistant Instance must be accessible from an External URL (i.e. Remote Access). Without remote access, the integration won't be able to pull data from Strava. To learn how to set up Remote Access for Home Assistant, please visit the Official Documentation

Second, obtain your Strava API credentials

After you've set up remote access and configured the External URL for your Home Assistant instance, head over to your Strava Profile. Under "Settings", go to "My API Application", follow the steps in the configuration wizard, and eventually obtain your Strava API credentials (ID + secret). We need those credentials during the final installation step.

!!! IMPORTANT !!! It is essential that the Authorization Callback Domain which you set for your Strava API matches the domain of your Home Assistant External URL

Third, add the Strava Home Assistant Integration to your Home Assistant Insallation

As of now, the Strava Home Assistant Integration can only be installed as a custom repository through the Home Assistant Community Store (HACS). The installation process is super easy, check out my 5-minute tutorial on how to install Custom Components in HACS here

Fourth, make a connection between your Strava account and Home Assistant

Now is the time to fire up the Strava Home Assitant Integration for the first time and make a connection between Strava and your Home Assistant Instance.

From within Home Assistant, head over to Configuration > Integrations and hit the "+"-symbol at the bottom. Search for "Strava Home Assistant" and click on the icon to add the Integration to Home Assistant. You'll automatically be prompted to enter your Strava API credentials. It'll take a few seconds to complete the set-up process after you've granted all the required permissions.

Configuration/Customization

Strava Home Assistant only supports configuration through the Home Assitant UI. Configuration via. configuration.yaml will be deprecated official announcement to the HA community and is therefore not supported.

Upon completion of the installation process, the Strava Home Assistant integration automatically creates device- and sensor entities for you to access data from your most recent Strava activities. The number of sensor entities varies, depending on how many of your most recent Strava activities you whish to track from within Home Assistant (5 + 1 sensors per activity). Per default, only sensor entities for the two most recent Strava activities are visible in Home Assistant. Please read the section below to learn how to change the number of visible sensor entities for Strava Home Assistant.

Increase/Decrease the number of Strava activities avaiable in Home Assistant

You can always adjust the number of Strava activities you whish to track from within Home Assistant (min 1; max 10).

Just locate the Strava Home Assistant Integration under Configuration > Integrations, click on Options, and use the slider to adjust the number of activities. After you've saved your settings, it might take a few minutes for Home Assistant to create the corresponding sensor entities and fetch the underlying data. The activities available in Home Assistant always correspond to the most recent ones under your Strava profile.

Configure sensor entities for different types of Strava Activities

Strava Home Assistant exposes five sensor entities for every Strava activity. You customize the Strava-KPI for each of those five sensors as follows:

  1. Go to Configuration > Integrations
  2. Locate the Strava Home Assistant Integration and click on Options
  3. Leave the number of concurrent Strava Activities as is and hit SUBMIT to proceed
  4. Chose an activity type and configure the KPI-Sensor matching as you see fit
  5. Hit SUBMIT for your changes to take effect

You can only change the sensor configuration for one activity type at a time. After you've completed the configuration for a given activity type, you can start over to change the sensor configuration for another activity type.

As of now, customization is only supported for Ride, Run, and Hike activities.

Integrate Strava Activities into your Home Assistant UI

Below, you can find an example UI-configuration, which adds metrics from your two most recent Strava activities to a separate Lovelace Dashboard in Home Assitant.

title: Home
views:
  - title: Strava
    icon: 'mdi:strava'
    path: strava
    theme: ''
    badges: []
    cards:
      - cards:
          - entity: sensor.strava_0_0
            type: entity
          - entities:
              - entity: sensor.strava_0_1
              - entity: sensor.strava_0_2
              - entity: sensor.strava_0_3
              - entity: sensor.strava_0_4
              - entity: sensor.strava_0_5
            type: glance
        type: vertical-stack
      - cards:
          - entity: sensor.strava_1_0
            type: entity
          - entities:
              - entity: sensor.strava_1_1
              - entity: sensor.strava_1_2
              - entity: sensor.strava_1_3
              - entity: sensor.strava_1_4
              - entity: sensor.strava_1_5
            type: glance
        type: vertical-stack
      - type: picture-glance
        aspect_ratio: 0%
        camera_image: camera.strava_cam
        entities: []
        image: 'https://demo.home-assistant.io/stub_config/kitchen.png'
      - entities:
          - entity: sensor.strava_stats_summary_ytd_ride_distance
          - entity: sensor.strava_stats_summary_ytd_ride_moving_time
          - entity: sensor.strava_stats_summary_all_run_distance
          - entity: sensor.strava_stats_summary_all_run_moving_time
        title: Strava - Year to Date
        type: entities

Contributors

Buy Me A Coffee

TODO

  • [] Add customization support for more activity types
  • [] Add German language support
  • [] Add support for more KPIs
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].