Read and write data on a BSB (Boiler System Bus).
Functionalities offered:
- Commandline interface. Enter
help
to get list of commands,help <cmd>
for documentation of a specific command. - Web interface at port :8081 (e.g. http://localhost:8081)
- Logging of fields with preset interval. The logs are written in ASCII
.trace
files and can be loaded withtrace/load_trace.py
intonumpy
arrays.
You need hardware to interface with the bus. In priniple, a serial port and a level converter / galvanic decoupler is required. The circuit that I use is drawn here, but not recommended for rebuilding.
The serial port driver evaluates the CTS
(clear-to-send) pin of the RS232 in order to check if the bus is free. Depending on your circuit, you may want to change the settings (esp. invert/no invert) in (bsb_comm.py), around line 60.
Dependencies are web.py and pySerial.
To install them, use pip install -r requirements.txt
Clone or download the project.
Edit config.py
to your liking.
Run using sh bsbgateway.sh
.
For continuous operation, it is (currently) recommendable to run in a screen
environment like so:
screen -dmS bsbgateway '/bin/sh /path/to/bsbgateway.sh'