Skip to content

v0.5.0

Latest

Choose a tag to compare

@tronikos tronikos released this 04 Sep 00:42
· 2 commits to main since this release

Added

Beyond the existing async_get_energy_data, this release covers essentially every endpoint the SolarEdge monitoring web app uses for a residential site.

Site facts (cached until the next login): async_get_site_components, async_get_site_information, async_get_data_availability, async_get_site_details, async_get_site_equipment_summary, async_get_communication_status.

Energy: async_get_energy_totals, async_get_site_energy, async_get_site_energy_total, async_get_optimizer_energy, async_get_inverter_energy_totals, async_get_comparative_energy.

Production and consumption: async_get_consumption_data, async_get_storage_energy_distribution.

Power: async_get_live_power, async_get_site_power, async_get_inverter_power.

Per-device diagnostics: async_get_optimizer_data, async_get_inverter_data, async_get_optimizer_temperatures.

Everything else: async_get_weather, async_get_environmental_benefits, async_get_alerts.

New public data types: ConsumptionData, SiteEnergyData, SitePowerData, InverterPowerData, LivePower, OptimizerData, InverterData.

Notes on accuracy

async_get_energy_data is unchanged. It derives energy by summing hourly playback power, which approximates: measured against the API's own figures on a live site it runs about 1% high at site level, with a per-optimizer spread of roughly ±4% on a single day that narrows to ±2% of each optimizer's share when aggregated over a week.

The new measured-energy methods report what the API itself measured, with an explicit unit. async_get_optimizer_energy and async_get_energy_totals agree to the cent, and the site-level async_get_site_energy sum agrees with async_get_energy_totals to within 1 Wh over a day. Use those when a total is enough; async_get_energy_data remains the only source of an hourly per-optimizer series.

async_get_consumption_data needs a consumption meter. Without one (hasConsumptionAndGrid is false in async_get_site_components) consumption, grid import and grid export are None rather than zero.

Changed

  • Units and timestamps are documented once in the README and are consistent across the API: Wh for energy, W for power, °C for temperature. Timestamps are naive datetimes in the site's local time, whose IANA name is now available as siteTimeZone from async_get_site_information. The exception is last_measurement on OptimizerData and InverterData, which is an aware UTC datetime because those endpoints report a real UTC instant.
  • Per-resolution range limits. Each resolution has its own limit, measured against the live API, beyond which it answers HTTP 400. The library warns before making such a request rather than failing silently. The limits differ per endpoint and are listed in the method docstrings.
  • Inverter serials are collected in the layout's order instead of document order, because async_get_inverter_power identifies inverters only by their position in an array. A length mismatch there is reported rather than silently truncated.
  • The auth and CSRF header handling, previously duplicated per call site, moved into one helper.

Documented

  • Why playback is fetched as one multi-day request. The compact endpoint matches end-date against a real UTC instant while labelling slots in the site's local time, so the last day of any window is short on sites west of UTC. Measured on one: a day totals 40802 Wh as the last day of the window and 43207 Wh as an interior day. Splitting the range into one request per day makes every day a last day and loses 4–9% per day, so the docstring records this and warns against that change. Behaviour is unchanged; callers polling a rolling window already fill the gap in on the next refresh.
  • README rewritten with an example covering every public method, the conventions above, and the consumption-meter requirement.
  • The CLI (python -m solaredge_web) exercises the full API in one run: site capabilities, hourly consumption, measured vs playback-derived totals, today's site energy, live power, per-optimizer live readings alongside each optimizer's peak temperature, site information and inverter firmware.

Compatibility

No methods or types were removed or changed in signature. Everything from 0.4.0 keeps working, and async_get_energy_data returns the same values it did before.