YeonV / ledfxrm

Custom Integration for Home Assistant to control a any (local/remote) LedFX-server - State: beta
MIT License
32 stars 6 forks source link

Subdevices cannot be setup & do not work if starting HA without LedFx running #11

Open trancefam opened 3 years ago

trancefam commented 3 years ago

Version of the custom_component

0.2.6

Configuration


N/A

Describe the bug

One observation is that it seems that after restarting HA the "Home Assistant is starting, not everything will be available until it is finished." message is displayed for what seems like 4+ minutes until it finally gives up if LedFx isn't already running. Then the below logs show up. I can then use the built in start button and see it start, but the subdevices are still broken and show as "unavailable" with the message:

This entity is currently unavailable and is an orphan to a removed, changed or dysfunctional integration or device.

If the entity is no longer in use, you can clean it up by removing it.

The subdevices are broken until I restart HA with LedFx already running. If LedFx is already running it starts up no problem (no delay and subdevices displayed).

Is there a way to maybe have an option in the ledfxrm settings to "auto call the start server endpoint on startup" before trying to setup the subdevices?

Debug log


Error while setting up ledfxrm platform for light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/ledfxrm/light.py", line 51, in async_setup_entry
    for k in virtuals:
TypeError: 'NoneType' object is not iterable
steveof2620 commented 3 years ago

I have installed the extension and it seems to be working in that its reporting the right number of LEDs, scenes and so on. The integration has added the following entities:

But I do not have the light entity. Can't see it in my logs though.

LedFx was up and running when I added the extension.

Also, I get an error when trying to use the start/stop server switch. I get the following in the log: [140242304195072] Cannot connect to host 192.168.1.27:23002 ssl:False [Connect call failed ('192.168.1.27', 23002)]

Can anyone tell me how this should be configured? (is it at the end-point host, LedFx itself or in Home Assistant or a combination of those?).

Codename-11 commented 3 years ago

I also seem to be unable to add my device as a light entity. I tried re-installing the integration and checking my configs but to no avail...