A Docker-based implementation of the BS440 project for Medisana scales.
This project provides a containerized solution for connecting to Medisana scales via Bluetooth Low Energy (BLE) and processing the measurement data. It includes:
- BLE connection and data retrieval
- Time synchronization with the scale
- Plugin system for data processing (MQTT, CSV, etc.)
- Docker deployment for easy setup
- Docker Integration: Run in a containerized environment
- Plugin Architecture: Extensible design for various data outputs
- MQTT Support: Publish measurements to MQTT brokers
- Time Synchronization: Ensures accurate timestamps on measurements
- Historical Data Handling: Processes both new and stored measurements
- Docker and Docker Compose
- A Medisana scale (BS440, BS444, etc.)
- Bluetooth capability on the host machine
-
Clone this repository:
git clone https://github.com/yourusername/BS440-Docker.git cd BS440-Docker
-
Configure your scale's MAC address in
BS440.ini
:[BLE_Settings] mac_address = XX:XX:XX:XX:XX:XX
-
Start the container:
docker-compose up -d
After deploying the container, edit the BS440.ini
file under /app/config/ to configure:
[BLE_Settings]
# MAC address of the device to monitor (comma-separated if multiple)
mac_address = XX:XX:XX:XX:XX:XX
[Logging]
# Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
level = INFO
[Plugins]
plugins = BS440mqtt
[MQTT]
host = localhost
port = 1883
username = your_mqtt_username
password = your_mqtt_password
prefix = medisana/bs440
retain = True
qos = 0
The project uses a plugin architecture to process and store measurement data:
- BS440mqtt: Publishes data to MQTT brokers for integration with home automation systems
- More plugins coming soon (CSV, InfluxDB, Google Fit, etc.)
Data is published to the following MQTT topics:
medisana/bs440/person{id}/weight
- Weight measurementsmedisana/bs440/person{id}/body
- Body composition measurements (fat, muscle, etc.)
If you're having trouble connecting to your scale:
- Ensure Bluetooth is enabled on your host machine
- Verify the scale's MAC address is correct in the configuration
- Check that the scale is in pairing mode (usually by stepping on and off)
- Run with
level = DEBUG
for more detailed logs
The container requires privileged access for Bluetooth functionality. If you're experiencing issues:
- Ensure the container has access to
/var/run/dbus
and/var/run/bluetooth
- Verify that
network_mode: host
is set in your docker-compose.yml - Check that the Bluetooth service is running on the host
Contributions are welcome! Feel free to submit pull requests or open issues for:
- Additional plugins
- Bug fixes
- Documentation improvements
- Feature requests
This project is based on the original BS440 project by keptenkurk. It extends the functionality with Docker support and an improved plugin architecture.