Building an Alexa-Powered Electric Blanket

by @edent | # # # # | 5 comments | Read ~3,376 times.

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.

An electric blanket.

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.
Pair of plug sockets.

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.

A schematic of a smart plug.

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.
Electric blanket showing in Alexa's settings screen.

I've given a unique name to each side of the blanket.

Alexa settings screen showing Terry's bed and Liz's bed.

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:

  1. Set up a schedule in the plug's app to automatically turn off the plug at, say, 10 AM.
  2. 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.

Support this blog

Enjoyed this blog post? You can say thanks to the author in the following ways:

Donate to charity
Give to charity.
Buy me a birthday present
Amazon Wishlist
Get me a coffee
Donate on Ko-Fi.

5 thoughts on “Building an Alexa-Powered Electric Blanket

  1. 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?

  2. 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.

  3. 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.

  4. 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.

    1. @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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.