It's been quiet here for too long, and since I've started a new ambitious project, I've decided to blog the progress and steps I'm going through since a lot of if will be relevant for anyone building an embedded device.
First a little backstory: I recently got a battery backup installed on the house. If there's ever a power outage I've been able to use Home Assistant to automatically turn non-essential things off, to extend the battery lifetime. However one thing that I haven't been able to control was my pool equipment, which is one of my most power hungry devices. For me to be able to do remote-control it, I'd first have to buy a $3000 "control center" and a $500 device to get it internet connected, and likely hire an installer to install it. And what you get is something that looks like a toy made in 1995. The markup on pool equipment is absolutely insane. So I wondered: Can't I just build my own?
Well shortly later, my desk now looks like this:

In my usual style, I went completely overboard. Instead of just making a simple remote-operated switch which would have been a few lines of code, I'm now building a full on pool controller system. Because why not?
Using MQTT I can expose the state of the pool to Home Assistant as well as expose controls to turn things off. At the same time I wanted an easy to use pool controller screen that simplifies usage for the entire family for turning on heater, switch to hot tub only etc (currently it's a mess of setting a bunch of valves in the correct position or you'll risk messing things up).
I set up a set of goals to figure out how to build a proper embedded device:
- Should be completely configurable from the screen, including setting up WiFi, MQTT etc.
- Ability to easily look for new updates online and auto-update to a new build.
- Auto-starts when device turns on, and auto-restarts in case the app crashes.
- Fully remote controllable via MQTT.
Some of these things I've figured out already, and some of them I have ideas on but haven't tried just yet. My plan is to document and share everything here, both for myself for future embedded device projects, and for everyone else to learn from. All the source code will also be shared on GitHub. At the time of writing it is pretty basic, but I expect to build a set of re-usable components into it that you can grab from to build your own embedded device: https://github.com/dotmorten/PoolController
I'll be using .NET 10 and Uno Platform to accomplish all of this.
Here's some of the blog posts I plan on posting in the coming weeks (I'll make this list clickable as I post them):
- Hardware setup.
- Developer setup.
- Uno Platform project setup basics.
- Display management (rotation, touch, auto-screen-off and so on).
- Building a WiFi configuration interface.
- Auto-updating app from the internet.
- Auto-launching app and auto-restart after failure.
- Creating a custom image/setup for easy deployment to a new device.
I don't plan on going into super detail about how the pool controller itself works, how I communicate with the pool equipment, controlling sensors etc as that is extremely project specific, and you can always look at the code and eventually look at the hardware diagrams and doc (once those things materialize) if that bit interests you. My main goal with this series is to cover several of the scenarios a developer might go through to build an embedded device.