Closed IMMIhomeassistant closed 1 year ago
Have the same problem. Worked fine for a while, but now some commero-covers aren´t recognized. After restarting HA everything works perfect, after two days some random covers disappear. After restarting they are back again.
After restart I got following problem in the logs:
Logger: custom_components.selve.cover Source: custom_components/selve/cover.py:82 Integration: Selve NG (documentation, issues) First occurred: 09:10:29 (1 occurrences) Last logged: 09:10:29 Configured port not valid!
information: Home Assistant 2023.1.1 Supervisor 2022.12.1 Operating System 9.4 Frontend 20230104.0 - latest VM via Proxmox 13 Selve commeo cover
also happening:
Logger: custom_components.selve.cover Source: custom_components/selve/cover.py:168 Integration: Selve NG (documentation, issues) First occurred: 10:54:37 (1 occurrences) Last logged: 10:54:37
Syntax error!
Logger: homeassistant.components.cover Source: custom_components/selve/cover.py:168 Integration: Abdeckung (documentation, issues) First occurred: 10:54:38 (2 occurrences) Last logged: 10:54:38
Error adding entities for domain cover with platform selve Error while setting up selve platform for cover Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 438, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 545, in _async_add_entity device_info = entity.device_info File "/config/custom_components/selve/cover.py", line 168, in device_info fwV = self.controller.getGatewayFirmwareVersion() File "/usr/local/lib/python3.10/site-packages/selve/init.py", line 706, in getGatewayFirmwareVersion command = self.getVersionG() File "/usr/local/lib/python3.10/site-packages/selve/init.py", line 702, in getVersionG methodResponse = self.executeCommandSyncWithResponse(cmd) File "/usr/local/lib/python3.10/site-packages/selve/init.py", line 504, in executeCommandSyncWithResponse raise GatewayError selve.util.errors.GatewayError
Same here, only 4 of my 5 shutters are being recognized on boot:
Logger: homeassistant.components.cover Source: custom_components/selve/cover.py:168 Integration: Abdeckung (documentation, issues) First occurred: 13:35:10 (2 occurrences) Last logged: 13:35:10
Error adding entities for domain cover with platform selve
Error while setting up selve platform for cover
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 438, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 545, in _async_add_entity device_info = entity.device_info File "/config/custom_components/selve/cover.py", line 168, in device_info fwV = self.controller.getGatewayFirmwareVersion() File "/usr/local/lib/python3.10/site-packages/selve/init.py", line 706, in getGatewayFirmwareVersion command = self.getVersionG() File "/usr/local/lib/python3.10/site-packages/selve/init.py", line 702, in getVersionG methodResponse = self.executeCommandSyncWithResponse(cmd) File "/usr/local/lib/python3.10/site-packages/selve/init.py", line 504, in executeCommandSyncWithResponse raise GatewayError selve.util.errors.GatewayError
edit:
I also see a port error on start:
Logger: custom_components.selve.cover Source: custom_components/selve/cover.py:82 Integration: Selve NG (documentation, issues) First occurred: 13:35:09 (1 occurrences) Last logged: 13:35:09 Configured port not valid!
But it works for the found covers, so I assume its maybe a timing issue? (Port not available on startup or something?)
But it works for the found covers, so I assume its maybe a timing issue? (Port not available on startup or something?)
That was my first tought also, it feels like a bit to short time to read out the dongle, or so
I tested this further and for me a simple await asyncio.sleep(1)
added to line 78 in cover.py
fixed the problem. (import asyncio
added to the beginning of the file as well). It will still show the " Configured port not valid!" error but all covers are detected successfully.
So while this is most likely not a good solution I think it proves there is some timing issue going on. Maybe we need to await some initialization, e.g. in async_setup_platform()
?
I downgraded from v2.2.17 to v2.2.12 and now all covers are recognized/working for 3 weeks straight. Only get the port error on HA restart:
Logger: custom_components.selve.cover Source: custom_components/selve/cover.py:80 Integration: Selve NG (documentation, issues) First occurred: 08:17:02 (1 occurrences) Last logged: 08:17:02
Configured port not valid!
Use the latest HA-OS: Supervisor 2023.01.1 Operating System 9.5 Frontend 20230202.0 - latest
Hey everyone, Thats a rather abstract bug. The gateway (Selve Stick) is automatically detected and the integration waits for it to be in the state "READY". Though it sometimes doesn´t report the status correctly as it seems.
I meanwhile fixed the Configured port not valid error - hopefully though.
Can you do some more testing with the new version?
Best
hi, for now it looks ok no more errors alto, since the last update there werent any syntax anymore in v1.12 ik believe there was some phyton update in it to ???
for now, everything is back bij the old, tilt position still doesnt work for me, "the shutter doesnt support the service"
Updated to v2.3.0 from v2.2.12 and again I am missing some random covers.
Logger: custom_components.selve.cover Source: custom_components/selve/cover.py:163 Integration: Selve NG (documentation, issues) First occurred: 13:31:34 (1 occurrences) Last logged: 13:31:34
Syntax error!
Also tried a fresh reinstall of v2.3.0 and now I am not able to configurate the integration. It seems to be in a loop while trying to initialize Selve NG.
"Der Konfigurationsfluss konnte nicht geladen werden: Unknown error"
Tried multiple times to reinstall v2.3.0, couldn´t finish the configuration process. Only version v2.2.18 worked. Configuration process and text for the automated configuration process seem to be different. All covers reappeared and all automation routines worked flawless.
Home Assistant 2023.2.3 Supervisor 2023.01.1 Operating System 9.5 Frontend 20230202.0 - latest
after a few restarts i encounter the same problems with 2.3.0 again indeed
in first it al looks great, all worked, no syntax errors all shutters are find and working
so, for no i downgrade to 2.2.12 again
Can you guys try again? I think i fixed it (maybe)...
Kannix2005
first off all thank you for all the time and knowledge you put into this
after first update the syntax apear again after the second it was gone, except te 10sec warning from HA
i restarted about 10times to be sure, even restarted my HA-pc and the syntax is gone, kudos to you
but, the shutters close, start stop normal, only the status (e.g. 37% or close) isn't showing correct, its open100% all the time in my card (use dwains dashboard)
And i have 2 warnings left: Logger: homeassistant.components.cover Source: runner.py:179 Integration: Afdekkingen (documentation, issues) First occurred: 21:08:59 (1 occurrences) Last logged: 21:08:59
Setup of cover platform selve is taking over 10 seconds.
and: Logger: homeassistant.util.async Source: util/async.py:159 First occurred: 22:25:56 (38 occurrences) Last logged: 22:26:16
Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 62: selve = Selve(serial_port, False, logger = _LOGGER) Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 65: selve.discover() Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 115: self.controller.state = self.controller.gatewayState() Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 162: fwV = self.controller.getGatewayFirmwareVersion() Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 163: gId = self.controller.getGatewaySerial()
thank you for your support and your fixes. I updated to v2.3.1
Home Assistant 2023.3.3 Supervisor 2023.03.1 Operating System 9.5 Frontend 20230309.0 - latest
Covers are working atm, but I got also some more errors in the logs. Mostly the same, which IMMIhomeassistant posted:
Logger: custom_components.selve.cover Source: /usr/local/lib/python3.10/site-packages/selve/init.py:253 Integration: Selve NG (documentation, issues) First occurred: 06:30:09 (2 occurrences) Last logged: 06:30:09
Error in XML:
Logger: homeassistant.components.cover Source: runner.py:179 Integration: Abdeckung (documentation, issues) First occurred: 13. März 2023 um 22:37:31 (1 occurrences) Last logged: 13. März 2023 um 22:37:31
Setup of cover platform selve is taking over 10 seconds.
Logger: homeassistant.util.async Source: util/async.py:159 First occurred: 13. März 2023 um 22:37:13 (73 occurrences) Last logged: 13. März 2023 um 22:37:51
Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 62: selve = Selve(serial_port, False, logger = _LOGGER) Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 65: selve.discover() Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 115: self.controller.state = self.controller.gatewayState() Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 162: fwV = self.controller.getGatewayFirmwareVersion() Detected blocking call to sleep inside the event loop. This is causing stability issues. Please report issue to the custom integration author for selve doing blocking calls at custom_components/selve/cover.py, line 163: gId = self.controller.getGatewaySerial()
The Error in XML is normal, in that stage the integration tries to find the correct port of the Selve Stick. Maybe i will remove this warning in the future.
The others are caused by a delay in the code i had to add. The stick does not correctly send back data if accessed too fast. So unfortunately this has to stay like that :( Or maybe another programmer can resolve this, i´m out of ideas on this.
Best Stefan
Fixed
Describe the bug some covers, dont appear anymore after a restart, the ones that doesnt come back, is random
To Reproduce Steps to reproduce the behavior:
Expected behavior Restart all covers
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information): Home Assistant 2022.12.8 Supervisor 2022.11.2 Operating System 9.4 Frontend-versie: 20221213.1 - latest
Additional context i backupt my settings and migrated from raspberry pi4-4gb, to dell optiplex
tryed on the laptop with the selve program itself, and all covers are found and adjustable
also this error appear: Logger: homeassistant.components.cover Source: custom_components/selve/cover.py:168 Integration: Afdekkingen (documentation, issues) First occurred: 14:49:13 (2 occurrences) Last logged: 14:49:13
Error adding entities for domain cover with platform selve Error while setting up selve platform for cover Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 529, in _async_add_entity device_info = entity.device_info File "/config/custom_components/selve/cover.py", line 168, in device_info fwV = self.controller.getGatewayFirmwareVersion() File "/usr/local/lib/python3.10/site-packages/selve/init.py", line 706, in getGatewayFirmwareVersion command = self.getVersionG() File "/usr/local/lib/python3.10/site-packages/selve/init.py", line 702, in getVersionG methodResponse = self.executeCommandSyncWithResponse(cmd) File "/usr/local/lib/python3.10/site-packages/selve/init.py", line 504, in executeCommandSyncWithResponse raise GatewayError selve.util.errors.GatewayError