Items file and Virtual Switch ?Alexa?

I use a Virtual switch to keep track of the state of my Garage Door (i.e. Is the Door Open or Closed). The problem is Alexa will not discover the Virtual Switch.

My *.items file includes

Switch Virtual_Door_State “Vir_Door_St” [Switchable]

Can anyone see a problem in my Syntax, that would cause Alexa not to discover?

Thanks

Hello,
It should be

["Switchable"]

And not

Johannes

Hi Johannes,
At first it did not work, then I tried something very simple

I changed
Switch Virtual_Door_State “Vir_Door_St” [ “Switchable” ]

to
Switch Virtual_Door_State “Vir_Door_St” [ “Switchable” ]

Those simple little spaces surrounding “Switchable” made the difference and Alexa discovered the Virtual Switch.

Thank You very much.
Bill

1 Like

I was using the HABridge and Vera to create virtual switches that could be controlled by Alexa. That stopped working yesterday, so I’m trying to move the virtual switches over to OpenHab2.4.

I installed the OpenHab skill in the Alexa app and added a virtual switch to the Items file per the documentation (which is a bit different than what is listed above):

Switch Movie 			"Movie"   			{alexa="Switchable"}

I then tried to get Alexa to discover the new devices and the switch doesn’t appear.

If you use OH 2.4 this is not running. You have to use old syntax with tags.

In your case [ “Switchable” ]

See also here: https://www.openhab.org/v2.4/docs/ecosystem/alexa/

Technically, metadata support was added in OH 2.3. So the Alexa skill v3 syntax should work with OH 2.4.

Have you setup the openHAB Cloud Connector binding and confirmed that your server is showing online?

Then you better should make a hint in documentation. :wink:

Second bullet point in the setup section :+1:

1 Like

You are right.

I now discovered it, too. (in documentation for latest version)

https://www.openhab.org/docs/ecosystem/alexa/#setup

Version 3 of the Alexa Skill API introduces a more rich and complex set of features that required a change in how items are configured by using the new metadata feature introduced in openaHAB 2.3

But no hint in v2.4 documentation.

I am not sure if that documentation can be updated as the skill v3 was released after. It will certainly be available with the upcoming 2.5 release.