You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Node-RED node that represents a virtual smart home device which can be controlled via
4
-
Amazon Alexa. Requires the '_virtual smart home_' skill to be enabled for your
5
-
Amazon account.
3
+
**Do stuff in Node-RED with Amazon Alexa – no custom hardware, no separate accounts, no hassle.**
4
+
5
+
**Virtual Smart Home (VSH)** is a powerful Node-RED node that lets you create virtual smart home devices directly on your flow canvas. These devices integrate natively with Amazon Alexa using the [_Virtual Smart Home_ skill](https://www.amazon.com/dp/B08Q7BNKWG), allowing you to control and automate your home like never before.
6
6
7
7

8
8
9
-
## Highlights
10
-
11
-
- supports a growing set of device types
12
-
- Blinds
13
-
- Color Changing Light Bulb
14
-
- Contact Sensor
15
-
- Dimmable Light Bulb
16
-
- Dimmer Switch
17
-
- Doorbell Event Source
18
-
- Entertainment Device
19
-
- Fan
20
-
- Garage Door Opener (en-US locale only)
21
-
- Lock
22
-
- Motion Sensor
23
-
- Plug
24
-
- Scene
25
-
- Switch
26
-
- Temperature Sensor
27
-
- Thermostat (Single-setpoint)
28
-
- Thermostat (Dual-setpoint)
29
-
- no separate account needed. Just link your existing Amazon account.
30
-
- new virtual devices can simply be dragged onto the Node-RED canvas and will
31
-
proactively be discovered by Alexa. No need to ask Alexa to discover devices.
32
-
- devices removed from the Node-RED canvas will also be removed from Alexa. Orphaned
33
-
devices can also be manually removed from Alexa via the Node-RED editor.
34
-
- changes made to virtual device types and names will immediately be picked up by Alexa.
35
-
- local state changes of devices (e.g. thermostat values) get synchronized with Alexa
36
-
- secure communication with the IoT cloud through individually provisioned
37
-
certificates
38
-
39
-
## What it does
40
-
41
-
This node is triggered by Amazon Alexa, either through a voice command or the Alexa app,
42
-
resulting in the generation of a `msg` object that carries the updated device state as its
43
-
payload. This msg can be harnessed to perform practical actions, such as controlling
44
-
physical devices connected to Home Assistant. For instance, if you say, "Alexa, dim the
45
-
kitchen light to 50 percent," the emitted `msg` object would be as follows:
46
-
47
-
```JSON
9
+
---
10
+
11
+
## ✨ Why Choose VSH?
12
+
13
+
- 🧱 **Drag & Drop Simplicity**
14
+
Add new virtual devices in Node-RED and they instantly appear in Alexa — no discovery phrase needed.
15
+
16
+
- ❌ **No Extra Accounts**
17
+
Just link your Amazon account. No extra sign-ups, no cloud dashboards to manage.
18
+
19
+
- 🔄 **Live Sync with Alexa**
20
+
Rename or change device types, and Alexa reflects the changes in real time.
21
+
22
+
- 🔐 **Secure by Design**
23
+
Communicates via individually provisioned certificates using a secure cloud connection.
24
+
25
+
- 🔁 **Two-Way Sync**
26
+
Push updates from Node-RED to Alexa — perfect for keeping things in sync when local changes happen.
27
+
28
+
- 🧹 **Automatic Cleanup**
29
+
Remove devices from Node-RED and they're automatically removed from Alexa, too. Orphaned devices? Clean them up easily in the editor.
30
+
31
+
---
32
+
33
+
## 🚀 Supported Device Types
34
+
35
+
VSH supports a growing range of Alexa-compatible devices:
36
+
37
+
- Blinds
38
+
- Color Changing Light Bulb
39
+
- Contact Sensor
40
+
- Dimmable Light Bulb
41
+
- Dimmer Switch
42
+
- Doorbell Event Source
43
+
- Entertainment Device
44
+
- Fan
45
+
- Garage Door Opener _(en-US only)_
46
+
- Lock
47
+
- Motion Sensor
48
+
- Plug
49
+
- Scene
50
+
- Switch
51
+
- Temperature Sensor
52
+
- Thermostat (Single- and Dual-Setpoint)
53
+
54
+
---
55
+
56
+
## ⚙️ How It Works
57
+
58
+
VSH connects Alexa voice commands to your smart home flows in Node-RED.
59
+
60
+
For example, when you say:
61
+
62
+
> _"Alexa, dim the kitchen light to 50 percent"_
63
+
64
+
The node emits a `msg` object like this:
65
+
66
+
```json
48
67
{
49
68
"topic": "home/kitchen/lights",
50
-
"metadata": { "foo": "bar"},
69
+
"metadata": { "foo": "bar"},
51
70
"payload": {
52
71
"brightness": 50,
53
72
"powerState": "ON",
@@ -59,45 +78,98 @@ kitchen light to 50 percent," the emitted `msg` object would be as follows:
59
78
}
60
79
```
61
80
62
-
The node also accepts inbound messages that can be used to inform Alexa about
63
-
local device changes, which will then be reflected in the Alexa app. If the
64
-
passthrough option is enabled, this will also trigger an outbound message, just
65
-
like when the node gets invoked via Alexa. In this case `payload.source` is set to `device` instead of `alexa`. If the inbound message has a `topic` attribute, its value will be present in the outbound msg instead of the topic configured in the editor.
81
+
You can use this `msg` to control physical devices — for example, via MQTT or Home Assistant.
82
+
83
+
And it works both ways: Send a `msg` into the node to update Alexa with local state changes. If passthrough is enabled, Alexa gets updated and an outbound message is sent too (`payload.source = "device"`).
84
+
85
+
---
86
+
87
+
## 🧠 Ideal For
88
+
89
+
- Home automation enthusiasts who want voice control without cloud lock-in
90
+
- Developers building custom smart home flows
91
+
- Anyone who uses Node-RED and Alexa together
92
+
93
+
---
94
+
95
+
## 📦 Get Started
96
+
97
+
Install from the Node-RED palette or via npm:
98
+
99
+
```bash
100
+
npm install node-red-contrib-virtual-smart-home
101
+
```
102
+
103
+
Then enable the [_Virtual Smart Home_ Alexa Skill](https://www.amazon.com/dp/B08Q7BNKWG) and link your account.
66
104
67
105
Please ensure that your setup does not send too many messages to Alexa. Otherwise you risk getting your account blocked.
68
106
69
-
## Availability
107
+
## 🌍 Availability
108
+
109
+
The _Virtual Smart Home_ Alexa skill is available in the following regions:
Get up and running with Virtual Smart Home in just a few minutes.
83
125
84
-
## Setup Instructions
126
+
---
85
127
86
-
### In the Alexa app
128
+
### 🔊 Step 1: Enable the Alexa Skill
87
129
88
-
1. Search the skill store for the `virtual smart home` skill and enable it.
89
-
2. Complete the account linking process by logging in with your Amazon account credentials.
130
+
1. Open the **Alexa app** on your phone or go to the [Alexa Skill Store](https://www.amazon.com/dp/B08Q7BNKWG).
131
+
2. Search for the **"Virtual Smart Home"** skill.
132
+
3. Tap **Enable** and complete the account linking using your Amazon credentials.
90
133
91
-
### In Node-RED
134
+
---
135
+
136
+
### 🧱 Step 2: Set Up in Node-RED
137
+
138
+
1.**Install the VSH Node**
139
+
Add VSH to your Node-RED environment, either from the Node-RED palette or via npm:
140
+
141
+
```bash
142
+
npm install node-red-contrib-virtual-smart-home
143
+
```
92
144
93
-
1. Install the `node-red-contrib-virtual-smart-home` module.
94
-
2. Place a `virtual device` node onto the canvas and connect it to a debug node.
95
-
3. Double-click on the virtual device node to enter a name and select a device type. Once set up, you can use this name to control the device via Alexa.
96
-
4. Configure a new `vsh-connection` by clicking the pen icon. (Only needed _once_ for each Amazon account).
97
-
5. Follow the instructions to complete the account linking process. Make sure you use the same Amazon account credentials as above.
98
-
6. Deploy your Node-RED flow. This will trigger your virtual device to be discovered by Alexa. You should even get a push notification via the Alexa app (if notifications are enabled).
99
-
7. You should now be able to control your virtual device with your voice, e.g., by saying "Alexa, turn xxx on". Inspect the output of the connected debug node and consult the docs to do something useful.
100
-
8. Once you remove virtual devices from the canvas (and redeploy your flows), those devices will also be removed from Alexa.
145
+
2.**Add a Virtual Device**
146
+
- Drag a `virtual device` node onto your flow.
147
+
- Connect it to a `debug` node to inspect the output.
148
+
149
+
3.**Configure the Device**
150
+
- Double-click the virtual device node.
151
+
- Enter a **name** (this will be the Alexa device name).
0 commit comments