For a couple of years now I’ve been trying to make peace with the scene editor and scenes in general. I’m about to spend hours switching to either automations or back to appdaemon scripts and wanted to see if maybe I just don’t understand the model and there’s a better way to use it.

I keep getting burned by unexpected changes to entities and devices and just plain wrong output that appears to only be fixable by removing and re adding devices or entities in specific orders (root cause is #2 below).

Use case is pretty table stakes for HA: I want to operate about 80 ‘common area’ lighting devices in a large house on global events (lights on at sunset, off in the morning for example).

-Bp9

Tldr; Details

I have about 120 distinct lighting devices on several integrations (wled, MQTT, ISY, and zwave) many with dozens of entities; and another 50 devices/600 entities unrelated to lighting. I’m running the hassos image on a VM on a Rocky Linux intel server with plenty of memory and cores (I used a PI 4B with an SSD for a while but it didn’t have enough CPU for the heavyweight Python code in HA).

Issue #1: scene editor interference

The scene editor on the client sort of checks out a scene and sets all the devices up to match it in real-time, if you end up with multiple tabs open in the same scene changes get lost overwritten when the web socket disconnects - this is PEBCAK (user error) but it’s really hard in practice to deal with

Issue #2: Conflicting entity state

I have 30 or so WLED devices on the wled integration. These each provide multiple entities that are in conflict with each other per device (preset select vs segment power state for example).

When the scene editor tries to save all this state it writes conflicting state on the multiple entities on the same device. One could say I should disable the dozens of entities on each of the 30 devices but that is hours of work in the clunky ui; I read the code and found where the JSON config files are hidden now, but it’s still painful to work with because “ha core restart” takes a couple of minutes to test each change. I also frequently do want the multiple ‘conflicting’ entities (manual dashboard control on one, presets on scenes).

There isn’t enough data in the entities to really capture the state and with WLED the entities come and go dynamically (depending on the number of segments defined in a wled preset and where it is in a playlist). In this case I can put the blame on my edge case use of the wled integration and its immature state. This all got a lot better when you were allowed to set entities in scenes instead of whole devices, but it’s a huge amount on manual ui drudge work to go and rework 30 devices, and I’ve tried and not yet succeeded several times due to the next issue…

Issue #3: scene corruption while editing live

There is no way to edit a scene without having it active, and if anything changes while it’s active the changes are written to the scene. This is impractical if you have motion detectors or other automations running while trying to make a large change (or a user is annoyed when a light goes on or off as you edit the scene and flips it back the way they want it before you finish your edit). It also means you can’t edit scenes at night with people in the house.

  • Admiral Patrick@dubvee.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 years ago

    Yeah, I feel your pain.

    This is why I quickly abandoned automations and scenes in HA. HA is pretty much my device communication hub, state machine, and web interface. My logic is all in NodeRED.