Building an Alexa-Powered Electric Blanket
One evening, my wife turned to me in bed and said, "Winter is coming..."
Well, what she actually said was "Get your frozen feet away from me, you cold-blooded monster!"
The only way to save our marriage? HOOK OUR BED UP TO THE INTERNET!
I couldn't find an electric blanket with IoT connectivity - so I built my own.
Why?
As a person with cold feet, I want to yell at my robot servant to pre-heat the bed, so that it is toasty warm by the time I've finished my evening ablutions.
The Blanket
The key was finding a blanket with dual-controls, which also could turn on from the plug socket. Lots of blankets have a separate control unit. I found this one which started heating as soon as it received power from the plug.
I'm sure there are many different models available. Choose whichever one suits your needs, but make sure it defaults to "on".
Cost: £70 from Amazon
The Plug
My side of the bed is controlled by a Meross smart plug.
Pretty simple. Plug in, use the app to configure the WiFi. Done. It can now be controlled by a smartphone.
Cost: £15 on Amazon
The Other Plug
I had a Sonoff S20 smart plug laying around. It's an older model - but still works.
Again, use the app to configure. Only takes a few minutes.
Cost: £10 on Amazon
Alexa
Configuring an Alexa for a smarthome used to be a pain - but it is much improved. Once the "Skills" are installed for your plug sockets, the individual smart things can be renamed and configured. Still takes a little bit of time, but fairly simple.
I've set up a group called "Electric Blanket". It contains both plugs.
I've given a unique name to each side of the blanket.
For some reason, Alexa thinks the Meross is a switch and the Sonoff is a plug. What's the difference? Who knows!
I can say "Alexa, switch on the electric blanket" or "switch on Liz's side of the bed." But that's about the limit.
Cost: £25 on Amazon
In Action
It works!
It doesn't quite work
There are some flaws in my plan.
Alexa doesn't recognise voices. So I can't say "Turn on my side of the bed" and my wife can't say "turn on his side of the bed." As I've said before, voice interfaces are like the command-line. There's no room for error.
Secondly, the electric blanket automatically shuts off after an hour - but the plug socket stays live. In order to turn on the blanket again, I need to turn it off first. There is no way to tell Alexa to switch on a socket for an hour and then switch it off. So there are two possible solutions:
- Set up a schedule in the plug's app to automatically turn off the plug at, say, 10 AM.
- Every time we want to use the blanket, tell Alexa to turn it off first.
Neither of those are particularly satisfactory.
There's also the minor risk that attackers could break through my firewall and burn down my house. WONTFIX
.
Conclusion
For around £100 you can self-built an IoT heated blanket. It mostly works. This will save your marriage, 100% guaranteed.
Alex says:
Thanks, definitely a project I need to undertake.
For the shutoff problem, could you modify the "turn on" command to turn it on with an hour timer so the plug control mirrors the blanket's underlying behaviour?
Tony says:
IFTTT with timer to turn off (x) minutes after it's turned on. It'll always be ready for the next on command.
Alexander Swensen says:
Nice idea for a project!
I have opted to use Home Assistant (https://www.home-assistant.io) along with an alexa integration for most of my home automation. I am sure this would do most of what you want (assuming there is compatible support for your smart-switches). I can already think of a case where you could use Home Assistant to set a timer once you turn on the blanket that would turn it off after a pre-set amount of time.
Col. Panek says:
I've not seen a blanket with 2 separate power feeds in the USA. Some hacking and rewiring would be needed on ours.
@edent says:
Please do not rewire your electrics! That is a dangerous idea. Get a qualified electrician to do it - or find a reputable supplier of dual control blankets.
Quentin Stafford-Fraser says:
A belated comment to this post, but yes, I agree with Alexander about Home Assistant. I resisted for a while but have now become completely hooked.
You can also re-flash all of the Sonoff devices with the excellent Tasmota Open Source firmware, which lets you do a variety of nice things with open standards (MQTT, HTTP) etc and also frees you from dependence on a Chinese web service. You would then need to make use of something like Home Assistant if you wanted to get Alexa integration back, though.
NatalyaD said on disabled.social:
@Edent We have the same except no IoS cos resident geek has set up MQTT network and smartplugs and coded some interface stuff for it.
We were early home automation adoptees due to me being deaf and an inaudible student house doorbell and it's just grown ever since, like these things do...
Jonty Wareing said on chaos.social:
@Edent We have an actual IoT electric blanket - a Beurer Konnect.
I thought it would be a gimmick, but it's actually turned out to be really useful as you can set schedules, and my partner loves that you can turn it on remotely to pre-heat the bed.
I've partially reversed engineered the protocol and keep forgetting to finish that project...
Paul Leader said on hachyderm.io:
@Edent Aha! I've been wracking my brains for a christmas present for my wife (we are both really hard to buy for) and a heated blanket would be perfect. I have some spare Hive sockets so I should be able to set it up like this too.
Olly Maunder said on mastodon.green:
@Edent I was going to do the same thing with Home Assistant. But failed at the electric blanket research stage, so thanks for that