Skip to main content

A small package to pull stats from a Renogy Solar Charge Controller

Project description

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

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

modbus_solar-1.0.4.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

modbus_solar-1.0.4-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file modbus_solar-1.0.4.tar.gz.

File metadata

  • Download URL: modbus_solar-1.0.4.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for modbus_solar-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d9ed4fbdccf00c6f5b673c581d23fa024bf939973bbe9c73b2542a15cf862d27
MD5 d352a29ec1ca8776841e7be45c6d0936
BLAKE2b-256 3b1b2ca3f83edaa1efc59103bc0a62dc27f41e9bab3460e79b5c8acfd2696206

See more details on using hashes here.

File details

Details for the file modbus_solar-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: modbus_solar-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for modbus_solar-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 67f3089cae1a720985804f98c6b7b40bac9a2f9ad8cdd7c6529552be0e1b24b6
MD5 ca7ed3e5671d2fc2faffda2db52df96e
BLAKE2b-256 6a20914913a29b7fb4ae340858239c5690f63dcdb07037f57b96a0b3fe38c96c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page