Growatt SPH (hybrid storage)
Status: Vendor Confirmed · Register points: 396 · Transports: Modbus RTU, Modbus TCP
A curated ModDef profile for the Growatt SPH (hybrid storage). Import it as
growatt.sph or load the .moddef.yaml directly.
Usage
Load the profile, bind a transport, and read a point by name. The runtime applies the offset, scaling, byte order, and sentinels from the definition.
- Go
- TypeScript
- Rust
- Python
- C
- C++
doc, _ := moddef.Load("growatt-sph.moddef.yaml")
dev, _ := client.New(doc, "growatt-sph", transport) // your modbus.Transport
v, _ := dev.ReadPoint(ctx, "rated_pv_voltage")
fmt.Println(v)
import {Device} from '@moddef/core';
import {loadDocument} from '@moddef/core/node';
const doc = await loadDocument('growatt-sph.moddef.yaml');
const dev = Device.create(doc, 'growatt-sph', transport);
console.log(await dev.readPoint('rated_pv_voltage'));
let doc = moddef_core::load("growatt-sph.moddef.yaml")?;
let mut dev = Device::new(&doc, Some("growatt-sph"), transport)?;
let v = dev.read_point("rated_pv_voltage").await?;
from moddef import Device, load
from moddef.pymodbus import Options, PymodbusTransport
doc = load("growatt-sph.moddef.yaml")
transport = await PymodbusTransport.tcp("192.168.1.50", options=Options())
dev = Device.create(doc, "growatt-sph", transport)
print(await dev.read_point("rated_pv_voltage"))
md_doc_t doc;
md_doc_init(&doc, flash_ptr, flash_len); /* zero-copy view */
md_dev_t dev;
md_dev_init(&dev, &doc, MD_STR("growatt-sph"), &transport);
md_value_t v;
md_dev_read(&dev, MD_STR("rated_pv_voltage"), &v);
auto doc = moddef::Document::view(flash_bytes).value(); // zero-copy over flash
auto dev = moddef::Device::open(doc, "growatt-sph", transport).value();
if (auto v = dev->read("rated_pv_voltage"); v)
std::cout << v->to_string() << '\n';
Measurands
The 22 semantic quantities this device reports, each linked to the measurand catalog. Query a device by measurand instead of a raw point when you want portable code.
| Base quantity | Name | Unit | Description |
|---|---|---|---|
inverter_status | Inverter Status | undefined | Inverter operating state (enum) |
pv_power | PV Power | W | PV array / string power |
pv_voltage | PV Voltage | V | PV array / string voltage |
pv_current | PV Current | A | PV array / string current |
active_power | Active Power | W | Instantaneous real power |
apparent_power | Apparent Power | VA | Instantaneous apparent power |
reactive_power | Reactive Power | var | Instantaneous reactive power |
power_factor | Power Factor | 1 (ratio) | Ratio of real to apparent power (dimensionless) |
frequency | Frequency | Hz | Grid frequency |
voltage | Voltage | V | RMS voltage; qualify with phase_ref (L1_N, L1_L2, ...) |
current | Current | A | RMS current; qualify with phase_ref / direction |
dc_bus_voltage | DC Bus Voltage | V | Internal DC bus voltage |
energy_active | Active Energy | Wh | Cumulative active energy register |
inverter_temperature | Inverter Temperature | degC | Inverter internal temperature |
device_status | Device Status | undefined | Overall device operating status (enum) |
battery_power | Battery Power | W | Battery power (sign per direction) |
battery_voltage | Battery Voltage | V | Battery terminal voltage |
state_of_charge | State of Charge | % | Battery charge level |
state_of_health | State of Health | % | Battery health |
temperature | Temperature | degC | Temperature; qualify with location (INTERNAL, EXTERNAL, ...) |
fault_code | Fault Code | undefined | Vendor fault code (enum or integer) |
warning_code | Warning Code | undefined | Vendor warning code (enum or integer) |
Source
- Profile:
solar-inverter/growatt-sph/growatt-sph.moddef.yaml - Register map: vendor documentation