Skip to content

Latest commit

Β 

History

93 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bosch eBike Flow Integration for Home Assistant

Initially forked from Phil Barker

hacs_badge hainstall Wero wise Revolut PayPal github BuyMeCoffee

Monitor and control your Bosch eBike directly from Home Assistant! Track battery level, charging status, range estimates, and create smart charging automations.

Important

Minimum requirements:

In minimum this integration requires:

  • Bosch eBike Flow app [Gen 4 (or higher) systems]

This integration will NOT work with the older Bosch eBike Connect app (Gen 3 and below).

Important

Additional requirements when you want to have live battery, energy & location information:

  • a ConnectModule hardware installed on your bike (sold separately, (~€100-150)
  • an active Bosch eBike Flow+ subscription (~€30-50/year)

Only when you have this additional hardware and an active Flow+ subscription, then the integration can access your live battery & energy data. Only after you have installed this additional hardware on your eBike, live-battery-data will be sent from your bike to the Bosch backend systems.

Sample Panel

Bosch eBike

Features

πŸ“ˆ Basic Sensors
Β Β Β Β Β Β without additional hardware & subscription

  • Total Distance/Odometer – Total distance cycled
    (the integration will also import history data from your previous activities)
  • Charge Cycles – Number of full charge cycles completed
  • Lifetime Energy – Total energy delivered over the bike's lifetime
  • Motor Hours – Total powered-on time of the drive unit
  • Battery Capacity – Total battery capacity
  • BASIC Reachable Range – Estimated range per riding mode
  • Last Ride – The distance of your latest activity. All additional data (for the last activity) are available via the sensor attributes (see Where to find attributes in HA section):
    • title
    • start time
    • end time
    • timezone of activity
    • activity type (if set)
    • duration (without stops) [in seconds]
    • avg/max speed [in km/h]
    • avg/max cadence
    • avg/max rider power [in watts]
    • avg/max heart rate
    • elevation gain/loss [in meter]
    • calories burnt
    • total driver consumption percentage
    • total battery consumption percentage
    • rider energy share
    • co2 emissions grams
    • co2 emissions car equivalent Grams
    • trick statistics object
    • brake events object
    • assist mode details object
  • Location – Last known position of the bike as a device_tracker entity
    This data is based on the polyline from the last ride activity – so don't expect very high accuracy!
  • Component Details – Serial numbers and product info
  • Software Versions – Track firmware versions of all components

πŸ“Š Extended Sensors / 🚴 Advanced Sensors
Β Β Β Β Β Β with additional hardware & subscription

  • Battery Level – Real-time battery percentage (SOC))
  • Battery Remaining Energy – Available energy in Watt-hours
  • Battery Charging – Active charging status
  • Live Reachable Range – Estimated range per riding mode (when the bike is online)
  • Location – Last known GPS position of the bike as a device_tracker entity
    (requires a ConnectModule registered for the eBike Alarm feature; the position updates when the ConnectModule reports to the Bosch cloud and is polled every 15 minutes)

⚑ Smart Features (Basic)

  • Cloud-based polling every 5 minutes
  • OAuth2 authentication with Bosch eBike Flow
  • Multi-bike support (if you have multiple eBikes)

⚑ Smart Features
Β Β Β Β Β Β with additional hardware & subscription

  • Real-time updates while charging

Requirements

Software

  • πŸ“± Bosch eBike Flow app installed and working
  • 🏠 Home Assistant 2025.1.0 or newer
  • 🌐 Internet connection for cloud API access

Hardware

A compatible Bosch Systems [Gen 4 (or higher) Only] eBike. This integration ONLY works with Generation 4 (or higher) of the Bosch eBike Systems that are using the Bosch Flow-MobileApp. Compatible systems are:

  • βœ… Performance Line CX Gen 4 (or higher)
  • βœ… Performance Line Gen 4 (or higher)
  • βœ… Cargo Line Gen 4 (or higher)
  • βœ… Any Gen 4 (or higher) system with or without ConnectModule installed

Not Compatible:

  • ❌ Gen 3 and older Bosch systems (use Bosch eBike Connect app)
  • ❌ Non-Bosch eBike systems

Additional optional requirements
(for live battery & energy data)

When you want to make use of the optional extended battery sensor data (like SOC), then there are additional requirements:

Required Hardware (Additional Purchase)

  • πŸ”Œ Bosch ConnectModule - Required hardware that connects your bike to the cloud
    • Cost: ~€100-150 (depending on region)
    • NOT included with most bikes by default
    • Must be purchased separately and installed on your bike
    • Available from Bosch dealers or online retailers

Required Subscription (Recurring Cost)

  • πŸ’³ Bosch eBike Flow+ Subscription
    • Cost: ~€30-50/year (varies by region)
    • Required for cloud connectivity and remote features
    • Subscribe through the Bosch eBike Flow app

Installation

Preparation (optional)

Even if it's optional, it's highly recommended to install HACS (Home Assistant Community Store) to install this integration.

Tip

The IMHO simplest way to install this integration is via the two blue buttons below ('OPEN HACS REPOSITORY ON MY HA' and 'ADD INTEGRATION TO MY HA').

Option 1: Via HACS (Recommended)

Open your Home Assistant instance and adding repository to HACS.

  1. Install Integration:
    • Search for "Bosch eBike Flow" in HACS – Important there is already another HACS Bosch eBike Flow integration β€” Please make sure to select the 'correct' one Bosch eBike Flow (works also without ConnectModule) with the description "Bosch eBike Flow Integration for Home Assistant – support for Bosch eBikes [Generation 4 (or higher)], no ConnectModule required"
    • Click "Download"
    • Restart Home Assistant

Open your Home Assistant instance and start setting up a new integration.

  1. Configure:
    • Go to Settings β†’ Devices & Services
    • Click "+ ADD INTEGRATION"
    • Search for "Bosch eBike Flow"
    • Follow the OAuth login flow with your Bosch eBike Flow credentials as it's described in the Configuration - OAuth Setup Section

Option 2: Manual Installation

  1. Copy the custom_components/bosch_ebike folder to your Home Assistant's custom_components directory
  2. Restart Home Assistant
  3. Add the integration via Settings β†’ Devices & Services

Configuration

OAuth Setup

Important

You MUST use a desktop/laptop browser (not a phone/tablet) for initial integration setup for your bike.

The integration uses OAuth2 for secure authentication:

  1. Click "Add Integration" and select "Bosch eBike Flow"
  2. Copy the authorization URL (or click on it directly – but make sure to open it in a new browser tab)
  3. Paste it in a new browser tab on your computer
  4. Now enable the browser developer tools (F12) for the new tab/browser window. This must be done before you are entering your login credentials.
  5. Log in with your Bosch eBike Flow app credentials.
    Please note, that the login screen from Bosch will not complete – you will not be forwarded to a different page after you entered the password and pressed enter. Basically, you are stuck there by purpose, since you now must manually capture the generated authorization code (generated by the Bosch backend). So after you entered your password, the next step is:
  6. Find in the 'network'-tab of the browser developer tools the final authorization request (that is failing by purpose).

    • In the network-tab you will find a line (in red) like (example):
      oauth2redirect?state=akY...&code=dd6...5f8

      This is the request you are looking for, right-click on this line and select from the menu (submenu) Copy URL.

    • The full URL you are copying should look like this (example):
      onebikeapp-ios://com.bosch.ebike.onebikeapp/oauth2redirect?state=akY...&code=dd6...5f8

  7. Paste the complete copied URL (including the code) back into the Home Assistant setup dialog.
  8. Select which bike to monitor (if you have multiple)

πŸ“– Detailed Step-by-Step Authentication Guide - Includes screenshots and troubleshooting!


Known Issues

Right now - nothing...


Miscellaneous

Multiple Bikes

If you have multiple eBikes registered in the Bosch eBike Flow app:

  • Add the integration once for each bike
  • Each bike will appear as a separate device in Home Assistant

Understanding Sensor Updates

Update Behavior

The ConnectModule updates the Bosch Cloud API when:

  • βœ… Bike is charging (plugged in)
  • βœ… Bike is powered on
  • βœ… Alarm is triggered by motion

When the bike is unplugged, powered off, and stationary, the ConnectModule goes into low-power mode and stops sending updates to the Bosch backend (and therefore also this integration will not receive any updated data).

What This Means

  • πŸ“Š While charging: Sensors update every 5 minutes with current data
  • πŸ”‹ Perfect for: Monitoring charge sessions and creating smart charging automations
  • ⚠️ Limited when: Bike is stored unplugged and powered off

For detailed sensor reliability information, see SENSOR_RELIABILITY.md.

Example Automations

Smart Charging: Stop at 80%

Preserve battery health by stopping the charge at 80%:

automation:
  - alias: "eBike: Stop charging at 80%"
    description: "Turn off smart plug when bike reaches 80% to preserve battery"
    trigger:
      - platform: numeric_state
        entity_id: sensor.bfe_[your_frame]_battery_level
      above: 80
    condition:
      - condition: state
        entity_id: binary_sensor.bfe_[your_frame]_battery_charging
      state: "on"
    action:
      - service: switch.turn_off
        target:
          entity_id: switch.bike_charger_plug
      - service: notify.mobile_app
        data:
          title: "πŸ”‹ eBike Charging Paused"
          message: "Battery at {{ states('sensor.bfe_[your_frame]_battery_level') }}% - charging stopped to preserve battery health"

Notification: Charging Complete

Get notified when your bike is fully charged:

automation:
  - alias: "eBike: Notify when fully charged"
    trigger:
      - platform: numeric_state
        entity_id: sensor.bfe_[your_frame]_battery_level
        above: 99
      - platform: state
        entity_id: binary_sensor.bfe_[your_frame]_battery_charging
        to: "off"
        for:
          minutes: 1
    condition:
      - condition: numeric_state
        entity_id: sensor.bfe_[your_frame]_battery_level
        above: 95
    action:
      - service: notify.mobile_app
        data:
          title: "πŸš΄β€β™‚οΈ eBike Ready!"
          message: "Your bike is {{ states('sensor.bfe_[your_frame]_battery_level') }}% charged and ready to ride!"

Dashboard Card Example

type: entities
title: eBike Status
entities:
  - entity: sensor.bfe_[your_frame]_battery_level
    name: Battery Level
  - entity: sensor.bfe_[your_frame]_battery_remaining_energy
    name: Energy Remaining
  - entity: binary_sensor.bfe_[your_frame]_battery_charging
    name: Charging
  - entity: sensor.bfe_[your_frame]_total_distance
    name: Total Distance
  - entity: sensor.bfe_[your_frame]_charge_cycles
    name: Charge Cycles

Troubleshooting

Integration Won't Load

  1. Check Home Assistant logs for errors
  2. Ensure you're running HA 2024.1.0 or newer
  3. Try restarting Home Assistant after installation

OAuth Login Fails

  1. Make sure you're using your Bosch eBike Flow app credentials
  2. Check that your bike is registered in the Bosch eBike Flow app
  3. Ensure your ConnectModule is paired and online

Sensors Show "Unavailable"

  1. Check that your bike's ConnectModule is paired with the Flow app
  2. Power on your bike or plug it in to trigger an update
  3. Wait up to 5 minutes for the next polling cycle

Data Not Updating

The ConnectModule only sends updates when:

  • Bike is charging
  • Bike is powered on
  • Alarm is triggered

This is normal behavior. The sensors will update once you power on or plug in your bike.


Where To find attributes in HA?!

A common pitfall is that the attributes (like the Last Ride (distance) Entity) are not obviously visible in the sensor entity itself. So how to find them in HA (2026):

  1. Find the eBike sensor entity (e.g., sensor.bfe_[your-bike-id]_last_ride_distance)
  2. Click on the entity to open its details
  3. Click on the dots beside the gear icon and then select Details
4. This will bring the full details of your last activity – like this one. Please have in mind that not all activities support all attributes.

When you want to access values of the attributes (e.g., in automations), then you can do this via the state_attr template functionality. E.g. {{ state_attr("sensor.bfe_[your-bike-id]_last_ride_distance", "elevationGain") | default('0') }} to get the value of the elevationGain attribute from the last_ride_sensor (please note that all attributes start with lower case!).

You can find more details about the individual sensors when accessing your HA via http://[your-ha-ip-here]/developer-tools/state and then selecting the individual sensor from the dropdown list, then you can see all the attributes of the sensor.

Based on these attributes, you can create your own template sensors or automations in Home Assistant.


Advanced

Enable Diagnostic Sensors

Additional sensors are disabled by default but can be enabled:

  1. Go to Settings β†’ Devices & Services
  2. Find your eBike device
  3. Click the device
  4. Enable desired sensors (software versions, serial numbers, etc.)

Logging

Enable debug logging in configuration.yaml:

logger:
  default: warning
  logs:
    custom_components.bosch_ebike: debug

Support & Contributing

Get Help & Report Issues

Support Development

If you like this integration and want to support the development, please consider supporting me on:

github Wero wise Revolut PayPal BuyMeCoffee

Your support helps maintain and improve this integration. Thank you! β˜•


Disclaimer

This is an unofficial integration and is not affiliated with, endorsed by, or supported by Bosch eBike Systems.

Use at your own risk. The author is not responsible for any damage to your bike, battery, or Home Assistant system.


Credits / Kudos

  • Thanks to Phil-Barker for developing the origin integration.
    BuyPhilACoffee
  • Thanks to the Home Assistant community
  • Built with the Home Assistant integration framework
  • Bosch eBike Flow API (reverse engineered)

Enjoying this integration? ⭐ Star the repo and share with other eBike enthusiasts!

About

Bosch eBike Flow Integration for Home Assistant - support for Bosch eBikes [Generation 4 (or higher)], no ConnectModule required

Topics

Resources

Stars

26 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages