sunspec / pysunspec2

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

der.common model no longer exists in versions 1.1.3 and 1.14 #92

Open lp-0 opened 3 months ago

lp-0 commented 3 months ago

Hello!

We have been having an issue with our Sunspec driver in the recent updates where the 'common' model no longer seems to exist.

Our code goes a bit like this: self.der = client.SunSpecModbusClientDeviceTCP(*init_args, **init_kwargs, timeout=timeout) self.der.scan() # Read manufacturer to make sure we are looking at right device manufacturer = self.der.common[0].Mn.value assert manufacturer == 'XXXXXXXXX'

In version 1.1.2, this code works fine. With the recent versions, we get this error: 'SunSpecModbusClientDeviceTCP' object has no attribute 'common'.

What is the work around for this? I'm not sure why the models don't appear in the latest versions.

Cheers!