Rene NulschandClaude Opus 5 ac0baffe74 Keep showing last known values when the bike is out of range
Setup no longer depends on the bike being reachable. The coordinator is
built from an address and resolves the BLEDevice per connect attempt, so
a parked or switched-off bike loads the entry instead of raising
ConfigEntryNotReady and leaving every entity unavailable.

Parser state is persisted through helpers.storage.Store and restored
before the platforms are set up, so entities carry their last values and
the VIN on their first state write. What survives is a whitelist:
battery and EBM counters yes, motor and assist no - a restored speed
reading is indistinguishable from live data on a parked bike. The
connection switch position is restored too, so a restart no longer wakes
a bike the user deliberately disconnected.

Also fixes three defects found while building this:

- Store.async_delay_save debounces rather than throttles, so re-arming on
  every notification postponed the write for as long as the bike stayed
  connected and nothing reached disk except on a clean shutdown.
- establish_connection had no disconnected_callback, so a dropped link
  left _is_connected True: the connectivity sensor lied and the poll
  never retried.
- _connect read self._client back across the 200ms handshake, which a
  concurrent teardown could clear underneath it.

Connecting now starts on the bike's advertisement instead of the next
poll tick, and an unreachable bike says why - distinguishing "switched
off" from "seen only by a passive proxy that cannot connect".

Renames the connection switch to Auto-connect and drops the hardcoded
English name on the connectivity sensor, which had been defeating its
translation key.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FyabWZzd7HoLpyBwEa5Zzh
2026-08-27 22:45:21 +02:00
2025-11-21 22:38:55 +01:00
2025-11-21 22:38:55 +01:00
2025-11-21 23:14:19 +01:00
2025-11-21 22:38:55 +01:00
2025-11-21 22:38:55 +01:00
2025-11-21 22:38:55 +01:00

MySmartBike BLE Integration for Home Assistant

GitHub release Validate with HACS HassFest tests

Home Assistant custom component for E-Bikes with Mahle SmartBike systems (X25, X35+, ebikemotion, ...) via Bluetooth Low Energy (BLE).

Many premium E-Bike brands use Mahle drive systems and the MySmartBike app for connectivity. This integration works with bikes from various manufacturers including Schindelhauer, Orbea, Bianchi, Pinarello, Scott, and others that use the Mahle BLE protocol.

Tested Bikes

This integration has been developed and tested with:

Brand Model Status
Orbea Vibe Fully tested
Schindelhauer Arthur IX Fully tested

Your bike not listed? If you have an E-Bike that uses the MySmartBike app (or ebikemotion app), it will likely work with this integration. Please open an issue to report compatibility!

Features

This integration provides real-time monitoring of your E-Bike through Bluetooth LE connection with 11 sensors, 1 binary sensor, and 1 switch:

Connection Control

  • Connection Switch - Control the BLE connection to your E-Bike

    • Turning off this switch will disconnect from the bike and the bike will shut down after approximately 5 minutes. You must manually turn the bike back on or connect it to power to reconnect!
    • Use this switch to save energy when you don't need active monitoring
    • The bike will automatically turn off about 5 minutes after disconnection to conserve battery
  • Connected (Binary Sensor) - Shows current BLE connection status to the bike

Battery Sensors

  • Battery State of Charge (%)
  • Battery Temperature (°C)
  • Battery Remaining Energy (Wh)

Motor Sensors

  • Assist Level
  • Motor Temperature (°C)
  • Speed (km/h)

E-Bike Management (EBM)

  • Odometer (km)
  • Range (km)
  • Light Status

Diagnostics

  • Last Seen (Timestamp) - When the bike last sent data, so you can tell how fresh the values are
  • Signal Strength (dBm) - disabled by default

Device Information

The integration automatically retrieves and displays:

  • Serial Number (VIN) - 17-character bike serial number
  • Protocol Version - BLE protocol version (e.g., 1.02, 3.00)

Requirements

  • Home Assistant 2024.1.6 or newer
  • Bluetooth adapter with BLE support
  • Bluetooth proxies with active connections are supported (ex. EspHome) - Shelly is not support as active direct connections are not possible.
  • E-Bike with Mahle SmartBike system (compatible with MySmartBike or ebikemotion app)

Installation

  1. Open HACS in Home Assistant
  2. Click on "Integrations"
  3. Click the three dots in the top right corner
  4. Select "Custom repositories"
  5. Add this repository URL: https://github.com/renenulschde/ha-mysmartbike_ble
  6. Select category "Integration"
  7. Click "Add"
  8. Search for "MySmartBike BLE" in HACS
  9. Click "Download"
  10. Restart Home Assistant

Manual Installation

  1. Download the latest release from the releases page
  2. Extract the files
  3. Copy the custom_components/mysmartbike_ble folder to your Home Assistant custom_components directory
  4. Restart Home Assistant

Configuration

The integration is configured through the Home Assistant UI:

  1. Go to SettingsDevices & Services
  2. Click + Add Integration
  3. Search for MySmartBike BLE
  4. Select your iWoc/HUS device from the list
  5. Click Submit

The integration will automatically discover iWoc and HUS devices in range via Bluetooth.

Troubleshooting

Device not found

  • Make sure your E-Bike is turned on and in range
  • Check that Bluetooth is enabled on your Home Assistant host
  • Verify that the device name starts with "iWoc" or "HUS" (please report other device names)

Connection issues

  • Ensure no other device is connected to the E-Bike via Bluetooth
  • Try restarting the Bluetooth service on your Home Assistant host
  • Check the Home Assistant logs for detailed error messages

Sensor values not updating

  • The integration updates data every 30 seconds when connected
  • Some sensors may show "Unknown" until the bike sends that specific data
  • Check if the bike is actively transmitting data (try riding or using the display)

Values after a Home Assistant restart

The integration keeps working when the bike is switched off or out of range:

  • Counters and battery values (odometer, trip distance, range, state of charge, remaining energy, light) are stored and shown again after a restart
  • Momentary readings (speed, motor temperature, assist level, battery current) are not restored and show "Unknown" until the bike connects again — a stale speed reading would look like live data from a parked bike
  • Use Connected and Last Seen to tell live data from last known values
  • The connection switch keeps its position across restarts, so a bike you deliberately disconnected is not woken up again by a Home Assistant restart

Connection Switch

  • To disconnect: Turn off the "Connection" switch in Home Assistant
    • ⚠️ This will shut down your bike after approximately 5 minutes!
    • The bike will remain on for about 5 minutes before automatically powering off
  • To reconnect:
    1. First, manually turn on your bike OR connect it to power
    2. Wait for the bike to be fully powered on
    3. Turn on the "Connection" switch in Home Assistant
  • Use case: Turn off the connection when you don't need monitoring to save your bike's battery

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

This is an unofficial integration and is not affiliated with or endorsed by Mahle, Schindelhauer, Orbea, or any other E-Bike manufacturer. Use at your own risk.

S
Description
Custom component to integrate Mahle/MySmartBike via Bluetooth/BLE without cloud usage
Readme
106 KiB
Languages
Python 100%