Media

A plugin forbidden from knowing any brand names

Televisions and receivers of any brand from a single plugin, driven by a library of device definitions — with an architectural rule strict enough to fail loudly if it was ever a lie.

homeseerhdmi-cecavreceiverstelevisionsirarchitecturenetworksoftwareaudio-video

Not in the HomeSeer store yet — running here daily, and heading for the store as a beta.

This one began as a limitation somewhere else. A Roku cannot report its own volume, because it hands that job to the television over HDMI-CEC — so the only route to the real state of a room is to talk to the display itself.

The obvious response is a plugin per brand: a Samsung one, an LG one, one per receiver manufacturer, forever. That answer is wrong, because they are ninety percent the same plugin — discover, connect, hold a session, map a command set, report state.

So there is one plugin, driven by a library of device definitions. A new brand is a definition, not a project. The Samsung and LG plugins that were going to exist became entries in that library instead.

The rule, and why it is written so aggressively

The core files carry a warning in capitals: nothing here knows any brand. No manufacturer name, no protocol name, no three-letter control code. Everything is built from the JSON definition.

And then the important half — if a new receiver ever needs a line added to these files, the design has failed, and it is far better to learn that in week one than after a library of ninety definitions has been written against a promise that was never true.

That is a rule with a tripwire attached. Plenty of "data-driven" designs are data-driven right up until the second device, at which point a small special case goes in, then another, and eventually the data is decoration on top of a pile of brand-specific branches. Stating the rule loudly makes the first violation an event rather than a convenience.

The address scheme, settled first

Device addresses are host | zone | capability, and that was decided before anything existed to depend on it.

Deliberately, because an address scheme cannot change after release without orphaning every event a user has written — and the comment naming that constraint also names the plugin that paid for the lesson. Lutron learned it; this one inherited the scar without the wound.

The parts that resist

Real AV gear is not uniform, and the definition library has to absorb that rather than pretend it away.

Samsung's now-playing information arrives through a different call than everything else it does. Some devices only respond to infrared, which means an IP-to-IR bridge and a command set with no feedback path whatsoever — you can tell a device to do something and never learn whether it did, which makes state a matter of belief rather than observation.

The device-signature database is doing the real work, and it is built from spot-checks against actual hardware rather than manufacturer documentation, which in this corner of the industry is best described as aspirational.

The most ambitious of the set, the least finished, and the one most likely to keep growing.