I've been using 433mhz RF controlled plug sockets for home automation for around 5 years, and it has worked reasonably well. I started out sniffing the codes sent by the original remote control with an Arduino and a 433mhz receiver, before making an Arduino-based transmitter that received input over a serial connection from a server on my home network to control and automate various appliances in my home. As first this was just simple cron jobs to turn lights on at sunset, and a hacked together web interface to control sockets via my phone.
As times have moved on, I've embraced Apple's HomeKit ecosystem and the amazing community project Homebridge, which has a plethora of plugins available for controlling various connected devices. I was able to carry on using my 433mhz transmitter and shell scripts with the cmdswitch2 plugin.
This all works quite reliably 99% of the time, but there are a few downsides:
- Communication with the switches is one-way: they don't respond to an 'on' or 'off' signal, so we have no way of knowing whether the switch received the transmitted command and was able to perform the requested action. Interference can occasionally block sockets from receiving a command.
- Because of the lack of two-way communication, we cannot periodically pole the switch for its status. If the switch is turned on manually via its physical button, HomeKit will still think it's turned on - and won't attempt to turn it off (e.g. in a scene automatically triggered by leaving the house)
- The range on the sockets is surprisingly long, and communication is completely unencrypted - it would be trivial for someone within a hundred metres of my house to turn all my lights on at 3am!
- There is no EEPROM on the switches, so after losing power they go into learning mode and will bind to the first identifier broadcast.
Introducing a microcontroller with on-board WiFi will solve both of these problems, and also open some other interesting doors for future revisions of the project such as power consumption monitoring and reporting.