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:
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.
Hi linking was quick and easy.
The devices are not auto discovered, Have not asked alexa to discover as yet, giving it some time to auto find.
edit/ ok working.
Would be nice if the msg contained the name of the switch
i.e.
Because via the link provided
.................................................
The connection must be linked to the same Amazon Alexa account that was / will be used to activate the 'virtual smart home' skill.
Go to https://amazon.com/de/code on your smartphone, computer, or tablet and enter this code after loggin in:
................................
I need to login with my amazon.com account but my devices are not in this account.
I have an amazon.de account.
Amazon account identities are global, so you should be able to login at https://www.amazon.com/us/code with your German account credentials. Have you tried it?
yes and it did not work.
I have the same email adresse for both accounts but different passwords.
And when i want to use the password for my amazon.de account it tells me wrong password.
And when i login with my password for the amazon.com account it works, but there are no alexa devices registerd.
Hi, i created a new Amazon account at amazon.de and can now login at amazon.com with the same login data.
I created one flow in node red with a virtual switch and connected it via the link and the code.
It seems to be online but the alexas registered at the new account didnt find a new device.
Just to be sure: You activated the "virtual smart home" skill via the Alexa app and completed the account linking process there with the very same Amazon account? Did the account linking go through successfully? What does Alexa respond when you ask her to switch "teestatsestas" on?
P.S. You seem to be running a rather old Node-RED version (1.0.0-beta.2). In order to eliminate as many sources of failure as possible, you might want to upgrade to NR v.1.2.2.
So i tested a few funktions.
About the blind, i the app i can only close and open the blinds.
But it would also be a very good option to go to percentege.
see the links
Using an RGB lamp bulb, if the lamp is off and I ask Alexa "set lamp to Red" the powerState value transmitted by the node remains OFF, so the lamp does not turn on