sunspec / pysunspec2

SunSpec Python library for interfacing with SunSpec devices.
Apache License 2.0
57 stars 21 forks source link

aggregated devices could not be handled #61

Open tobima opened 2 years ago

tobima commented 2 years ago

The SunSpec definition for Common Models says: Device aggregations. A map may contain multiple Common Blocks. Each Common Block marks the start of a new device. This is useful when a map represents an aggregation of devices.

Solaredge does use this feature. In one map they aggregate one inverter and up to 3 ac meters. The inverter and all meters have their seperated common model block. With the current implementation of pysunspec2 the relationship between the common model and the according ac meter model gets lost. Current wrong behavior: A scan with such a setup generates one device with 1 to 4 items for common in the model list and 0 to 3 ac_meter items and some more for the inverter. Expected behavior: scan should generate 1 to 4 devices; one for the inverter and up to 3 for the ac_meters