dmamontov / hass-ledfx

LedFx for Home Assistant
https://community.home-assistant.io/t/ledfx-deep-integration-component/366750
Apache License 2.0
44 stars 6 forks source link

[BUG] LedFx does not wokr under Home Assistant 2023.6.1 #21

Open PolestarWx opened 1 year ago

PolestarWx commented 1 year ago

Describe the bug image

Log from HA

Cette erreur provient d'une intégration personnalisée

Logger: aiohttp.server
Source: custom_components/ledfx/light.py:310
Integration: LedFx (documentation, issues)
First occurred: 18 juin 2023 à 16:35:35 (16 occurrences)
Last logged: 09:14:47

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
    resp = await request_handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 85, in security_filter_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 148, in handle
    result = await handler(request, **request.match_info)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/api/__init__.py", line 329, in post
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1910, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1950, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/homeassistant/__init__.py", line 130, in async_handle_turn_service
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/core.py", line 1910, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1950, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 226, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 811, in entity_service_call
    future.result()  # pop exception if have
    ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1034, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 851, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/light/__init__.py", line 582, in async_handle_light_on_service
    await light.async_turn_on(**filter_turn_on_params(light, params))
  File "/config/custom_components/ledfx/light.py", line 292, in async_turn_on
    await self._async_call(f"_{self._type}_{STATE_ON}", STATE_ON, **kwargs)
  File "/config/custom_components/ledfx/light.py", line 310, in _async_call
    if action := getattr(self, method):
                 ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'LedFxLight' object has no attribute '_ActionType.DEVICE_on'

Please complete the following information:

dflvunoooooo commented 1 year ago

Same problem here. Can not control LedFX anymore.

sebaguacamole commented 1 year ago

I am using the exact same configuration as PolestarWx (exept HASS version: 2023.6.2), and I am experiencing the same issues reported.

adamomg commented 1 year ago

Experiencing the same on HASS version: 2023.6.2

Fire-orel commented 1 year ago

I have the same error, I noticed that if I try to go to a device that is connected to the ledfx via Home assistant, it gives an error 404 because the addresses have changed since the ledfx 2.0.0 version, if you access the ledfx and the browser, then the address is like this (example: http://192.168.0.11:8888/#/device/wled-daa742 ), and if through the Home assistant, then this is (Example: http://192.168.0.11:8888/devices/wled-daa742 ) and this difference does not allow you to control ledfx from Home assistant normally (My opinion)

PolestarWx commented 1 year ago

I have the same error, I noticed that if I try to go to a device that is connected to the ledfx via Home assistant, it gives an error 404 because the addresses have changed since the ledfx 2.0.0 version, if you access the ledfx and the browser, then the address is like this (example: http://192.168.0.11:8888/#/device/wled-daa742 ), and if through the Home assistant, then this is (Example: http://192.168.0.11:8888/devices/wled-daa742 ) and this difference does not allow you to control ledfx from Home assistant normally (My opinion)

Nope, I use led fx 2 from YeonV repo since some month with this module without problem, I tried to revert back to 2.0.63 which I'm sure it was working well with this module and still got the same message error

Fire-orel commented 1 year ago

У меня такая же ошибка, я заметил, что если я пытаюсь перейти на устройство, подключенное к ledfx через Home assistant, оно выдает ошибку 404, потому что адреса изменились с версии ledfx 2.0.0, если вы заходите в ledfx и браузер, то адрес выглядит следующим образом (пример: http://192.168.0.11:8888/#/device/wled-daa742 ), а если через Home assistant, то это (пример: http://192.168.0.11:8888/devices/wled-daa742 ) и это отличие не позволяет вам нормально управлять ledfx из Home assistant (мое мнение)

Нет, я использую led fx 2 из репозитория YeonV с какого-то месяца с этим модулем без проблем, я попытался вернуться к версии 2.0.63, которая, я уверен, хорошо работала с этим модулем, и все еще получал то же сообщение об ошибке

okay, well, it was just my guess, then I take my words back, but still the problem is the same and how to solve it is not clear

Gus1994 commented 1 year ago

I also have the same problem. no solutions found :/

tungmeister commented 1 year ago

same issue, can't start a start a scene with the below error:

 'LedFxButton' object has no attribute '_ActionType.SCENE_press'
tungmeister commented 1 year ago

Depending on what functionality you need you can use the rest api and send commands that way, for example all I really need is to start and stop a scene so I've set up the below:

  rest_command:
    ledfx_activate_scence:
      url: "http://10.0.0.169:8888/api/scenes"
      method: PUT
      payload: '{"id": "party", "action": "activate"}'
    ledfx_turn_off_scence:
      url: "http://10.0.0.169:8888/api/scenes"
      method: PUT
      payload: '{"id": "off", "action": "activate"}'
thatguyinoz commented 1 year ago

Depending on what functionality you need you can use the rest api and send commands that way, for example all I really need is to start and stop a scene so I've set up the below:

  rest_command:
    ledfx_activate_scence:
      url: "http://10.0.0.169:8888/api/scenes"
      method: PUT
      payload: '{"id": "party", "action": "activate"}'
    ledfx_turn_off_scence:
      url: "http://10.0.0.169:8888/api/scenes"
      method: PUT
      payload: '{"id": "off", "action": "activate"}'

Thanks for that tip, it will keep me going till the issue is resolved.

philcsn commented 1 year ago

Has a solution been found yet? I think I am facing a similar issue, when trying to trigger a scene in LedFx using the HA integration I get the error "Failed to call service button/press. connection lost"

philcsn commented 1 year ago

@dmamontov Do you plan on fixing this? I don't mean to sound rude, just want to know if I should look into viable solutions or if this will be updated. Ty and kind regards

PolestarWx commented 1 year ago

ASked for a removal from HACS as it's not working anymore https://github.com/hacs/integration/issues/3257

PolestarWx commented 11 months ago

Removed from hacs

PolestarWx commented 9 months ago

Another dev fixed this module and it works again, just download it's repo and copy files under custom_component inot the folder of same name in config folder of hassio : https://github.com/DeKaN/hass-ledfx Thank you so much DeKaN ! Use LedFx from https://github.com/YeonV