Project: Soft Rains Entry 11

A light that means something is wrong

Joining my switches to a second Matter fabric to get at an LED strip, then making it boring on purpose.

Six of the light switches in this house are Inovelli VTM31-SN dimmers, and every one of them has a strip of individually addressable LEDs running down the side of the paddle. It is sold as a status bar. So far its only contribution to this project has been as a source of bugs, since it is the thing that was quietly swallowing half my commands a few entries ago, and I decided it could start earning its place. I wanted the house to be able to tell me something was wrong without sending me a notification I would swipe away without reading.

Getting at that strip took most of a weekend and went somewhere I did not expect.

A second fabric, and a cluster nobody exposes

The LED bar is not a standard Matter thing. HomeKit sees the switch, and it sees a single notification light on it, and that is the whole of what it will give you. The per-segment control lives in a vendor-specific cluster that Apple has no interest in surfacing, quite reasonably.

A Matter device can belong to more than one fabric at a time, which is the loophole. I put a second controller on the Mac mini, joined the switches to it as well so they are now on both HomeKit and mine simultaneously, and taught the controller about the Inovelli cluster so it can send the LED effect commands directly. Per-segment rendering confirmed on firmware 1.1.5, at which point I sat and made a light switch in my hallway do a rainbow, alone, at eleven at night, feeling extremely pleased.

One gotcha worth writing down for anybody doing the same thing. The HomeKit-visible notification service and the vendor segment layer are stacked, and the HomeKit one sits on top. Whole-bar commands through it come back successful and do nothing visible, while individual segment writes work fine. It took me a while to work out that I was painting underneath something.

Then I did the stupid part for a while

Having got per-segment control, the obvious next step was not a status system. It was animations. I wrote a five second rainbow rotation. Then a paint-wipe with a leading edge that travels one pixel per second. Then a ripple, where the boundary walks down the bar and the new colour comes in from the bottom while the rainbow scrolls up, which I sketched on paper first like a lunatic.

They all worked. I retired the whole thing four days later. It was a daemon holding a thread and issuing a write every second, forever, to a light switch, so that a hallway I walk through twice a day would look slightly nicer. At one write per second it also occasionally glitched, because the radio would retransmit and restart the effect mid-animation. Two seconds per step was clean, and by the time I had tuned it to two seconds I had also worked out that I did not want it at all. It is now a static paint, and mostly it is off.

The thing I was actually building

What is on the bar now is much more boring and much more useful. When the morning review decides something needs me, specifically me, and cannot be fixed by restarting it, the bar at the top of the stairs breathes red and I get an email. That switch is the one I can see from the couch with the TV on, which is most of why it got the job. It sits at the edge of where I am already looking on a normal evening, so noticing it costs me nothing and ignoring it takes effort.

There are two rules so far, and both come from failures I have already written up here. One is a newscast launch that went into the void. The other is leaving the house without the car confirming it locked. Both are things I would otherwise find out about hours later, or not at all.

Idle is a dark bar, not a green one. I tried green for a day and it was awful for the same reason the red works: it sits in the corner of your eye all evening. A steady green glow off to the side of the television is a small constant demand for attention that never resolves into anything, and within about an hour I had stopped seeing it entirely, which is precisely the failure mode that makes the red one worthless too. It should be dark almost always, and when it is not, it should mean something.

Slightly sobering footnote to all this. I counted devices again while I was in there and it is sixty-nine now, up from the sixty-two I mentioned a couple of weeks ago, which means that in a fortnight of claiming to be consolidating and simplifying, seven more entries have appeared in that list. Some of those are the same double counting I complained about last time, and I am not going to pretend all seven are new objects, but I am also not going to pretend I have bought nothing. I am aware of the shape of this.