[RELEASE] Sigenergy Plant Driver (Local Modbus TCP)

[RELEASE] Sigenergy Plant Driver (Local Modbus TCP)

Reluctant to maintain an instance of Home Assistant to just access data for use in Rule Machine and dashboards, I'm pleased to share a local Hubitat driver for Sigenergy energy systems using Modbus TCP.
Note that this is used only to retrieve data and not undertake control of the system by writing to registers.

The driver communicates directly with the Sigenergy controller over your local network and does not require cloud services, Home Assistant, MQTT or third-party middleware.

Features

  • Local Modbus TCP communication

  • Native Hubitat driver

  • Numeric attributes for Rule Machine and Dashboards

  • Configurable polling interval

  • Individual measurement selection

  • Automatic socket reconnection

  • Multi-slave Modbus support

  • Poll statistics and communication diagnostics

  • Apache 2.0 licensed

Supported Measurements

  • Battery State of Charge

  • Grid Power

  • Plant Power

  • Solar Power

  • Battery Power

  • Third Party PV Power

  • Total Load Power

  • EMS Mode

  • Grid Status

  • Plant Running State

  • Battery State of Health

  • Battery Temperature

  • Daily Import / Export Energy

  • Battery Charge / Discharge Energy

  • Available Charge / Discharge Energy

Tested Configuration

This driver has been developed and tested with:

  • Hubitat Elevation

  • Sigenergy 5kw single phase Energy Controller / Gateway

  • Sigenergy Modbus Protocol V2.9

I am unable to offer support for other Sigenergy hardware and firmware versions, but those with better expertise in Groovy are welcome to use this as a starting point for further development!

Installation

  1. Download the driver from GitHub.

  2. Import or paste it into Drivers Code.

  3. Create a virtual device using Sigenergy Plant Driver.

  4. Configure the IP address, Modbus port and battery slave ID.

  5. Select the measurements you wish to monitor.

  6. Save Preferences.

Detailed installation and configuration guides are included in the repository.

GitHub

Repository:

https://github.com/Mclass294/hubitat-sigenergy

Documentation includes an installation and configuration guide

Known Limitations

  • Read-only driver (no Modbus write functions).

  • Requires Modbus TCP to be enabled on the Sigenergy system.

  • Only verified registers are currently implemented.

Future Plans

Possible future enhancements (by others!) include:

  • Additional registers

  • Support for additional Sigenergy hardware

  • Optional child devices

  • Energy dashboard examples

  • Hubitat Package Manager (HPM) support

Feedback

Bug reports, feature requests and testing feedback are very welcome, but, sorry, I am not in a position to provide technical support beyond that provided.

Few minor tweaks made today to suit my (single phase!) purpose. Have added documentation to allow users to add their own Sigenergy registers if required, and a more detailed description of the driver to allow further development for the brave!!

mclass

Just a quick update on further updates to the Sigenergy Hubitat driver.

The project has now been refactored to a Parent/Child architecture. The Parent Driver manages all Modbus TCP communications, while individual measurements are exposed as standard Hubitat child devices (Power, Battery and Measurement), making them much more useful with Hubitat Home, Dashboards and Rule Machine.

A fair amount of work has also gone into improving the code structure and documentation. The project now includes installation, configuration, troubleshooting and register reference guides, along with documentation for anyone wanting to add additional Modbus registers.

The updates have been posted to the Github repository:

Sigenergy Plant Driver

Thank you for creating this driver, it will be very handy.

I have created the driver and can get information from the energy controller.

I would like to create an automation when it goes off and then back on grid.

In Rule Machine, I add the power meter, Parent Driver Grid Power as a trigger but I'm not sure what to set the power level in the = comparison.

Could you please advise if you can, it would be greatly appreciated.

Hi Mark!

Thanks for your comments.

If you want to detect the on/off grid status, there’s attributes in the parent device that give direct information on plant status, including on/off grid, EMS status, battery temperature, etc. However, these are not enabled by default and must be selected in the Preference pane of the Plant Parent device.

If you are simply trying to detect if your system is on or off grid, in the Preferences pane of the Sigenergy Plant Parent device, activate “Grid Connection Status” (the plant measurements are arranged in alphbetical order!). Then in the Command pane press refresh and attributes:

On Off Grid Status 0
On Off Grid Status Text

should appear in the current states.

You can then create a “Custom attributes” trigger using either one of these attributes along the lines of:

Trust this assists!

Mclass

Hi Mclass
Thank you for the reply.
I didn’t know about the Custom attributes in Rule Machine.
I have it sorted out now, thank you again for your help and for providing this awesome driver

Brilliant effort. Thank you. This will do what I need without using Home Assistant

Thanks, Andrew.
I have pursued ridding myself of the HA instance since the Sigenergy went in. Mission accomplished!!