# \[ANNOUNCE\] node-red-contrib-virtual-smart-home for Alexa

**URL:** <https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353>\
**Category:** Share Your Nodes\
**Created:** [16 October 2020 15:07 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353 "2020-10-16T15:07:20Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![sneakynuts](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@sneakynuts](https://discourse.nodered.org/u/sneakynuts)\
**Post date:** [2 December 2020 03:51 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/41 "2020-12-02T03:51:47Z")

</div>

I have just come across this node, and so far works well to use for room awareness.  
With the garage door opener, is it a limitation of alexa that you need to say "turn on/off" rather than "open/close" ??

---

<div class="post-metadata">

**Author:** ![lius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lius/32/12679_2.png) [@lius](https://discourse.nodered.org/u/lius)\
**Post date:** [2 December 2020 07:27 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/42 "2020-12-02T07:27:43Z")

</div>

Strange behaviour indeed.

The implementation follows this [template](https://developer.amazon.com/en-US/docs/alexa/smarthome/get-started-with-device-templates.html#garage-door) and should accept "open" / "close". Not sure why it doesn't seem to work properly.

---

<div class="post-metadata">

**Author:** ![dougle03](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dougle03/32/32979_2.png) [@dougle03](https://discourse.nodered.org/u/dougle03)\
**Post date:** [2 December 2020 09:54 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/43 "2020-12-02T09:54:28Z")

</div>

Is there any other way to use this integration without handing over my Amazon password?  
Not that I think for min there is anything nefarious going on, but I'm generally wary of handing over passwords into software. Is there an option for a token perhaps?  
Thanks

---

<div class="post-metadata">

**Author:** ![lius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lius/32/12679_2.png) [@lius](https://discourse.nodered.org/u/lius)\
**Post date:** [2 December 2020 11:33 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/44 "2020-12-02T11:33:47Z")

</div>

You are not handing over your Amazon credentials! To use the "virtual smart home" package, you need to

- enable the "virtual smart home" skill in the Alexa app. The login page shown during that process is coming from Amazon and your password never leaves Amazon servers.
- link the "virtual smart home" connection to your Amazon identity. This is done by entering a temporary code into an [Amazon owned page](https://amazon.com/us/code). Again, your password never leaves Amazon servers.

When you complete the account linking process, a shadow account is created for you in the backend which refers to your Amazon account identifier (e.g. "amzn1.account.BH3B0LFGZBDIGM267MZ3...."). When you instruct Alexa to control a virtual device, Amazon invokes the vsh backend with an access token. The backend then fetches your account identifier from Amazon by providing that token. It then forwards the desired device state change to your device, which is also linked to your Amazon identity.

---

<div class="post-metadata">

**Author:** ![sneakynuts](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@sneakynuts](https://discourse.nodered.org/u/sneakynuts)\
**Post date:** [2 December 2020 12:34 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/45 "2020-12-02T12:34:18Z")

</div>

Not sure  
She just tells me that "this device doesn't support that" when i say "open/close"  
But it does work work i say turn "on/off"

Ill have another play another day!

---

<div class="post-metadata">

**Author:** ![123](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/123/32/2926_2.png) [@123](https://discourse.nodered.org/u/123)\
**Post date:** [2 December 2020 14:52 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/46 "2020-12-02T14:52:05Z")

</div>

Could someone explain the difference between this and [https://flows.nodered.org/node/node-red-contrib-alexa-remote2](https://flows.nodered.org/node/node-red-contrib-alexa-remote2)?

Specifically, what advantages does virtual-smart-home for Alexa offer compared to alexa-remote2?

I've been using alexa-remote2 for several months. The main drawback is the method it employs to authenticate with Amazon. Under certain conditions the token can become invalid and you have to re-authorize it (a manual process). It happens far less frequently than when I first started with it but it remains its Achilles heel. I created a means of detecting the loss of authentication so I can be notified when it occurs (better than nothing). The other deficiency is, other than a handful of examples, it's undocumented.

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [2 December 2020 15:15 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/47 "2020-12-02T15:15:13Z")

</div>

remote2 is a general purpose node - I use it for non-standard stuff where the Alexa query is complex or where I want to customise the response that Alexa gives to requests

As, you mentioned - it not 100% reliable but its very powerful

This node is a straight forward way of turning stuff on or off or changing its colour or level from 0 -100.

Its more reliable

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [2 December 2020 16:28 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/48 "2020-12-02T16:28:30Z")

</div>

In simple terms, Virtual smart home create virtual alexa device that you can use to control other things, i.e turn on tasmota devices or any thing you wish.  
Alexa remote2 can be used to send tts messges, control devices connected to alexa, query alexa for state, volume, etc or add edit notifications, alarms and reminders. Plus alot more.

---

<div class="post-metadata">

**Author:** ![123](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/123/32/2926_2.png) [@123](https://discourse.nodered.org/u/123)\
**Post date:** [2 December 2020 17:26 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/49 "2020-12-02T17:26:00Z")

</div>

My mistake; I should have been more specific when I inquired about its advantages. I realize alexa-remote2 exposes more of the Alexa API than virtual-smart-home.

For the features that both have _in common_ (controlling devices) what are virtual-smart-home's advantages?

Also, is anyone running both? I'm trying to understand if its advantages are worth the effort of shifting the control of devices away from alexa-remote2 (yet continue to use it for other things such as TTS).

> [@E1cid](#):
>
> you can use to control other things, i.e turn on tasmota devices or any thing you wish.

I currently use emulated Hue so it sounds like virtual-smart-home could replace it.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [2 December 2020 17:29 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/50 "2020-12-02T17:29:37Z")

</div>

> [@123](#):
>
> controlling devices

virtual smarthome does not control alexa devices, it creates virtual ones.

They both do different things alexa remote2 does not create virtual devices, it control devices connected to alexa.

Emulated hue is faster as it is local.

I use Smart home for things emulated hue can not do, as it just does switches binary dimmer and rgb

---

<div class="post-metadata">

**Author:** ![seaverd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seaverd/32/35210_2.png) [@seaverd](https://discourse.nodered.org/u/seaverd)\
**Post date:** [4 December 2020 13:58 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/51 "2020-12-04T13:58:24Z")

</div>

Is anyone using this with Homeassistant? If so, I would love to see an example flow.

I currently use the node-red-contrib-amazon-echo palette and in the node there is a field called topic where I am able to insert the entity id of the device that I am looking to control in home assistant.

From there I use a change node (which actually takes the topic and changes it to msg.payload.data.entity\_id as well as some other changes) to get everything formatted for passing a payload to homeassistant to carryout the action.

Is this something you would consider adding? Let me know if you need additional information.

---

<div class="post-metadata">

**Author:** ![lius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lius/32/12679_2.png) [@lius](https://discourse.nodered.org/u/lius)\
**Post date:** [4 December 2020 14:33 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/52 "2020-12-04T14:33:45Z")

</div>

> [@seaverd](#):
>
> Is this something you would consider adding?

Yeah, sounds like a good suggestion as it follows Node-RED practices.

In the meantime you could just put a change node behind the vsh node to set the topic, right?

---

<div class="post-metadata">

**Author:** ![seaverd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seaverd/32/35210_2.png) [@seaverd](https://discourse.nodered.org/u/seaverd)\
**Post date:** [4 December 2020 16:08 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/53 "2020-12-04T16:08:18Z")

</div>

Yes, I can do that but it would require a custom change node for every virtual smart home node. Having the ability to have it in the same node where I am establishing the alexa name somewhat simplifies things as I could use one change node for all my virtual smart home nodes.

Thank you for considering this addition!

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [13 December 2020 10:13 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/55 "2020-12-13T10:13:49Z")

</div>

How do I get back to the previous version, as I've installed v1.12.0 and now I get a message when Node-RED starts saying... "Waiting for missing types to be registered" ??

Thanks - from David

[Edit] I think I've sorted it by using...  
npm install node-red-contrib-virtual-smart-home@1.11.0

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [13 December 2020 10:18 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/56 "2020-12-13T10:18:21Z")

</div>

I think I've sorted it by using...  
npm install node-red-contrib-virtual-smart-home@1.11.0

---

<div class="post-metadata">

**Author:** ![lius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lius/32/12679_2.png) [@lius](https://discourse.nodered.org/u/lius)\
**Post date:** [13 December 2020 10:18 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/57 "2020-12-13T10:18:33Z")

</div>

I'm investigating this problem. In the meantime I've reverted the version back to v.1.11.0. Due to caching it might take a few minutes for this change to be reflected in the palette manager. Sorry for the inconvenience.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [13 December 2020 10:20 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/58 "2020-12-13T10:20:18Z")

</div>

Thanks for your swift response.

---

<div class="post-metadata">

**Author:** ![lius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lius/32/12679_2.png) [@lius](https://discourse.nodered.org/u/lius)\
**Post date:** [13 December 2020 12:12 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/59 "2020-12-13T12:12:40Z")

</div>

So, that nasty bug has been squashed and **VSH v1.12.1 is now generally available**.

Updating is strongly encouraged as it brings significant performance improvements (e.g. reducing the number of messages sent to the backend).

---

<div class="post-metadata">

**Author:** ![lius](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/lius/32/12679_2.png) [@lius](https://discourse.nodered.org/u/lius)\
**Post date:** [13 December 2020 17:38 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/60 "2020-12-13T17:38:41Z")

</div>

> [@andreanilorenzo](#):
>
> Directive is "SetColor" instead of "TurnOff"

Hi there, can you please check if the problem still exists in v1.12.1? Thank you!

---

<div class="post-metadata">

**Author:** ![andreanilorenzo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andreanilorenzo/32/32325_2.png) [@andreanilorenzo](https://discourse.nodered.org/u/andreanilorenzo)\
**Post date:** [13 December 2020 22:46 UTC](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353/61 "2020-12-13T22:46:16Z")

</div>

Hi,  
now the "Color Changing Light Bulb" node does not return any messages.

If I say Alexa, turn on Led / Alexa Led Blue / Alexa turn off Led  
nothing happens, the node is mute

The other nodes (plugs, switches, dimmers, etc.) instead work

[Previous page](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353.md?page=2)

[Next page](https://discourse.nodered.org/t/announce-node-red-contrib-virtual-smart-home-for-alexa/34353.md?page=4)
