SecKatie / ha-wyzeapi

Home Assistant Integration for Wyze devices.
722 stars 112 forks source link

[Feature Request] Support for additional Wyze Light Strip models #605

Closed KrydWolf closed 1 month ago

KrydWolf commented 1 month ago

I own two different Wyze Light Strips models. The Wyze Light Strip - 16.4ft (purchased 5/2022) with the latest firmware version 1.1.1.170 works perfectly. The Wyze Light Strip - 32.8ft (purchased 12/23) with the latest firmware version 1.2.0.3 is unresponsive despite showing up under devices and allowing input.

Ideally, both models of the Wyze Light Strip would be supported by the extension and offer the same functionality.

Currently, I don't know of any way to control the 1.2.0.3 light strip outside of the Wyze app.

brg468 commented 1 month ago

So the 32 ft. strip shows up as available but doesn't react to changes? Is the state reflected correctly, ie on/off, color etc?

Are there any errors in the logs when you send a command to the strip?

Are the device model numbers shown on the device page in HA the same?

KrydWolf commented 1 month ago

Yes, it shows as available and the state is reflected correctly. It shows that it is On/Off and the current color selection.

Both Wyze Light Strips are listed under the same model name "HL_LSL" in devices page.

It looks like there is an error log when I send a command:

Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:147
First occurred: 5:45:16 PM (1 occurrences)
Last logged: 5:45:16 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 452, in _request
    url = self._build_url(str_or_url)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 379, in _build_url
    url = URL(str_or_url)
          ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/yarl/_url.py", line 188, in __new__
    raise ValueError("Invalid URL: host is required for absolute urls")
ValueError: Invalid URL: host is required for absolute urls

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/bulb_service.py", line 155, in turn_off
    await self._local_bulb_command(bulb, plist)
  File "/usr/local/lib/python3.12/site-packages/wyzeapy/services/base_service.py", line 610, in _local_bulb_command
    async with session.post(url, data=payload_str) as response:
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1197, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 454, in _request
    raise InvalidURL(str_or_url) from e
aiohttp.client_exceptions.InvalidURL: http://:88/device_request
brg468 commented 1 month ago

Interesting. Try disabling local control under devices and services, Wyze integration, then configure. You should see this, uncheck the box and see if it works then.

image

KrydWolf commented 1 month ago

That did the trick! Full control now from HA.

Thanks for the recommendation.

brg468 commented 1 month ago

No problem. That’s interesting though that local control doesn’t work on that particular device, but I don’t have that one to troubleshoot so I guess this works for now.