Without even knowing if this entire idea will do what I want, I've spent some mental energy thinking about the user experience of controlling it. (That's not the right way to go about things for project management, but that's not the way some brains work. :-) ) If I use an ESP32 to control the fans, that gives me a lot of flexibility in the control stuff.
It goes (almost) without saying that the units will report their sensor and operational state data to my home automation setup. I use Home Assistant and will probably use MQTT to tie into that. It would be entirely possible to control the units from Home Assistant. I will probably do that, but I don't want that to be the only means of controlling them, for the following reasons:
- Most of the rest of the household is not so interested in interacting with nerdy Home Assistant. I'm trying to cure that by making a ultra user-friendly wall panel system, but that's a longer-term project.
- If we have house guests, I want them to be able to have some control over the guest room climate without needing to take a community college course to understand how to do it. I don't even want to force them to have an app or even a computer. I want to give them some kind of in-room control. (A wall panel tied to Home Assistant could do that, but see previous bullet.)
- If I were to someday sell this house, a lot of my home automation infrastructure would go away, including my wifi and my Home Assistant server. Could I leave the register booster units in place with controls feasible for the new owners to use without requiring a lot of fiddling around?
I've been thinking mostly about some kind of local control UI for the ESP32 in the register. Let's call that R-ESP32. My registers are on the floor, so I don't really want to have some piece of electronics sticking out above the register grating all the time. I thought about some kind of "display with knobs and buttons" gadget that could plug into some wire or socket that barely protrudes from the register grate. To the average non-techy person, even plugging a provided box into that sort of thing in someone else's house might seem overly invasive.
Can I do something wireless with a separate box or wall panel? There is some chance I can run the fan and controller DC power wires through the ducts rather than using a wall wart. If that turns out to be possible, then there would be nothing sticking through the register and the vent opening, and that makes a wireless control gadget very desirable. There are plenty of off-the-shelf components that integrate an ESP32 and some kind of display. Even without that, integrating those two things is pretty painless. Add a few knobs or buttons, mount it in a convenient wall location in a nice enclosure, and you're sitting pretty. Let's call that gadget he UI-ESP32.
With an ESP32 on both ends, there are obvious possibilities for having them talk to each other (even after subtracting out various wired options). I expect the R-ESP32 will already be talking to Home Assistant over wifi. Using the same or a similar pathway for linking the two ESP32s would be straightforward. The cost of that would be involving the wifi router, and maybe even the Home Assistant server, in the pathway. That's not a deal-breaker, but I'd rather avoid it if I can. Bluetooth Classic or BLE are possible and would give that local point-to-point interaction. (I'm not sure about complications of using both wifi and BT on the same ESP32. I know it can be done, but I'm not sure if there is any trickiness involved since they use the same radio.)
I think I will use ESP-NOW. ESP-NOW is an Espressif-defined protocol for communicating with short packets over IEEE 802.11 physical links. That is, it uses the same radios and channels as wifi, but most of the information within the packets is "custom" for the ESP-NOW protocol. I think (but I'm not yet sure) that it will be simple to use both traditional wifi and ESP-NOW side by side without too much complexity or hassle.
The overall flow of things is something like this:
- Most of the time, the R-ESP32 is autonomously controlling the fans according to it's configured settings.
- The R-ESP32 is also periodically sending its sensor and operational data to Home Assistant (probably by publishing to an MQTT topic to which Home Assistant is a subscriber, but that doesn't matter here).
- In some yet-to-be-defined way, Home Assistant can be used to modify the configured parameters for the R-ESP32.
- Most of the time, the UI-ESP32 gadget is not connected to any R-ESP32. Maybe it's even powered off completely. When it's turned on or a "connect" button is pressed or whatever, it initiates communications with an R-ESP32.
- The UI-ESP32 can ask for all of the sensor, operational, and configuration data from the R-ESP32. It can provide ways for configuration updates sent back to the R-ESP32. There's some way to resolve conflicting updates from multiple sources, though I suspect it will resolve to "last writer wins" and that will be good enough.
There's an interesting user experience puzzle in there, or in the system more generally. The R-ESP32 is controlling the fans according to its configuration for vent opening temperature sensor reading, fan speeds, etc. But that is quite a bit different from the notion of a person saying "it's just a bit too warm in this room; fix that". That's a problem for another day.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.