Read Solax X3 inverter registers via modbus interface (RS-485)
Project description
solax-x3
Read in real-time all parameters provided by Solax X3 solar inverter via its Modbus S-485 serial interface.
Prerequisites
- Solax X3 inverter
- Modbus RS-485 serial adapter/interface
- Modbus cable
- python version >= 3.8
- This python module
Installation
pip install solaxx3
Usage
from solaxx3.solaxx3 import SolaxX3
# adjust the serial port and baud rate as necessary
s = SolaxX3(port="/dev/ttyUSB0", baudrate=115200)
if s.connect():
s.read_all_registers()
available_stats = s.list_register_names()
for stat in available_stats:
print(stat)
battery_temperature = s.read("temperature_battery")
print(f"\n\nBattery temperature: {s.read('temperature_battery')}")
else:
print("Cannot connect to the Modbus Server/Slave")
exit()
Project Link: https://github.com/mkfam7/solaxx3
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
solaxx3-1.0.0.tar.gz
(14.1 kB
view hashes)
Built Distribution
solaxx3-1.0.0-py3-none-any.whl
(14.4 kB
view hashes)