Running my lights after the company folded
The lights in my house are on a smart-lighting system whose company went out of business. The cloud is gone. The hub on the shelf is still here, though, and it still serves a local HTTP API.
The house AV controller couldn't help. I checked it item by item: it only runs the audio and video gear, and the lights were never wired into it. So the lights needed their own path.
Getting in
The hub's local login isn't the old app login. It's a short pair printed on a sticker on the bottom of the hub. Once that worked, an open-source Python library for the protocol did the talking. The hub knows ten devices: nine wall dimmers and one six-button keypad.
What fought back
- Asking a device what it is times out. Every one of them, through the hub. The fix was to skip the question. The hub's link table already stores each device's category and firmware, so I build the device list from that and cache it.
- Loading the hub's own link database never finishes cleanly. It's wrapped in a timeout now.
- Everything is slow. The hub polls, so one switch takes about 6 seconds and a full status of all ten takes about 11.
- One call is a trap. The library's "add device" call puts the hub into linking mode. Never use it just to identify something.
Where it is
A small command-line tool reads the status of all ten devices and switches them on and off. The hub only knows each switch by a hex address, so the next step is naming them: blink flashes one light, and name saves what it turned out to be.