kevinvincent / ha-wyzesense

A Home Assistant Component to interface with the WYZE Sense hub and sensor system
368 stars 97 forks source link

Breaking Changes with HA update near 2024.1.3 #233

Open User873902 opened 4 months ago

User873902 commented 4 months ago

Has anyone identified any breaking changes with updates on or after 2024.1.3? I am currently using 2024.2.3 and the WyzeSense integration appears to not be loading - the services are not available.

Will post any debug clues I find.

Last known working version: 2023.12

stanwebber commented 4 months ago

i'm on 2024.2.4 and can confirm the integration is working; however, i do have a large gap in my activity log starting around jan 17th so it appears to have been offline until just recently.

User873902 commented 4 months ago

i'm on 2024.2.4 and can confirm the integration is working; however, i do have a large gap in my activity log starting around jan 17th so it appears to have been offline until just recently.

Interesting! I just updated to 2024.2.4 to see if it is fixed. I still have the gap continuing from 1/17/24 onward. I am unable to use the services, "wyzesense.scan" and "wyzesense.remove."

Furthermore, the historic devices report their state as unavailable. I see the warning, "This entity is no longer being provided by the wyzesense integration. If the entity is no longer in use, delete it in settings."

I have the same previously working integration configuration in my config yaml file. The integration appears to be downloaded, but is not running for me. I am using 0.0.11 with HACS. I run HA in docker on linux.

User873902 commented 4 months ago

I wonder if I have an issue with Python 3.12, introduced in 2024.2

`Logger: homeassistant.components.binary_sensor Source: helpers/entity_platform.py:344 Integration: Binary sensor (documentation, issues)

Error while setting up wyzesense platform for binary_sensor Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 344, in _async_setup_platform await asyncio.shield(task) File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/wyzesense/binary_sensor.py", line 116, in setup_platform ws = beginConn() ^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/decorator.py", line 232, in fun return caller(func, *(extras + args), *kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/retry/api.py", line 73, in retry_decorator return __retry_internal(partial(f, args, kwargs), exceptions, tries, delay, max_delay, backoff, jitter, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/retry/api.py", line 33, in retry_internal return f() ^^^ File "/config/custom_components/wyzesense/binary_sensor.py", line 114, in beginConn return Open(config[CONF_DEVICE], on_event) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/wyzesense/wyzesense_custom.py", line 566, in Open return Dongle(device, event_handler) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/wyzesense/wyzesense_custom.py", line 288, in init self.fd = os.open(device, os.O_RDWR | os.O_NONBLOCK) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ IsADirectoryError: [Errno 21] Is a directory: '/dev/wyzesense' `

peterpme commented 4 months ago

I'm having issues as of this morning. It's been about 6 hours. I will take a look at the code and see if i can make any updates.

User873902 commented 4 months ago

Updates:

It is quite difficult to quantify this problem, but here's what I've learned:

peterpme commented 4 months ago

Wow, that's interesting. I wasn't able to get it working with 2024.2.5 at all and just downgraded.

mhpetiwala commented 3 months ago

Wow, that's interesting. I wasn't able to get it working with 2024.2.5 at all and just downgraded.

Which version of HA did you finally use (backed off to) that supported the WyzeSense sensors. I am seeing errors and trying to see what's the last version I could pick where this integration will work... I am running HASS core on RPi 5 on python venv and Python 3.12 that is now part of bookworm release... thank you in advance.

stanwebber commented 3 months ago

haos 12.1, ha 2024.3.1 working for me

mhpetiwala commented 3 months ago

Thx. So you're pretty much on the latest version.

User873902 commented 3 months ago

Agreed! Latest version 2024.3.1 is working! Something must have changed with 2024.3

peterpme commented 3 months ago

I'll try latest too. Thanks!

tggman commented 1 month ago

Sorry if this is off topic (?) but have any of you python programmers been able to fix the latest "depreciated constants" issue outlined in #232