Skip to main content

Modbus Solar

pypi python built with nix

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

  1. 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)
    
  2. bash

    modbus-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)

Source distribution for modbus-solar 1.0.4
File Size Uploaded
modbus_solar-1.0.4.tar.gz 6.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for modbus-solar 1.0.4
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page