renogybt-emulator: A Python Emulator for Renogy BT-1 and BT-2

I’ve put my latest project on GitHub: renogybt-emulator, a Python library and command-line tool that emulates the Bluetooth interface exposed by Renogy BT-1 and BT-2 modules connected to an MPPT solar charge controller.

The aim is to make it easier to develop and test solar-monitoring software without needing a physical controller, solar panels or batteries on the desk.

 

How it works

The BT-1 and BT-2 modules provide Bluetooth Low Energy (BLE) access to Renogy equipment, using RS232 and RS485 respectively on the controller side. My emulator runs on a Linux computer with a BLE adapter and presents the Bluetooth services and simulated controller data that a compatible client expects.

Underneath, it implements the BLE GATT services and characteristics used for communication, together with a Modbus RTU responder. A client sends a request over Bluetooth, and the emulator replies with values from its simulated register bank. Those values include battery voltage, charging current, solar power, temperatures and load status.

This lets a monitoring application connect to an emulated device and exercise its normal communication path.

 

Continue reading “renogybt-emulator: A Python Emulator for Renogy BT-1 and BT-2”