logoalt Hacker News

ramses0today at 2:01 PM1 replyview on HN

As a matter of fact, I've been poking at this from a slightly different direction: "axioms and invariants" within home automation scenes.

Invariants were like "if outside temp < 40 or inside temp < 65: heater.minTemp( 65 )"

Axioms were like: "if {we're home} and it's {not a holiday} the house should be {comfortable temperature}".prompt

...and then that would get decomposed and translated into interlocking code for the scene(s). I'll have to look at this language a little more closely with those kinds of constraints in mind!

You're kindof translating `*.prompt` to either prolog (yucky!), lisp, lua, or javascript (for inspectability/debuggability), but this whole bend thing might be an exact fit for the problem space! Limited set of objects and states, bounded set of "invariants" (laws), and layering on top the general state modification activities (either "evaluated every 5 minutes and reconciled" or "set the scene xyz...").


Replies

gps372today at 2:21 PM

Hmm, in your example, temperature is fully measurable but there might be a slight challenge in measuring if "If we are at home". Since for this you need to define more variants with measurements from motion sensors, pressure or weight sensors on beds or sofas, if a device has got connected to wifi, etc.

By the time your first round of beta testing is over, you may have quite a handful of such axioms and variants, which have been humanly validated!

Have you done any such experiment in this space?