I agree.
If I understand correctly the hard parts are the limited resources of the controllers and a need for high versatility for the rooms. Actually needing to update the controllers to update CSS for the main app is kind of crazy.
With my limited understanding of the system it feels like my go to solution would be: - A thin generic program on the controller that run a arbitrary configuration of room logic. - A main client program that can: 1. manage the state of the current configuration. 2. push / switch configurations on the controllers.
Hi! I'm the author.
"Actually needing to update the controllers to update CSS for the main app is kind of crazy." The controllers don't return CSS: they return HTML fragments. I chose not to include CSS in the response because of the reasons you're thinking, plus the servers shouldn't really care about how their state looks.
The admin app styles the custom tags. I also figured this would make it easier for them to contract out changes to that app.
"the hard parts are the limited resources of the controllers and a need for high versatility for the rooms." Yep! I didn't cover it in the article because it didn't fit the theme, but another challenge was the single execution thread. When you have a bunch of rooms on the same controller, you want to avoid blocking that loop, which is what the built-in Arduino delay function does. I came up with a timer system for non-blocking time-based triggers.
That is pretty much what I do, although my "thin generic program" is still very beta.
I follow the narrow waist principle, and basically have all communication in the form of setting and subscribing to "tag points", plus getting their metadata.
The controllers have some ability to run logic, in the form of web editable "If you are in this state, every frame, set this variable to this expression", and they have a generic UI to set and view all the variables.
But I don't have any legacy controllers to deal with, just ESP32s.
If I do run into legacy stuff, I just leave it alone, my main controller lets you write plugins that make whatever device you want appear as one of these tag point based devices, so I keep as much of the flexibility as possible in nice version controllable python.