Alexa with virtual switch

Hi,
I have two scences, one will turn off the TV, the other one will turn on the TV. (I am using broadlink RM for that)
I added a virtual switch so Ill able to control the TV, so when the virtual switch will turned off the turn off scene will be triggered and the same for turn on.
The problem is that alexa is not recognized the virtual switch device. When I click on discover all devices, the virtual switch is not in the deviced list. I tried to forget all the devices and also the Vera skill but it did not helped.
I know that alexa can detect virtual devices because it detected the Vera mode device.
Hoow to configure the virtual switch so Alexa will able to find it?
Thanks :wink:

1 Like

There is a chance the virtual switch will be recognized by Alexa if you can change the category and subcategory to a known one.

http://wiki.micasaverde.com/index.php/Luup_Device_Categories

I updated the vswtich code to reflect category 3 and it was still not offered as a switch as part of the process to select devices to add to Alexa. So simply updating the Category and SubCategory doesn’t appear to be enough to make it work with Alexa.

Worked for me. I added the following to the device section of D_VSwitch.xml and now they show up for Alexa.

<Category_Num>3</Category_Num>
<SubCategory_Num>0</SubCategory_Num>

Hmm, that is exactly what I did, but it didn’t work for me. Can you attach you xml file? Are you running the Beta firmware.

Also when you look at the Advanced tab of your virtual switch, do both category and subcategory parameters show up, mine would only show the category.

I’m running the beta. subcategory doesn’t show up, I assume because 0 is the default.

Worked for me :slight_smile:
Thanks alot.

After adding the properties
<Category_Num>3</Category_Num>
<SubCategory_Num>0</SubCategory_Num>

Go to the mail from amazon “amazon alexa beta: participation confirmed”. than click on CLICK HERE TO ENABLE SKILL
and choose the new device from there.

I’m totally new to this whole zwave thing, so maybe you guys can help me out.

How do I access the D_VSwitch.xml so I can edit it?

I’ve got a fibaro double relay switch for wich I had to make a virtual switch.

The virtual switch didn’t work for me even after updating all the properties, but after rebooting Vera and the echo, they showed up like an hour later. Not sure exactly what happened, but now all my virtual switches show up immediately after discovering devices. Hope this helps.

[quote=“onArcade, post:8, topic:195432”]I’m totally new to this whole zwave thing, so maybe you guys can help me out.

How do I access the D_VSwitch.xml so I can edit it?

I’ve got a fibaro double relay switch for wich I had to make a virtual switch.[/quote]

I figured it out. Apps -> develop apps -> luup files

#littlevictories

How do I access the D_VSwitch.xml so I can edit it?

Apps -> develop apps -> luup files > then what???

Click download far to the right in th same row of the file.

All works flawlessly with Alexa, But if i turn light off at wall switch, virtual switch thinks its still on, so if i then tell alexa to turn on virtual switch it does nothing as it thinks it is already on. Is there a way for virtual switch to get feed back?

Yes, create a scene that triggers from the light being turned On (from the wall switch or another scene), to turn on the Virtual Switch
Then create a second scene that triggers from the light being turned Off, to turn off the Virtual Switch.

Your Virtual Switch will catch back up the next time your light switch is polled. (so it will be a little out of sync for a bit until the polling happens). This usually isn’t a big deal unless you are sitting there fiddling with your wall switch and Alex/Vera to control the light switch all at the same time.

Note that this creates a little bit of circular logic between the two switches, that will result in the On Command or Off Command being sent twice to the light switch, but because it is already on or off at the time it all works out without having to get more complex about it.

1 Like

[quote=“shallowearth, post:14, topic:195432”]Yes, create a scene that triggers from the light being turned On (from the wall switch or another scene), to turn on the Virtual Switch
Then create a second scene that triggers from the light being turned Off, to turn off the Virtual Switch.

Your Virtual Switch will catch back up the next time your light switch is polled. (so it will be a little out of sync for a bit until the polling happens). This usually isn’t a big deal unless you are sitting there fiddling with your wall switch and Alex/Vera to control the light switch all at the same time.

Note that this creates a little bit of circular logic between the two switches, that will result in the On Command or Off Command being sent twice to the light switch, but because it is already on or off at the time it all works out without having to get more complex about it.[/quote]

Thank you,

Been following this thread, and have created a virtual switch and updated the D_VSwitch.xml file, however it is not appearing as a device in Alexa (all my other light switch etc are shown). I have deleted all devices and done a re-discover, any thoughts on what else I might do to get the virtual device visible to Alexa? I have also re-started Vera and everything is working including the virtual switch in the form I want it.

Does the virtual switch show up in the config page in the Vera that tells it what switches and scenes to expose to Alexa? Or does it just not show up in Alexa after you checked it in Vera Alexa Settings?

Did you check on the advance parameter tab of the virtual switch device that it says category_num 3
If it doesn’t say that something went wrong with the file you editted/uploaded
Try again and then restart the Vera.

Does the virtual switch show up in the config page in the Vera that tells it what switches and scenes to expose to Alexa? Or does it just not show up in Alexa after you checked it in Vera Alexa Settings?

  • Yes the VSwitch appears in Vera, it doesn’t appear as a device exposed to Alexa. What do you mean by Vera Alexa Settings.

Did you check on the advance parameter tab of the virtual switch device that it says category_num 3

  • Yes, I updated the D_Vswitch.xml file and category is correctly set as 3

If it doesn’t say that something went wrong with the file you editted/uploaded

  • All loaded correctly.

Try again and then restart the Vera.

  • Have done and I can use the VSwitch correctly, its just not being exposed to Alexa, v.frustrating.

Did you actually go in to the Vera UI for the device. Click on advanced and see the param category_num was listed and has a 3 in the value?

Before you click discover device in Alexa there is a Vera Webpage that you go to that lists what devices you want to make available to Alexa and what friendly name you want to give them. Is the Virtual Switch showing up there so that you can click the check box?

For education sake are you implying that once identified to Alexa that one can use the virtual switch? How would you tell her which switch and/or function you want selected? Mike

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules