W00D00 / home-assistant-elero

Elero Centero component
GNU General Public License v3.0
39 stars 10 forks source link

issues in log file with HA 2023.5.0 #42

Closed u20p17 closed 1 year ago

u20p17 commented 1 year ago

Hello, since updating to the latest HA version I see the following errors in the log (which I didn't had before):

Logger: custom_components.elero.cover
Source: custom_components/elero/cover.py:293
Integration: Elero ([documentation](https://github.com/W00D00/home-assistant-elero))
First occurred: 00:00:52 (3 occurrences)
Last logged: 00:00:52

Transmitter: 'AU00U9UZ' ch: '2' error response: 'blocking'.
Transmitter: 'AU00U9UZ' ch: '4' error response: 'blocking'.
Transmitter: 'AU00U9UZ' ch: '6' error response: 'blocking'.
Logger: custom_components.elero
Source: custom_components/elero/__init__.py:392
Integration: Elero ([documentation](https://github.com/W00D00/home-assistant-elero))
First occurred: 00:00:52 (8 occurrences)
Last logged: 00:00:52

The channel is not learned 'AU00U9UZ' on the transmitter: '12'.
The channel is not learned 'AU00U9UZ' on the transmitter: '13'.
The channel is not learned 'AU00U9UZ' on the transmitter: '14'.
The channel is not learned 'AU00U9UZ' on the transmitter: '15'.
The channel is not learned 'AU00U9UZ' on the transmitter: '16'.
Logger: homeassistant.helpers.entity
Source: custom_components/elero/__init__.py:540
Integration: Elero ([documentation](https://github.com/W00D00/home-assistant-elero))
First occurred: 00:08:34 (34 occurrences)
Last logged: 09:32:50

Update for cover.wohnzimmerfixverglasung fails
Update for cover.gaestezimmerfenster fails
Update for cover.schlafzimmer fails
Update for cover.wohnzimmerbalkontuer fails
Update for cover.buerobalkontuer fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update
    await coro
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/elero/cover.py", line 257, in update
    self._transmitter.info(self._channel)
  File "/config/custom_components/elero/__init__.py", line 347, in info
    self.__process_command(
  File "/config/custom_components/elero/__init__.py", line 485, in __process_command
    resp = self.__parse_response(ser_resp, channel)
  File "/config/custom_components/elero/__init__.py", line 540, in __parse_response
    response["command"] = ser_resp[2]
IndexError: index out of range
Logger: custom_components.elero.cover
Source: custom_components/elero/cover.py:257
Integration: Elero ([documentation](https://github.com/W00D00/home-assistant-elero))
First occurred: 00:00:46 (574 occurrences)
Last logged: 10:34:05

Transmitter: 'AU00U9UZ' ch: '6' unhandled response: 'unknown response'.
Transmitter: 'AU00U9UZ' ch: '7' unhandled response: 'unknown response'.
Transmitter: 'AU00U9UZ' ch: '1' unhandled response: 'unknown response'.
Transmitter: 'AU00U9UZ' ch: '2' unhandled response: 'unknown response'.
Transmitter: 'AU00U9UZ' ch: '1' unhandled response: 'None'.

Anybody else? @W00D00 : How can we fix the issues?

Thanks!

W00D00 commented 1 year ago

Hi @u20p17

please help us to understand this issue and share your environment where the HA and the Elero stick run.

Thanks,

u20p17 commented 1 year ago

Hi @W00D00, I am running UnRaid on an Intel Nuc, where HomeAssistant OS is running in a VM. Up to HA2023.4.x everything was working flawlessly, since HA2023.5.x I get lot of errors (listed above) in the log and sometimes the roller shutters are working, sometimes not ( e.g. i have an automation to open the rollershutters in the morning --> since 2023.5.x some open in the morning, some not... (which is not opening is random, so not everytime the same roller shutter...)

If you need more infos don't hesitate to ask! Thanks for your commitment!

BR

EDIT: What I forgot to say: The Elero stick is connected to the Intel Nuc and passed-through to the HA VM...

MatzeAb commented 1 year ago

Hi, I have the same problem since 2023.5. I'm running HA on a Nuc with Proxmox on a VM. Here some examples:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: homeassistant.helpers.entity Source: custom_components/elero/init.py:542 Integration: Elero (documentation) First occurred: 19:00:17 (1 occurrences) Last logged: 19:00:17

Update for cover.terrassenbeleuchtung_dach fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 554, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 784, in async_device_update await coro File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/elero/cover.py", line 257, in update self._transmitter.info(self._channel) File "/config/custom_components/elero/init.py", line 347, in info self.process_command( File "/config/custom_components/elero/init.py", line 485, in process_command resp = self.__parse_response(ser_resp, channel) File "/config/custom_components/elero/init.py", line 542, in parse_response response["ch_l"] = self.get_lower_channel_bits(ser_resp[4]) IndexError: index out of range

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.elero Source: custom_components/elero/init.py:347 Integration: Elero (documentation) First occurred: 19:00:15 (4 occurrences) Last logged: 19:00:15

The channel is not learned 'A506Q9S7' on the transmitter: '4'. The channel is not learned 'A506Q9S7' on the transmitter: '6'. The channel is not learned 'A506Q9S7' on the transmitter: '8'. The channel is not learned 'A506Q9S7' on the transmitter: '10'.

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.elero.cover Source: custom_components/elero/cover.py:257 Integration: Elero (documentation) First occurred: 19:00:15 (1 occurrences) Last logged: 19:00:15

Transmitter: 'A506Q9S7' ch: '2' error response: 'blocking'.

chrfritsch commented 1 year ago

I can confirm that I also have that issue on HA 2023.5.2

System Information

version core-2023.5.2
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.10.11
os_name Linux
os_version 6.1.21-v8
arch aarch64
timezone Europe/Berlin
config_dir /config
Home Assistant Supervisor host_os | Home Assistant OS 10.1 -- | -- update_channel | stable supervisor_version | supervisor-2023.04.1 agent_version | 1.5.1 docker_version | 23.0.3 disk_total | 57.8 GB disk_used | 7.3 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Home Assistant Google Drive Backup (0.110.4), Terminal & SSH (9.7.0), Matter Server (4.3.1), RaspberryMatic CCU (3.69.7.20230506), Studio Code Server (5.5.7), Node-RED (14.1.5)
matrixx567 commented 1 year ago

It seems that with HA2023.5 there will be some issues with the SyncWorker threads. It should easily be fixed by adding a threading lock around the serial communication of a single command (write & read). I've already created a pull request #43 for this issue.