Skip to content

Commit 2bbebd1

Browse files
committed
feat(readme): Improve readme.md
1 parent e73fc41 commit 2bbebd1

1 file changed

Lines changed: 144 additions & 72 deletions

File tree

readme.md

Lines changed: 144 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,72 @@
11
# Virtual Smart Home (VSH)
22

3-
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.
66

77
![Examples](./img/examples.png)
88

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
4867
{
4968
"topic": "home/kitchen/lights",
50-
"metadata": { "foo": "bar"},
69+
"metadata": { "foo": "bar" },
5170
"payload": {
5271
"brightness": 50,
5372
"powerState": "ON",
@@ -59,45 +78,98 @@ kitchen light to 50 percent," the emitted `msg` object would be as follows:
5978
}
6079
```
6180

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.
66104

67105
Please ensure that your setup does not send too many messages to Alexa. Otherwise you risk getting your account blocked.
68106

69-
## Availability
107+
## 🌍 Availability
108+
109+
The _Virtual Smart Home_ Alexa skill is available in the following regions:
110+
111+
- [🇺🇸 US](https://www.amazon.com/dp/B08JV9RT7H)
112+
- [🇬🇧 UK](https://www.amazon.co.uk/dp/B08JV9RT7H)
113+
- [🇨🇦 Canada](https://www.amazon.ca/dp/B08JV9RT7H)
114+
- [🇦🇺 Australia](https://www.amazon.com.au/dp/B08JV9RT7H)
115+
- [🇮🇳 India](https://www.amazon.in/dp/B08JV9RT7H)
116+
- [🇩🇪 Germany](https://www.amazon.de/dp/B08JV9RT7H)
117+
- [🇫🇷 France](https://www.amazon.fr/dp/B08JV9RT7H)
118+
- [🇮🇹 Italy](https://www.amazon.it/dp/B08JV9RT7H)
119+
- [🇧🇷 Brazil](https://www.amazon.com.br/dp/B08JV9RT7H)
120+
- [🇪🇸 Spain](https://www.amazon.es/dp/B08JV9RT7H)
70121

71-
The _virtual smart home_ skill is available in the Amazon skill stores in the following locales:
122+
## 🚀 Setup Instructions
72123

73-
- [English (AU)](https://www.amazon.com.au/dp/B08JV9RT7H)
74-
- [English (CA)](https://www.amazon.ca/dp/B08JV9RT7H)
75-
- [English (GB)](https://www.amazon.co.uk/dp/B08JV9RT7H)
76-
- [English (IN)](https://www.amazon.in/dp/B08JV9RT7H)
77-
- [English (US)](https://www.amazon.com/dp/B08JV9RT7H)
78-
- [French (FR)](https://www.amazon.fr/dp/B08JV9RT7H)
79-
- [German (DE)](https://www.amazon.de/dp/B08JV9RT7H)
80-
- [Italian (IT)](https://www.amazon.it/dp/B08JV9RT7H)
81-
- [Portuguese (BR)](https://www.amazon.com.br/dp/B08JV9RT7H)
82-
- [Spanish (ES)](https://www.amazon.es/dp/B08JV9RT7H)
124+
Get up and running with Virtual Smart Home in just a few minutes.
83125

84-
## Setup Instructions
126+
---
85127

86-
### In the Alexa app
128+
### 🔊 Step 1: Enable the Alexa Skill
87129

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.
90133

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+
```
92144

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).
152+
- Choose a **device type** (e.g., dimmable light, switch, thermostat, etc.).
153+
154+
4. **Link Your Amazon Account**
155+
- Click the **pen icon** next to the `Connection` field.
156+
- This step is required **once per Amazon account**.
157+
- Use the **same Amazon account** you used to enable the skill.
158+
159+
5. **Deploy Your Flow**
160+
- Click **Deploy** in Node-RED.
161+
- Alexa will automatically discover your new virtual device.
162+
- If Alexa app notifications are enabled, you’ll even get a push notification.
163+
164+
6. **Try It Out!**
165+
Say something like:
166+
> _“Alexa, turn on kitchen light”_
167+
- Check the output in the debug node to see what Alexa sent.
168+
- Use the output to control your real devices, trigger flows, or send MQTT messages.
169+
170+
7. **Removing Devices**
171+
- Simply delete the virtual device node from your flow.
172+
- After redeploying, the corresponding Alexa device will be removed automatically.
101173

102174
## Docs
103175

0 commit comments

Comments
 (0)