Project: Soft Rains Entry 03

Teaching a house where the people are

Room sensing with no sensors, and a bug that was mine the whole time.

The best trick in the whole setup is one I did not build. The newer Hue bridge can do what they call motion sensing without any motion sensors, by watching how the radio signal between the bulbs themselves gets disturbed when a body moves through the room. You nominate a few lights in a room, it learns the space, and after that the room knows when somebody walks into it. No hardware, no batteries, nothing on a wall or a shelf.

I did not believe it would work in the kitchen here. The only participating lights are ceiling downlights, all in one plane, which felt like exactly the geometry that ought to fail. It works fine. My guess is it is living off reflections rather than the direct path, because there is no direct path to break.

Those downlights were one of the things I quietly held against this place when I viewed it. Nine identical holes punched in a ceiling, no pendant, no character, the sort of lighting you get in a rental. I had a whole plan involving a proper fitting over the island. I have not done it and I am now not sure I will, partly because the downlights turn out to be the thing making the room able to see, which is not an argument I expected to be making six weeks ago. The compromise I was annoyed about has quietly become load-bearing.

Sensitivity is the whole game

Out of the box each area gives you two outputs, one tuned for convenience and one tuned for security, and the convenience one is the one you want for lights. At the default sensitivity of 2 out of 4 it barely fired. It would catch me walking in, then decide the room was empty while I stood at the counter chopping something. Lights off, wave arm, lights on, repeat.

At 3 it is genuinely good. It catches the walk-in and it holds through slow work at the counter, and I have not seen it fire at nothing. I have left the fourth setting alone, because in a room where the only participants are ceiling lights I suspect the fridge compressor and the air moving would start looking like a person.

I keep thinking about what this does to the rest of the plan. I had a mental shopping list of sensors for every room, and a rough idea of where each one would go and how I would hide the batteries, and a chunk of that list is now pointless in any room with enough bulbs in it. I have not decided whether that is the system quietly getting better or me finding a reason not to buy things. Probably both. It does mean the bedrooms downstairs, which have two lamps and a ceiling fitting between them, are going to need the old approach, so I am running two different ideas of what a room is at the same time.

The part where I was wrong for a day

I tried to create one of these automations from a script, got an error back, tried a couple of variations, got the same error, and concluded that the bridge only allowed this to be configured from the phone app. So I designed around it. I built a whole approach that read the sensor output and did the light control myself, in my own daemon, duplicating something the bridge already did properly.

The API could do it the whole time. My request was malformed. The error message even said the configuration was invalid, which is the API telling you plainly that the problem is your payload, and I read it as the API telling me no.

What I had wrong was small and stupid. The configuration takes parallel arrays and they are positional, one entry per room you are targeting, including the entries for what to do when motion stops. Get the counts out of step and you get "invalid actions configuration", which is precisely and accurately what was wrong. I now try to hold on to the difference between an API saying no and an API saying you asked badly. They look similar at eleven at night.