asantaga / lightwaverf_HA_EnergySensor

Home Assistant Sensor for the LightwaveRF energy monitor
MIT License
5 stars 3 forks source link

Integration stops after update HA to 2023.6.1 #15

Open anthonywalker75 opened 1 year ago

anthonywalker75 commented 1 year ago

Hello

I recently upgraded my HA to 2023.6.1 and the energy monitor integration seems to have stopped working.

Log entry below:

This error originated from a custom integration.

Logger: homeassistant.helpers.entity Source: custom_components/lightwaverf_energy/sensor.py:55 Integration: Lightwave Energy Monitor First occurred: 00:37:13 (58 occurrences) Last logged: 00:51:13

Update for sensor.electricity_current_usage_w fails Update for sensor.electricity_energy_today_usage_kwh fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 559, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 786, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/lightwaverf_energy/sensor.py", line 55, in update sock.bind(("0.0.0.0", 9761)) OSError: [Errno 98] Address in use

It was working prior to the upgrade. Any ideas?

Anthony

asantaga commented 1 year ago

mmm Ive seen this before and then it just disappeared. Im away from home but i'll be upgrading mine early nextweek, maybe the latest version of HA has broken it.. :-(

smeg1 commented 12 months ago

Same here

Ashk0812 commented 7 months ago

Is this still a thing? mines not updating at all

asantaga commented 7 months ago

Sorry, Ive been busy at work and renovating the house. I will look at it asap.

But im not sure whats going on here.. ..

Ashk0812 commented 7 months ago

I did restore my HA to a earlier version 5.4 and it started to work again so it is something related to the update

asantaga commented 7 months ago

Sigh.... i think its to do with the networking... threading

asantaga commented 7 months ago

ok, Ive done some debugging, and yes, its because the network model has chnaged since i wrote this.

I need to reimplement it as a async call....

I'll try and do this asap