It mostly just played music, or let the kids yell "Mameshiba" at it.
"Voice-controlled smart home!" sounds great, but replacing every appliance at once isn't happening.
So instead: capture voice commands from Amazon Echo Dot and fire them as IR signals to control home appliances.
Yes, "just buy an Alexa-compatible IR remote" is an option — ignoring that — and work toward this architecture:
Alexa voice commands are received by Node-RED running on a Raspberry Pi.
Most guides for Alexa + Node-RED use the Node-RED Alexa Home Skill Bridge, but this setup runs entirely locally without it.
After Node-RED relays the command, it's forwarded to a second Raspberry Pi that fires the IR signal.
Why a second Raspberry Pi? IR range is short, so the transmitter needs to be near the appliance.
(Update 2018/04/08)
The Roomba's remote codes couldn't be captured cleanly with the Raspberry Pi IR approach.
Reverse-engineering the codes from scratch would have been painful, so I switched to a workaround: relay via FlashAir and control the Roomba from Arduino over its serial ROI interface.
Build Plan
The parts list is short, but the architecture is fairly complex.Here's the build sequence:
- Gather parts. [This article]
- Set up Node-RED on the main Raspberry Pi and register it with Amazon Echo Dot
- Headless WiFi setup for Raspberry Pi Zero W
- Copy IR remote codes with Raspberry Pi
- Call IR functions from Node-RED to control the TV
- Control Arduino over HTTP API using FlashAir GPIO mode
- (Bonus) Control Roomba from Arduino via ROI serial interface
- Control Roomba from Arduino via IR
- Control Roomba from Node-RED via FlashAir/Arduino
Here's the finished result:
Alexa + Raspberry Pi (Node-RED) + FlashAir + Arduino + Roomba.
Alexa + Raspberry Pi (Node-RED) + IR + TV.
Parts
Let's gather the parts.
This is less about electronics and more about device integration.
Amazon Echo Dot
Check on Amazon Feels a bit dumber than Google Home or Siri, but that's fine.Raspberry Pi 3 Model B
Check on Amazon Model 3 isn't required — any model that connects to the network works.See my earlier post on Raspberry Pi setup.
Check on Amazon Raspberry Pi Zero W — used for the appliance-side transmitter since it's small and unobtrusive.
A case like this makes it look clean.
Since you'll need to attach an IR LED, a version with pre-soldered pin headers saves time.
IR LED and IR Receiver Module
Check on Amazon (IR LED) Check on Amazon (IR Receiver)You need one IR LED per Raspberry Pi Zero W, but only one receiver for the whole project.
You can use bare IR LEDs, but they require a resistor and other components, which gets messy.
Using a module keeps things compact — recommended.
The receiver is only needed temporarily, so bare component or module — either is fine.
Arduino Pro Mini
Check on Amazon Used to control the Roomba via its serial port interface.Any Arduino works, but the Pro Mini is cheap and small.
Note: Pro Mini has no USB port, so you'll need an FTDI serial adapter to program it from a PC.
FlashAir (W-02 or later)
Check on Amazon Used to add wireless connectivity to the Arduino.Storage isn't used, so capacity doesn't matter.
W-02 or later is required for GPIO mode (firmware update needed, but older models work).
Next article: starting the actual build.

No comments:
Post a Comment