Virtual Smart Home
I know there are already some Alexa nodes available for Node-RED, but the ones I tried did not proof to be reliable or convenient enough. Hence I went all in and created virtual smart home, which consists of a Node-RED module and a corresponding Alexa skill that leverages the AWS IoT cloud as a super reliable and scalable backbone.
What is it for?
Let's say you have built some fancy automations with Node-RED, for instance a plant watering system, a smart plug, a light or even some complex routines. Great, now you can control that from within Node-RED, e.g. using the NR dashboard. But sometimes nothing beats the convenience of simply using your voice to control things. If you own an Amazon Alexa compatible device, virtual smart home is for you!
Highlights
- supports a growing set of device types
- Switch
- Plug
- Dimmable Light Bulb
- Color Changing Light Bulb
- Dimmer Switch
- Blinds
- Garage Door Opener
- no separate account needed. Just link your existing Amazon account.
- new virtual devices can simply be dragged onto the Node-RED canvas and will proactively be discovered by Alexa. No need to ask Alexa to discover devices.
- devices that are no longer needed can be removed from Alexa via the Node-RED editor.
- local state changes of devices get synchronized with Alexa
- secure communication with the IoT cloud through individually provisioned certificates
How does it work?
The node gets invoked through Amazon Alexa (either via a voice command or via the Alexa app) and outputs a msg
object containing the updated device state as payload. For example, when you say "Alexa, dim the kitchen light to 50 percent", the following msg
object will be emitted:
{
"brightness":50,
"powerState":"ON",
"source":"alexa"
}
The node also accepts incoming messages that can be used to inform Alexa about local device changes, which will then be reflected in the Alexa app. If the passthrough option is enabled, this will also trigger an outgoing message, just like when the node gets invoked via Alexa. In this case payload.source
is set to device
instead of alexa
.
Your feedback is appreciated
I've been running virtual smart home in my own home for some time now and it never let me down. But I'm sure it can get even better. Feel free to make suggestions or report problems.
Looking forward to your feedback!
Thank you!