wlcrs / huawei_solar

Home Assistant integration for Huawei Solar inverters via Modbus
GNU Affero General Public License v3.0
559 stars 89 forks source link

[Bug]: Integration stopped working - please correct #480

Closed mbuchber closed 1 year ago

mbuchber commented 1 year ago

Describe the issue

Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 178, in create await huawei_solar._initialize() File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 107, in _initialize self.time_zone = (await self.get(rn.TIME_ZONE)).value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 241, in get return (await self.get_multiple([name], slave))[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 278, in get_multiple decoder = BinaryPayloadDecoder.fromRegisters(response.registers, byteorder=Endian.BIG, wordorder=Endian.BIG) ^^^^^^^^^^ AttributeError: type object 'Endian' has no attribute 'BIG'

Bescribe your Huawei Solar Setup

Inverter Type: Inverter Firmware version: SDongle present: yes Power meter present: three phase Battery: None Battery Firmware version:

How do you connect to the inverter?

Via the SDongle, wired connection

Upload your Diagnostics File

Drag & Drop your Diagnostics File here.

Upload your relevant debug logs

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 178, in create
    await huawei_solar._initialize()
  File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 107, in _initialize
    self.time_zone = (await self.get(rn.TIME_ZONE)).value
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 241, in get
    return (await self.get_multiple([name], slave))[0]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 278, in get_multiple
    decoder = BinaryPayloadDecoder.fromRegisters(response.registers, byteorder=Endian.BIG, wordorder=Endian.BIG)
                                                                               ^^^^^^^^^^
AttributeError: type object 'Endian' has no attribute 'BIG'

Please confirm the following:

cpt-pirx commented 1 year ago

I have the same error

giovannigenua commented 1 year ago

Hi, same error

wlcrs commented 1 year ago

Duplicate of #470

TL;DR: upgrade to v1.2.7 of this integration.

mbuchber commented 1 year ago

Upgrade to v1.2.7 did not help - same bug still present. Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 178, in create await huawei_solar._initialize() File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 107, in _initialize self.time_zone = (await self.get(rn.TIME_ZONE)).value ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 241, in get return (await self.get_multiple([name], slave))[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/huawei_solar/huawei_solar.py", line 278, in get_multiple decoder = BinaryPayloadDecoder.fromRegisters(response.registers, byteorder=Endian.BIG, wordorder=Endian.BIG) ^^^^^^^^^^ AttributeError: type object 'Endian' has no attribute 'BIG'