BSB Controller is a tool designed for configuring and monitoring the BSB-featured boilers via MQTT. It is suited for Baxi Luna Platinum boilers, but will work with any other BSB based boilers.
- Boiler configuration and monitoring
- Home Assistant integration: MQTT integration featuring HA MQTT discovery for seamless configuration
- Debug Monitoring Interface: Simple get/set/log interface through HTTP/JSON.
- Configurable and expandable: User-selectable messages and period for their refresh
- Minimal hardware required: Python-enabled system with serial port and simple hardware adapter / voltage level convertor
- Python 3.x
- MQTT broker (e.g., Mosquitto)
- Home Assistant (optional)
- System with serial port capable sending parity bits.
- Hardware adapter for serial port
The hardware adapter is composed of:
- two opto-couplers for galvanic separation (RX, TX);
- 1 NPN transistor for shorting BSB line on transmission (pull-up is in the boiler);
- 1 NPN transistor for level invertion + shorting RX pin of serial port (pull-up should be set in serial port);
- some passive resistors and diode to get the right voltage levels.
The adapter can be built on the universal PCB.
Check the intended serial port for Parity mode support - for example HW serial ports of some RPi's are not capable of the Parity mode. In this case one can use a USB-Serial adapter or use directly some USB-enabled microcontroller (e.g. Seeeduino XIAO) programmed as serial port.
Before connecting, check the voltage polarity on BSB pins. Ensure to connect data pin, not the panel backlight pin (both can have 12-15V in the bus idle state).
-
Prepare and connect the hardware adapter
-
Clone the repository
git clone https://github.com/martinspinler/bsb-controller.git
-
Install with dependencies
It's recommended to use a virtual environment:
python3 -m venv venv-bsb source venv-bsb/bin/activate pip install ./bsb-controller/ -
Configure the application
Edit example configuration in example.yaml file. At least the
bsbportand themqtt.connectionhas to be updated. -
Run the server
python -m bsbcontroller --config ./bsb-controller/example.yaml Check the console output for sent & received messages. You should see successfully transmitted messages. As the BSB is shared, when more devices transmitting at once, the packets are discarded for CRC mismatch and retransmitted in some time. So the occassional CRC errors and retransmitted messages are okay.
The debug web server is enabled by default (runs on port 8008).
HTTP GET request with empty query string outputs last messages in JSON.
HTTP GET request with the get query string reads one item over BSB and print current value. For example: http://bsb-host:8008/?get=hc1_mode
HTTP GET request with the set query string writes value of item over BSB. For example: http://bsb-host:8008/?set=room1_temp_req&val=20.5
This project is licensed under the MIT License - see the LICENSE file for details.
