# Inverter data

Individual inverter data, available for all Envoy models as of firmware 3.9, class `EnvoyInverter`.

    for sn, inv in data.inverters.items():
        print(f'{sn} sn: {inv.serial_number}')
        print(f'{sn} watts: {inv.last_report_watts}')
        print(f'{sn} max watts: {inv.max_report_watts}')
        print(f'{sn} last report: {inv.last_report_date}')
        print(f'{sn} panel output: {inv.dc_voltage}V @ {inv.dc_current}A')
        print(f'{sn} output: {inv.ac_voltage}V @ {inv.ac_current}A {inv.ac_frequency}Hz')
        print(f'{sn} temperature: {inv.temperature}°C')
        print(f'{sn} energy produced: {inv.energy_produced} Wh')
        print(f'{sn} energy produced today: {inv.energy_today} Wh')
        print(f'{sn} lifetime energy produced: {inv.lifetime_energy} Wh')

Note

If the `/ivp/pdm/device_data` endpoint is not supported by the Envoy firmware, each `EnvoyInverter` will have `None` for the detailed attributes: `dc_voltage`, `dc_current`, `ac_voltage`, `ac_current`, `ac_frequency`, `temperature`, `energy_produced`, `energy_today`, and `lifetime_energy`.

## Data sources

The data is provided by one of the updaters below, ordered in their probe sequence.

The base data set is identified by the `pyenphase.const.SupportedFeatures` flag `INVERTERS` and `DETAILED_INVERTERS` for inverter details. First updater probe that returns the `INVERTERS` feature flag will be used.

### `EnvoyDeviceDataInvertersUpdater`

This is the default updater for inverter data. It provides data for individual inverter production data as well as inverter device details. Data is measured/calculated by the Envoy.

endpoint | `/ivp/pdm/device_data` |
json path | `[?(@.devName=='pcu')]` |
data | json node | uom
`serial_number` | `sn` |
`last_report_date` | `channels[0].lastReading.endDate` |
`last_report_watts` | `channels[0].watts.now` | W
`max_report_watts` | `channels[0].watts.max` | W
`dc_voltage` | `channels[0].lastReading.dcVoltageINmV` | V
`dc_current` | `channels[0].lastReading.dcCurrentINmA` | A
`ac_voltage` | `channels[0].lastReading.acVoltageINmV` | V
`ac_current` | `channels[0].lastReading.acCurrentInmA` | A
`ac_frequency` | `channels[0].lastReading.acFrequencyINmHz` | Hz
`temperature` | `channels[0].lastReading.channelTemp` | °C
`lifetime_energy` | `channels[0].lifetime.joulesProduced/3600` | Wh
`energy_produced` | `channels[0].lastReading.joulesProduced/duration/3.6` | Wh
`energy_today` | `channels[0].wattHours.today` | Wh
`last_report_duration` | `channels[0].lastReading.duration` | s

Note

Raw fields for dc/ac voltage/current/frequency are provided in milli‑units (mV, mA, mHz) by the endpoint and are converted to V/A/Hz by the model.

### `EnvoyApiV1ProductionInvertersUpdater`

This is the updater for base inverter data. It only provides data for individual inverter production data. Data is measured/calculated by the Envoy.

endpoint | `/api/v1/production/inverters` |
json path | `$` |
data | json node | uom
`serial_number` | `serialNumber` |
`last_report_date` | `lastReportDate` |
`last_report_watts` | `lastReportWatts` | W
`max_report_watts` | `maxReportWatts` | W
`dc_voltage` | not available |
`dc_current` | not available |
`ac_voltage` | not available |
`ac_current` | not available |
`ac_frequency` | not available |
`temperature` | not available |
`lifetime_energy` | not available |
`energy_produced` | not available |
`energy_today` | not available |
`last_report_duration` | not available |