0.2.0
Storage limit switches are now declared fields, and the modbus-connection floor moves to 4.6.1.
Upgrade even if you don't write to storage
0.1.0 allowed modbus-connection>=4.1.0, and 4.4.0 through 4.5.1 read a repeating_group's instances in separate requests from the block holding their scale factors (#185). On Multiple MPPT (160) that tears each module's values away from the factors that scale them — and Fronius firmware bumps a shared factor as an acc32 counter approaches its ceiling rather than rolling over, so a bump landing mid-poll decodes later modules with a stale exponent.
This release requires 4.6.1 or newer, where the model is read in a single request again — one, where 4.3.0 needed two.
Packed bits for StorCtl_Mod
charge_limit_enabled and discharge_limit_enabled share one register. They were read by masking a bitfield16 by hand and written by replacing the whole register, which cleared any other bit the device keeps there. Both are ordinary fields now, and a write re-reads and merges:
charge_limit_enabled = bit(5, 0, writable=True)
discharge_limit_enabled = bit(5, 1, writable=True)Same names, same types, same meaning for callers. Only bits 0 and 1 are defined in SunSpec model 124, so the clobbering was latent rather than something you would have seen on a device — but the write no longer depends on nothing else living in that register.
Breaking
Storage.control_modeis gone. It existed only to be masked by the two switch properties. Readcharge_limit_enabled/discharge_limit_enabledinstead.modbus-connection>=4.6.1is required, up from>=4.1.0.
Requirements
Python 3.12+ and modbus-connection>=4.6.1,<5.