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

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" ??

Strange behaviour indeed.

The implementation follows this template and should accept "open" / "close". Not sure why it doesn't seem to work properly.

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

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

1 Like

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!

Could someone explain the difference between this and 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.

1 Like

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

2 Likes

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.

2 Likes

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

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

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

1 Like

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.

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?

1 Like

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!

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

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

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.

Thanks for your swift response.

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

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

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