ksheumaker / homeassistant-apsystems_ecur

Home Assistant custom component for local querying of APSystems ECU-R Solar System
Apache License 2.0
177 stars 43 forks source link

Unhandled exception: 'APSystemsECUR' object has no attribute 'socket_close' #65

Closed edgarvoorbraak closed 2 years ago

edgarvoorbraak commented 2 years ago

Hi I have a new installation with an ecu-b and a ds3-l attached. Note that there is only 1 of the 2 panels attached, so I am running with only 1 solarpanel. The ecu is running and i see values of the panel in the APS app.

I installed 1.2.11, upon entering the IP address i get the following error in the logging:

Unhandled exception: 'APSystemsECUR' object has no attribute 'socket_close' Traceback (most recent call last): File "/config/custom_components/apsystems_ecur/config_flow.py", line 45, in async_step_user test_query = await self.hass.async_add_executor_job(ap_ecu.query_ecu) File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/apsystems_ecur/APSystemsECUR.py", line 180, in query_ecu self.socket_close() AttributeError: 'APSystemsECUR' object has no attribute 'socket_close'

downgrading using 1.2.10 using the method mentioned in HA forum, does not have any influence on this error.

HAEdwin commented 2 years ago

Edgar, 1.2.11 does not have a file named APSystemsECUR.py anymore it has been renamed to APSystemsSocket.py. I suggest you remove the integration using:

  1. [Configuration]>[Devices & Services]
  2. [HACS]>[Integrations]
  3. Check if the folder /custom_components/apsystems_ecur is empty using File editor
  4. Reinstall by adding the integration using: [step 2]>[reboot] and [step 1]
  5. Apply fixes #62
  6. [reboot]
edgarvoorbraak commented 2 years ago

Hi HAEdwin,

Thanks, that helped! So most likely this was due to me not restarting HA after installing the integration from HACS.

Cheers.