This results in a safe, reliable and simple monitoring system.
On a related note, as to microcontroller choices: having done quite a bit of work with MSP430 and various NXP Kinetis chips, I am very, very tired of crappy software engineering practices, monstrous IDEs which are all a reworked version of Eclipse, bad libraries and frameworks which change direction seemingly every month. So I decided to stick with the Nordic Semiconductor chips (mostly nRF52832 and 52840 these days). Yes, they are more expensive per chip. But I don't use hundreds of them, and the savings in my time are huge: their SDKs are nice, you don't have to use their IDEs, you can stick to gcc and Makefiles, and it's overall a decent experience.
In general, while I really like the article series, I don't think the price of a microcontroller matters much in hobby usage. It's very important in commercial designs, but at home where you will never use more than 10 — who cares? It's the overall development experience that matters.
There are some little tools that make this easy: https://github.com/bemasher/rtlamr
You'll need to do a little detective work to separate yours out from the neighbors' but it's not hard.
For my house, I can also read water usage and natural gas the same way by alternating through the relevant frequencies.
Power monitoring involves converting the mains voltage to DC that is almost proportional to the mains voltage. Then you would rectify it and downsize it and get it to a voltage level that whatever power management IC you use can accept. You also need to include fuses and other safety circuitry to ensure it doesn't exceed that threshold your microcontroller can accept. For example, if my uC works based off just 5 volts, I want to make sure I downsize my 120VAC to just 2.5V but still proportional, this means, when there is a spike, my uC can take a hit upto 5 volts, but that means my actual power supply has a spike of 100%, which means I'm getting 240VAC on a 120VAC outlet (which has never happened so far).
Then, for the actual turning on or off of switches itself, I just use relays and some relay/motor coil ICs to control them. Sorry I don't remember exactly as this was a year ago and this system is lying inside my wall. So I need to remove the switchboard (and use a lens) to find out the numbers. But then, you can always google for "Power management / mains voltage IC", you can find even ready made modules on eBay.
The tricky part is component layout since you are dealing with high voltage, it can form arcs: https://www.youtube.com/watch?v=MAlyEMQxTN0
Not as powerful, but still a smaller version of those arcs. So, you want to use well rated components with decent thresholds. Eg. Don't use a low power relay, cheap capacitors, etc.
All of this is then passed on through uCs(ATTINY 85 + other uCs in the circuit) to some nrF wireless modules I bought in bulk on AliBaba through my uC
To be clear, each switchboard housing contains - a couple of relays, uCs, nRF modules, temperature and humidity sensors and some infrared sensors (I don't use them anymore). I believe they also have overvoltage protection and short circuit protection in built (because of an IC I use). It will simply turn the relay off in the event of a spike or short circuit.
BTW, AliBaba is the cheapest. Don't buy from AliExpress, it's usually plagued with dropshippers (god, I hate them so much) who just keep hefty margins off a factory somewhere that you can find on AliBaba. Other alternatives, but still under AliBaba group: 1688.com, tmall.com
If you think about it, in cloud lingo, we would call this architecture as "micro services" except that there's one big monolith which is my mains module run by an old laptop motherboard. (Sony Vaio FZ series)
This nrF module talks to a an old laptop motherboard through serial, that passes information to a REST API. This laptop motherboard is located where usually all the mains connections go in. One thing I didn't use on purpose is smart trippers/circuit breakers. Sure, they're smart, but you're relying on someone else for security while also giving away your power usage consumption data. Besides, if a circuit breaker goes off, you want to know why it happened before turning it on, so I find it pointless to make them be able to turn on automatically or from your phone when I can just walk to my mains box and turn it on myself.
The REST API is built with Phoenix/Elixir, and is hosted on Google Cloud AppEngine. I haven't had any downtime so far (yet) and is blazing fast. Like I said, I'm a Google Cloud consultant, so this is what I do for a living. You may have luck doing the same with AWS/DigitalOcean. Just use something you know well.
And don't ever get into doing devops for this kind of thing. It's more critical than you think. So, don't make choices like try to save up on the servers by running your own instance on a DO droplet for 5 bucks a month. Sure, you saved up some cash, but the devops it takes you will cost you more. More importantly, if some hacker gets in, you're doomed!
Once, when I was in my house, the lights and TV suddenly started turning on and off in the hall room. This was right after I came back from watching Insidious and it was really scary. Then I found out, it happened because there was a really fat mouse on the motherboard (don't know how it got there) walking around the jumper wires. Haha!
Hope this helps, sorry I will try to update with specifics maybe in a separate blog post here.
I'd say you need to include other safety circuitry, as well as proper PCB design, to make sure it doesn't start a fire.
If you don't know what you're doing, don't rely on random stuff from AliExpress etc to be grid safe, and don't try to make stuff that connects to the grid yourself.
If you do not know what you're doing, for stuff like this I'd go with say Fibaro Z-Wave stuff or similar devices which have built-in power monitors, and can interface with Home Assistant or similar.
MEE hobbyists, disregard.
I won't touch electrical on my house and will happily contract it out to a license+bonded electrician for the exact same reason.
That said really cool project and Kudos for tacking it, just make sure your smoke detector is working :).
Even theoretically, the only way a relay could catch fire if the coil inside overheats or if you pass very high voltages to the coil. But, with a well designed circuit, it should be fine.
[1] https://www.yoctopuce.com/EN/products/category/usb-electrica...
Having said that, you can always buy "modules" from Siemens, Honeywell, etc. Get your circuits audited by someone with more experience, in particular by an experienced electrical engineer before using it live.
Have multiple levels of fail-safe, fuses, fire retardant casings, what not. Just think of every possible worse-case scenario before you do it.
After all, electricity is no joke and can literally kill you.
I'd be curious of how do you update these devices, did you get OTA to work through an nRF24? did you need some external eeprom for that?