Author Topic: Alexa with virtual switch  (Read 1880 times)

Offline gabayarden

  • Newbie
  • *
  • Posts: 12
  • Karma: +1/-0
Alexa with virtual switch
« on: February 07, 2017, 06:51:36 am »
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 ;)
« Last Edit: February 07, 2017, 06:53:50 am by gabayarden »

Offline John M.

  • Administrator
  • Sr. Member
  • *****
  • Posts: 382
  • Karma: +24/-3
    • getvera.com
Re: Alexa with virtual switch
« Reply #1 on: February 07, 2017, 07:12:40 am »
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

John.M. ▾ Senior Customer Care Advocate
Vera Control, Ltd. ▾ Smarter Home Control  ▾ support@getvera.com ▾www.getvera.com ▾ +1 (866) 966-2272

HOURS OF OPERATION (Pacific Time Zone, UTC -8 )
Monday - Friday   12:00 am ? 06:00 pm
Saturday - Sunday   04:00 am ? 06:00 pm

Offline shallowearth

  • Hero Member
  • *****
  • Posts: 877
  • Karma: +41/-9
Re: Alexa with virtual switch
« Reply #2 on: February 07, 2017, 07:12:37 pm »
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.

Offline Juppers

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-1
Re: Alexa with virtual switch
« Reply #3 on: February 08, 2017, 08:21:52 am »
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>

Offline shallowearth

  • Hero Member
  • *****
  • Posts: 877
  • Karma: +41/-9
Re: Alexa with virtual switch
« Reply #4 on: February 08, 2017, 10:40:43 am »
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.

Offline Juppers

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +2/-1
Re: Alexa with virtual switch
« Reply #5 on: February 08, 2017, 01:14:21 pm »
I'm running the beta. subcategory doesn't show up, I assume because 0 is the default.

Offline gabayarden

  • Newbie
  • *
  • Posts: 12
  • Karma: +1/-0
Re: Alexa with virtual switch
« Reply #6 on: February 08, 2017, 01:24:45 pm »
Worked for me :)
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.

Offline onArcade

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Alexa with virtual switch
« Reply #7 on: March 13, 2017, 05:56:20 pm »
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.

Offline specsix

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Alexa with virtual switch
« Reply #8 on: March 14, 2017, 06:00:04 pm »
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.

Offline onArcade

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Alexa with virtual switch
« Reply #9 on: March 14, 2017, 06:49:23 pm »
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.


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

#littlevictories

Offline Paulbuckingham

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: Alexa with virtual switch
« Reply #10 on: April 28, 2017, 06:39:09 pm »
How do I access the D_VSwitch.xml so I can edit it?

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

Offline shallowearth

  • Hero Member
  • *****
  • Posts: 877
  • Karma: +41/-9
Re: Alexa with virtual switch
« Reply #11 on: April 30, 2017, 12:50:05 pm »
Click download far to the right in th same row of the file.

Offline vas5150

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +2/-0
Re: Alexa with virtual switch
« Reply #12 on: May 03, 2017, 06:25:17 pm »
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?

Offline shallowearth

  • Hero Member
  • *****
  • Posts: 877
  • Karma: +41/-9
Re: Alexa with virtual switch
« Reply #13 on: May 03, 2017, 07:53:31 pm »
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.


Offline vas5150

  • Sr. Newbie
  • *
  • Posts: 49
  • Karma: +2/-0
Re: Alexa with virtual switch
« Reply #14 on: May 03, 2017, 09:57:47 pm »
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.

Thank you,