No project description provided
Project description
renogymodbus
This package is intended to help you communicate with a Renogy charge controller. It has been tested with a Renogy Rover Elite but should work with other Renogy devices.
Features
- Read real time data
- Automatic retries
Connecting to the charge controller
Please check whether your charge controller has a rs232 or rs485 port.
rs485
Voucher code for 7% off Renogy: https://go.referralcandy.com/share/672HVC9
- rs485 to USB serial cable (UK) https://uk.renogy.com/rs485-to-usb-serial-cable/
- rs485 to USB serial cable (US) https://renogy.com/rs485-to-usb-serial-cable/
rs232
Unfortunately the rs232 to USB serial cable has been discontinued by Renogy. It is possible to make your own.
Installing the package
To install the package run
pip install renogymodbus
This package requires Python 3, depending on your setup you might have to instead run:
pip3 install renogymodbus
Command line utility
Note: the command line utility only currently works for Charge Controllers, not batteries. Battery support will be added soon.
To run the command line utility and see the debug output run the following on the command line:
renogymodbus --portname /dev/ttyUSB0 --slaveaddress 1
usage: renogymodbus [-h] [--portname PORTNAME] [--slaveaddress SLAVEADDRESS]
optional arguments:
-h, --help show this help message and exit
--portname PORTNAME Port name for example /dev/ttyUSB0
--slaveaddress SLAVEADDRESS
Slave address 1-247
Example output
Real Time Data
Solar voltage: 43.1V
Solar current: 0.09A
Solar power: 4W
Load voltage: 0.0V
Load current: 0.0A
Load power: 0W
Battery voltage: 13.9V
Battery state of charge: 100%
Battery temperature: -37°C
Controller temperature: 48°C
Maximum solar power today: 51W
Minimum solar power today: 0W
Maximum battery voltage today: 14.0V
Minimum battery voltage today: 13.1V
Python usage
To use the library within your Python code
Charge Controller
from renogymodbus import RenogyChargeController
controller = RenogyChargeController("/dev/ttyUSB0", 1)
controller.get_solar_voltage()
See https://github.com/rosswarren/renogymodbus/blob/main/renogymodbus/charge_controller.py for all available methods
Smart Battery
from renogymodbus import RenogySmartBattery
battery = RenogySmartBattery("/dev/ttyUSB0", 48)
battery.get_voltage()
See https://github.com/rosswarren/renogymodbus/blob/main/renogymodbus/smart_battery.py for all available methods
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for renogymodbus-0.0.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cedf830f791c72eeb29bc6853a93525b1d48fda62e0158375c9d300d8d0b750e |
|
MD5 | 8b521ddb49855717fbe05074394327c1 |
|
BLAKE2b-256 | 1c1bc75ec25bb748bee5a8a5456fc4f2b6ad4116035b4fe23cad5506b560dc69 |