Closed Csepp closed 1 year ago
Have you tried updating the plugin to the latest version? I do think I have already fixed this issue. https://github.com/derenback/Domoticz-SMA-Inverter/commit/3a75a27e0190c2c05de2fdbee08248701b958342
What version of the pymodbus do you use?
Check with
pip3 list | grep pymodbus
There is a breaking change in version v3.5.0.
The breaking change can be seen here: https://github.com/pymodbus-dev/pymodbus/commit/b1b560ab1e0b7482316f72e3e73110de802d904c
Dear David,
Thank you very much for your fast answer and time. I used the latest version.
Pymodbus: 3.5.4
Pyhton: 3.9.2
Domoticz: 2022.1
SMA Plugin: 0.9.8
Do you have any idea on how I could fix this?
Peter
Von: David Derenbäck @.> Gesendet: Samstag, 28. Oktober 2023 15:27 An: derenback/Domoticz-SMA-Inverter @.> Cc: Csepp @.>; Author @.> Betreff: Re: [derenback/Domoticz-SMA-Inverter] ile "/usr/lib/python3.9/enum.py", line 405, in getattr raise AttributeError(name) from None (Issue #26)
Have you tried updating the plugin to the latest version? I do think I have already fixed this issue. https://github.com/derenback/Domoticz-SMA-Inverter/commit/3a75a27e0190c2c05de2fdbee08248701b958342 3a75a27
What version of the pymodbus do you use?
Check with pip3 list | grep pymodbus
There is a breaking change in version v3.5.0.
— Reply to this email directly, view it on GitHub https://github.com/derenback/Domoticz-SMA-Inverter/issues/26#issuecomment-1783809842 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AMEBHFWNPZQYDNLTSETWI3TYBUBZPAVCNFSM6AAAAAA6S5WNLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTHAYDSOBUGI . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AMEBHFX44YTFEXRKFKELO73YBUBZPA5CNFSM6AAAAAA6S5WNLWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTKKLDTE.gif Message ID: @. @.> >
Oh, now I understand. Sorry for not noticing this before. I forgot to also update the test script... I have updated that in the latest version but not tagged it yet. The plugin itself should work fine on version 0.9.8 in Domoticz.
Fix in test script now in 0.9.9. (Bumped the version even thou it was no change in the actual plugin)
Thank you indeed for the fast reply and fix. Great.
Dear Derenback,
since I updated my Raspberry to the latest Version I have issues with the plugin. As my SD Card crashed I installed everthing new. But the Plugin don't work anymore. During the installation I did not get any error meassage. Do you have an idea? Appriciate your help. Peter
pi@raspberrypi:~/domoticz/plugins $ python /home/pi/domoticz/plugins/Domoticz-SMA-Inverter/test/sma_test.py Connecting to IP: 192.168.3.125 Port: 502 Unit id: 3
Traceback (most recent call last): File "/home/pi/domoticz/plugins/Domoticz-SMA-Inverter/test/sma_test.py", line 18, in
def get_modbus_value(modbus_id, print_str, unit="", divider=1, data_len=2, byteorder=Endian.Big, wordorder=Endian.Big):
File "/usr/lib/python3.9/enum.py", line 405, in getattr
raise AttributeError(name) from None
AttributeError: Big