
Building an Alexa-Powered Electric Blanket - edent
https://shkspr.mobi/blog/2018/11/building-an-alexa-powered-electric-blanket/
======
mike-cardwell
My electric blanket is plugged into a z-wave mains adapter and I have a usb
stick (z-stick) in my home server which controls my z-wave devices. I have a
small bash script to turn it on/off. It's a bit cold this time of year so I
like to have my blanket come on a few times as I wake up to give me a bit of a
boost. Here are my cron jobs on my home server:

    
    
      # Weekday morning blanket schedule
      # 4 min boost before lighting schedule begins
      46      7 * * 1-5 blanket on for 4 minutes &>/dev/null
      # 2 min boost before first smart-watch alarm
      58      7 * * 1-5 blanket on for 2 minutes &>/dev/null
      # 2 min boosts before each subsequent smart-watch alarm
      8-38/10 8 * * 1-5 blanket on for 2 minutes &>/dev/null
    

My main bedroom light bulb is z-wave also. I have a similar system to make the
light slowly come on in the morning as I wake up. The cron:

50 7 * * 1-5 for n in $(seq 1 99); do light $n; sleep 30; done; sleep 270; for
n in $(seq 98 -1 0); do light $n; sleep 2; done

I also have OpenHab on my server so I can manually control the blanket and
lights from both my Android phone and also my Pebble Watch.

~~~
edent
That's pretty nifty. I did look at a cron - but I'm often out of the house and
don't want the energy being wasted.

I'm curious how you cope in that situation? Just SSH in a temporarily stop it?

~~~
mike-cardwell
If I'm going on holiday or away for a few days or whatever, I disable the cron
jobs. If we're just talking the odd day here and there where I'm not at home
for random reasons or not following my typical schedule, I don't worry about
the waste. The amount of electricity involved is so low, we're talking about
pennies.

------
oulipo
Hi! This is a really cool project! If you care about your privacy in the
bedroom, you should take a look at what we are building at
[https://snips.ai](https://snips.ai) (disclaimer: I'm a co-founder)

We do the first 100% on-device and private-by-design Voice AI platform which
you can use for free and run on a Raspberry Pi, to make it possible to use
your blanket without sharing your bedtime secrets with Amazon ;)

~~~
edent
Thanks - glad you enjoyed it. If you have any review units, I'd be happy to
have a play and blog my experiences. My contact details are in my profile

~~~
oulipo
The platform itself is freely downloadable, and if you want a Raspberry Pi
with a microphone to test it easily, you can get one from

[https://makers.snips.ai](https://makers.snips.ai)

------
setquk
I’m more surprised that people still use electric blankets. Utterly dangerous
things. Now you can connect your state of the art 1950s tech to the cloud.

~~~
pbhjpbhj
Can you explain the main risks you see?

[https://www.electricblanketfires.com/electric-blanket-
fire-s...](https://www.electricblanketfires.com/electric-blanket-fire-stats/)
suggests that the primary issue is user error.

Are hot water bottles better? What other affordable means are there to easily
warm a cold bed?

~~~
setquk
Yes the heating elements are flexible and are easy to damage and they carry
current at mains potential. Neither of those outcomes favour failing safe.
Even the best quality unheated wires carrying current don't last that long
mechanically speaking. Add heat and the decay happens quicker.

Humans are pretty good at warming a cold bed. Sucks for the first ten minutes
though.

------
yitchelle
Kinda click bait title. The project actually integrates the smart power plug
to Alexa, which the electric blanket is powered from. The electric blanket is
used without any changes to it.

------
falcolas
That's a lot of work to avoid buying an electric blanket with a timer. I mean,
it's cool and all, but I would hope the lessons learned were worth the effort.

~~~
readams
Electric blankets don't have timers to turn on. My understanding is that UL
won't certify them as it's a perceived fire hazard.

~~~
noobiemcfoob
"perceived"? It _is_ a fire hazard.

~~~
dzhiurgis
But how? To me it sounds like a safety feature.

------
dreta
i don't understand why anybody, especially a person with technical knowledge,
would purchase and install a device that constantly listens to its
surroundings and uploads conversations to the internet

it's scary what a third party can do through your smartphone, let alone all
the IoT garbage connected to an Echo

------
k__
Funny idea, but I still didn't see any reasonable use-case for Alexa.

~~~
pp19dd
I didn't either until I tried a few things; got a cube for streaming and it
was obviously built-in. With a couple of power controllers ($10) it turned
into a few practical things. First, I immediately changed that "Alexa" command
into "computer."

"Computer, lights" \- turns on lamps behind the couch. Better than craning my
neck and struggling to find that cheap push-pin switch on a scary fragile
glass lamp x 2.

"Computer, pause" \- when my hands are coated in layers of an escaped burrito
and I need few more ice cream scoops of congealed vegetables and cheese in my
maw.

"Computer, set timer for 20 minutes" \- for the bread baking, because I
already used both microwave and oven timers for rice and vegetables.

"Computer, convert 1 liter to cups" \- because imperial units and surprise
recipe.

"Computer, switch inputs" \- when I want to watch cable. Of course, I have to
say it four times rapidly because of an awkward Sharp TV.

This one is a bonus feature, but I can say "computer" with a fake British
accent and it still works.

~~~
criddell
You can also set multiple timers on the Echo by giving them names.

"Computer, set a 20 minute timer for rice"

"Computer, set a 10 minute timer for vegetables"

Then you can query it:

"Computer, how much time is left on my rice timer?"

~~~
pp19dd
That's better than my hamfisted example, or use. Though I did forget couple of
other really useful features.

"Computer, add nitrile gloves to shopping list."

(Shopping list goes to a phone app, just a simple list with checkmarks, not to
be confused with purchasing something from Amazon.)

------
cwt137
I'm looking for something similar where I can control the temp. (so it heats
or cools) a blanket or pad

~~~
jfim
There's chili pad, although it's somewhat expensive.

~~~
cwt137
What is it called?

------
orthecreedence
It's not bad enough Alexa is in your home listening to everything you say? You
need to be wrapped in an Alexa-powered blanket? Jesus, how much fucking closer
to 1984 can we get? The only difference is we WELCOME these devices into our
home, there's not even some totalitarian regime forcing it on us. All so we
can get the weather with a voice command (as if looking out the god damn
window or flicking on a light switch is some horrible ordeal).

What's next, Alexa-powered ASMR...get lulled to sleep as an AI-generated voice
whispers to you all the holiday deals you'll have waiting for you when you
wake up? I wonder what else it will whisper once you're fast asleep.

If you must have the convenience, at least ditch the cloud and run your smart
home entirely on your LAN.

~~~
dang
Please don't post predictable/indignant rants about someone's whimsical side
project. That's against the spirit of this site, despite how you and I dare
say most people here feel about IoT and privacy.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

