Modbus Solar
Intro
This project is to pull stats out of a Renogy DCC50S solar charge controller.
The connection will be made via Modbus/RS485.
The end state will be to output stats in json format ready to be ingested into something like an InfluxDb instance or to publish to a MQTT Topic.
Pre-Reqs
You require a Modbus/RS485 connector, most probably will be a USB varient. Most applications will be using a small IoT device or Raspberry Pi to serve the USB device and then connect back to a logging system of some sort.
The Modbus parameters are hard coded but variabalised for the device ID and the salve address which could change.
Using
To install
pip install modbus-solar
To Use
-
python#!/usr/bin/env python from modbus_solar import get_all import json # json.dumps() ensures you can parse through jq stats = json.dumps(get_all()) print(stats)
-
bashmodbus-solar --help modbus-solar
Releases
My aim is to keep to semver versioning
The pipeline will push to PyPi so this should be the main way of getting the recent packages. But the pipeline will also create releases in Gitlab for versions that are tagged
Development
My development has taken place using NixOS, I've included the shell.nix for anyone that requires it.
However the build pipeline is performed using the basic python:3.11 image from Gitlab.
To build run the following:
python -m build --sdist --wheel
Metadata
Release files for modbus-solar 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| modbus_solar-1.0.4.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| modbus_solar-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.1 kB
Release files / modbus_solar-1.0.4.tar.gz
| Download URL | modbus_solar-1.0.4.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9ed4fbdccf00c6f5b673c581d23fa024bf939973bbe9c73b2542a15cf862d27
|
|
BLAKE2b-256 checksum How to use checksums |
3b1b2ca3f83edaa1efc59103bc0a62dc27f41e9bab3460e79b5c8acfd2696206
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / modbus_solar-1.0.4-py3-none-any.whl
| Download URL | modbus_solar-1.0.4-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67f3089cae1a720985804f98c6b7b40bac9a2f9ad8cdd7c6529552be0e1b24b6
|
|
BLAKE2b-256 checksum How to use checksums |
6a20914913a29b7fb4ae340858239c5690f63dcdb07037f57b96a0b3fe38c96c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|