Skip to content

SunSpec ​

This extension adds support for the SunSpec protocol.

SunSpec is a format for inverters and smart meters to communicate over the Modbus protocol. It defines how common parameters like AC/DC voltage and current, lifetime produced energy, device temperature etc can be read from the device.

SunSpec is supported by several manufacturers like ABB, Fronius, LG, SMA, SolarEdge, Schneider Electric. For a list of certified products see this page: https://sunspec.org/product-certification-registry/

Supported Things ​

This bundle adds the following Thing types to the Modbus binding. Note, that the things will show up under the Modbus binding.

ThingDescription
inverter-single-phaseFor simple, single phase inverters
inverter-split-phaseSplit phase inverters (Japanese grid and 240V grid in North America)
inverter-three-phaseThree phase inverters
meter-single-phaseSingle phase meters (AN or AB)
meter-split-phaseSplit single phase meters (ABN)
meter-wye-phaseWye connected three phase meters (ABCN)
meter-delta-phaseDelta connected three phase meters (ABC)

Auto Discovery ​

This extension fully supports modbus auto discovery. It automatically detects the register addresses for each model.

Auto discovery is turned off by default in the modbus binding so you have to enable it manually.

You can set the enableDiscovery=true parameter in your bridge.

A typical bridge configuration would look like this:

dsl
Bridge modbus:tcp:modbusBridgeName [ host="10.0.0.2", port=502, id=1, enableDiscovery=true ]

Thing Configuration ​

You need first to set up either a TCP or a Serial Modbus bridge according to the Modbus documentation. Things in this extension will use the selected bridge to connect to the device.

For defining a Thing textually, you have to find out the start address of the model block and the length of it. While the length is usually fixed, the address is not. Please refer to your device's vendor documentation how model blocks are laid for your equipment.

The following parameters are valid for all Thing types:

ParameterTypeRequiredDefault if omittedDescription
addressintegeryesN/AStart address of the model block.
lengthintegeryesN/ALength of the model block. Setting this too short could cause problems during parsing
refreshintegerno5Poll interval in seconds. Increase this if you encounter connection errors
maxTriesintegerno3Number of retries when before giving up reading from this Thing.

Channels ​

Channels are grouped into channel groups. Different things support a subset of the following groups.

Device Information Group (deviceInformation) ​

This group contains general operational information about the device.

Channel IDItem TypeDescription
cabinet-temperatureNumber:TemperatureTemperature of the cabinet if supported in Celsius
heatsink-temperatureNumber:TemperatureDevice heat sink temperature in Celsius
transformer-temperatureNumber:TemperatureTemperature of the transformer in Celsius
other-temperatureNumber:TemperatureAny other temperature reading not covered by the above items if available. Celsius
statusStringDevice status:
  • OFF=Off
  • SLEEP=Sleeping/night mode
  • STARTING=Grid Monitoring/wake-up
  • ON=On - producing power (also called MPPT by Specification)
  • <li>THROTTLED=Production (curtailed)<li>SHUTTING_DOWN=Shutting down<li>FAULT=Fault<li> STANDBY=Standby/Maintenance/Setup
status-vendorNumberVendor Specific Status Code

Supported by: all inverter things

AC Summary Group (acGeneral) ​

Inverters ​

This group contains summarized values for the AC side of the inverter. Even if the inverter supports multiple phases this group will appear only once.

Channel IDItem TypeDescription
ac-total-currentNumber:ElectricCurrentTotal AC current over all phases in Amperes
ac-powerNumber:PowerActual AC power over all phases in Watts
ac-frequencyNumber:FrequencyActual grid frequency
ac-apparent-powerNumber:PowerActual AC apparent power
ac-reactive-powerNumber:PowerActual AC reactive power
ac-power-factorNumber:DimensionlessActual AC power factor (%)
ac-lifetime-energyNumber:EnergyAC lifetime energy production for this device in WattHours

Supported by: all inverter things

Meters ​

This group contains summarized values for the power meter over all phases.

Channel IDItem TypeDescription
ac-total-currentNumber:ElectricCurrentTotal AC current over all phases in Amperes
ac-average-voltage-to-nNumber:ElectricPotentialAverage Line to Neutral AC Voltage over all phases
ac-average-voltage-to-nextNumber:ElectricPotentialAverage Line to Line AC Voltage over all phases
ac-frequencyNumber:FrequencyActual grid frequency
ac-total-real-powerNumber:PowerTotal Real Power over all phases(W)
ac-total-apparent-powerNumber:PowerTotal Apparent Power over all phases (W)
ac-total-reactive-powerNumber:PowerTotal Reactive Power over all phases (W)
ac-average-power-factorNumber:DimensionlessAverage AC Power Factor over all phases (%)
ac-total-exported-real-energyNumber:EnergyTotal Real Energy Exported over all phases (Wh)
ac-total-imported-real-energyNumber:EnergyTotal Real Energy Imported over all phases (Wh)
ac-total-exported-apparent-energyNumber:EnergyTotal Apparent Energy Exported over all phases (VAh)
ac-total-imported-apparent-energyNumber:EnergyTotal Apparent Energy Imported over all phases (VAh)
ac-total-imported-reactive-energy-q1Number:EnergyTotal Reactive Energy Imported Quadrant 1 over all phases (VARh)
ac-total-imported-reactive-energy-q2Number:EnergyTotal Reactive Energy Imported Quadrant 2 over all phases (VARh)
ac-total-exported-reactive-energy-q3Number:EnergyTotal Reactive Energy Exported Quadrant 3 over all phases (VARh)
ac-total-exported-reactive-energy-q4Number:EnergyTotal Reactive Energy Exported Quadrant 4 over all phases (VARh)

Supported by: all meter things

AC Phase Specific Group ​

Inverters ​

This group describes values for a single phase of the inverter. There can be a maximum of three of this group named:

acPhaseA: available for all inverter types

acPhaseB: available for inverter-slit-phase and inverter-three-phase type inverters

acPhaseC: available only for inverter-three-phase type inverters.

Channel IDItem TypeDescription
ac-phase-currentNumber:ElectricCurrentActual current over this phase in Ampere
ac-voltage-to-nextNumber:ElectricPotentialVoltage of this phase relative to the next phase, or to the ground in case of single phase inverter. Note: some single phase SolarEdge inverters incorrectly use this value to report the voltage to neutral value
ac-voltage-to-nNumber:ElectricPotentialVoltage of this phase relative to the ground

Supported by: all inverter things

Meters ​

This group holds values for a given line of the meter. There can be a maximum of three of this group named:

acPhaseA: available for all meter types

acPhaseB: available for meter-split-phase, meter-wye-phase and meter-delta-phase meters

acPhaseC: available only for meter-wye-phase and meter-delta-phase meters type inverters.

Channel IDItem TypeDescription
ac-phase-currentNumber:ElectricCurrentActual current over this line in Watts
ac-voltage-to-nNumber:ElectricPotentialVoltage of this line relative to the neutral line
ac-voltage-to-nextNumber:ElectricPotentialVoltage of this line relative to the next line
ac-real-powerNumber:PowerAC Real Power value (W)
ac-apparent-powerNumber:PowerAC Apparent Power value (VA)
ac-reactive-powerNumber:PowerAC Reactive Power value (VAR)
ac-power-factorNumber:DimensionlessAC Power Factor (%)
ac-exported-real-energyNumber:EnergyReal Energy Exported (Wh
ac-imported-real-energyNumber:EnergyReal Energy Imported (Wh)
ac-exported-apparent-energyNumber:EnergyApparent Energy Exported (VAh)
ac-imported-apparent-energyNumber:EnergyApparent Energy Imported (VAh)
ac-imported-reactive-energy-q1Number:EnergyReactive Energy Imported Quadrant 1 (VARh)
ac-imported-reactive-energy-q2Number:EnergyReactive Energy Imported Quadrant 2 (VARh)
ac-exported-reactive-energy-q3Number:EnergyReactive Energy Exported Quadrant 3 (VARh)
ac-exported-reactive-energy-q4Number:EnergyReactive Energy Exported Quadrant 4 (VARh)

Supported by: all meter things

DC General Group ​

This group contains summarized data for the DC side of the inverter. DC information is summarized even if the inverter has multiple strings.

Channel IDItem TypeDescription
dc-currentNumber:ElectricCurrentActual DC current in Amperes
dc-voltageNumber:ElectricPotentialActual DC voltage
dc-powerNumber:PowerActual DC power produced

Supported by: all inverter things

Full Example ​

Thing Configuration ​

dsl
Bridge modbus:tcp:modbusBridgeName [ host="hostname|ip", port=502, id=1, enableDiscovery=true ]
Thing modbus:inverter-single-phase:bridge:myInverter "SE4000h" (modbus:tcp:modbusBridgeName) [ address=40069, length=52, refresh=15 ]

Note: Make sure that refresh, port and id values are numerical, without quotes.

Item Configuration ​

dsl
Number Inverter_Temperature "Temperature [%.1f C]"  {channel="modbus:inverter-single-phase:bridge:se4000h:deviceInformation#heatsink-temperature"}

Number Inverter_AC_Power "AC Power [%d W]" {channel="modbus:inverter-single-phase:bridge:se4000h:acGeneral#ac-power"}

Number Inverter_AC1_A "AC Current Phase 1 [%0.2f A]" {channel="modbus:inverter-single-phase:bridge:se4000h:acPhaseA#ac-phase-current"}

Sitemap Configuration ​

dsl
Text item=Inverter_Temperature
Text item=Inverter_AC_Current
Text item=Inverter_AC_Power
Chart item=Inverter_Temperature period=D refresh=600000
Chart item=Inverter_AC_Power period=D refresh=30000

Vendor Specific Information ​

SolarEdge ​

Newer models of SolarEdge inverters can be monitored over TCP, but you need to enable support in the inverter first. Refer to the "Modbus over TCP Configuration" chapter in this documentation: https://www.solaredge.com/sites/default/files/sunspec-implementation-technical-note.pdf

Modbus connection is limited to a single client at a time, so make sure no other clients are using the port.