A small package to pull stats from a Renogy Solar Charge Controller
Project description
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file modbus_solar-1.0.3.tar.gz.
File metadata
- Download URL: modbus_solar-1.0.3.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16a716bd6eed176143157cda9c5a76dc3f2b77beb45d29d15039ad9c2c80316f
|
|
| MD5 |
abc652c5ebcf59c9f7a1d2c79d0369da
|
|
| BLAKE2b-256 |
d116ae24c52aad82481a00b0c28436e6bf2af68f15b00be0d1c5528fd2780606
|
File details
Details for the file modbus_solar-1.0.3-py3-none-any.whl.
File metadata
- Download URL: modbus_solar-1.0.3-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a24217f13f6ac9d1ddca483537ccf4db9e24473ea6c62b3e428c7f25eb4d77c6
|
|
| MD5 |
747bfb7cdbac8aeaa4f52b5da79225f5
|
|
| BLAKE2b-256 |
fd9b365a663a76f4bac00be05d8b5edc4508a0daa7e5201dc4f30ba38bb16ee0
|