Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
PolestarWx opened this issue Jun 13, 2023 · 15 comments
Open

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

PolestarWx opened this issue Jun 13, 2023 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@PolestarWx
Copy link

PolestarWx commented Jun 13, 2023

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:

@PolestarWx PolestarWx added the bug Something isn't working label Jun 13, 2023
@dflvunoooooo
Copy link

Same problem here. Can not control LedFX anymore.

@sebaguacamole
Copy link

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

@adamomg
Copy link

adamomg commented Jun 20, 2023

Experiencing the same on HASS version: 2023.6.2

@Fire-orel
Copy link

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
Copy link
Author

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
Copy link

У меня такая же ошибка, я заметил, что если я пытаюсь перейти на устройство, подключенное к 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
Copy link

Gus1994 commented Jun 28, 2023

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

@tungmeister
Copy link

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

 'LedFxButton' object has no attribute '_ActionType.SCENE_press'

@tungmeister
Copy link

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
Copy link

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
Copy link

philcsn commented Aug 10, 2023

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
Copy link

philcsn commented Aug 18, 2023

@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
Copy link
Author

ASked for a removal from HACS as it's not working anymore
hacs/integration#3257

@PolestarWx
Copy link
Author

Removed from hacs

@PolestarWx
Copy link
Author

PolestarWx commented Dec 16, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants