python solution for connecting the Heidelberg-EnergyControl Wallbox via ModbusRTU
- For the use of this python code it is necessary to install the python libs
pymodbus
andpyserial
:
python3 -m pip install pymodbus
python3 -m pip install pyserial
Remark: for pymodbus use minimum the version of 3.6.x Remark: for pymodbus use minimum the version of 3.6.x
Check the python code in the script HD_EnergyControl_ModbusRTU.py
.
Change the following line according to your serial device.
obj = HD_EnergyControl("/dev/ttyAMA0", 1)
The HD_EngeryControl constructor takes two arguments:
- port - where the wall box is connected to (default "/dev/ttyAMA0")
- UnitID - the unit id in the bus (default 1)
Then you can check the communucation via:
python3 HD_EnergyControl_ModbusRTU.py
This library is licensed under MIT Licence.