Vera virtual swiches not appearing in HA

Does anyone know of a way to get Vera virtual switches to appear in HA?

Hey Khaztr, were you ever able to figure out how to get Vera virtual switches to show up in Home Assistant? I too would like that functionality but haven’t figured it out yet. Slightly related, the Vera app ‘virtual motion sensor’ devices do show up for me in HA

Nope, no luck :frowning:

It is how the Virtual switches are called inside of Vera, what are you trying to do maybe there is another way? Had the same problem when accessing the Vera switches from another controller. You could create a virtual switch this way…
http://wooding5.com/tech/scene-controllers-setup/

This is showing Vera UI5 but UI7 works about the same! :slight_smile:

Not sure how that would help… Would using that method to create a virtual switch in Vera make it appear in HA?

would be good to get some support here.
just moved over from openhab, and finding more challenges that expected in this integration!

@Khaztr, @bsmith19,@230delphi
A bit late to the party but I just figured this out tonight as a way to trigger HA automations from the Central Scene features of my new GoControl WD500Z5-1. Here’s what you need to do:

  1. Download the file attached to this post: D_VSwitch_HA.xml. This is a version of the default Vera D_VSwitch.xml file I’ve customized by adding the Category_Num and SubCategory_Num parameters, key to getting the virtual switches to appear in HA.
  2. In the Vera web interface (accessed from a web browser, not via the mobile app): go to Apps -> Develop Apps -> Luup Files -> Upload, select the custom D_VSwitch_HA.xml, and upload it. Scrolling down in the list, you should now see D_VSwitch_HA.xml listed among the other files (uploading a file reloads the Luup engine, which may mean it takes a few moments for the file to appear).
  3. Now go to Apps -> Develop Apps -> Create Device and input the following:
  • Device type: urn:schemas-upnp-org:device:VSwitch:1
  • Description: [the name of the switch, this will be the entity name in HA; can be changed from the Devices menu later]
  • Upnp Device Filename: D_VSwitch_HA.xml
  • Upnp Implementation Filename: I_VSwitch.xml
    Leave Internal ID, IP address, and MAC blank; you can assign a Room if you want, and leave Parent device as “Please select”; Vera will assign the next available Internal ID by itself. Now click the Create device button at the bottom of the page. A popup will tell you “Device created”, click OK.
  1. Reload the Luup engine: visit http://ip_address:3480/data_request?id=reload, where ip_address is the local IP of your Vera. You’ll be taken to a page that says (only) OK.
  2. Navigate back to the Vera web interface, and go to the Devices page. When the Luup engine reloads, you’ll see your new Virtual Switch has been created with the name you gave it under Description earlier. Click the arrow next to the device, then Advanced, and note the device # on that page.
  3. Restart Home Assistant. Once it comes back up, you’ll now have an entity called switch.description_device#. Success!

You can repeat the process as many times as you want depending on how many Virtual Switches you need. Because they are switches, they allow for two-way triggering (i.e. from Vera->HA and vice-versa).

Here’s how I’ve used a Virtual Switch to trigger an automation from one of the Central Scene features of my dimmer (e.g. a triple-click of the “on” button):

  1. In the Vera UI on mobile (the interface is nicer) select Scenes -> +.
  2. On the Triggers page, + -> Select a device… -> [my dimmer] -> An action is performed -> Top paddle is pressed three times -> Done.
  3. On the Actions page, + -> Add immediate action -> [my virtual switch] -> Next -> On -> Done.
  4. Still on the Actions page, + -> Add delayed action -> [set a short delay, I’ve tested 3 seconds] -> [my virtual switch] -> Next -> Off -> Done.
  5. On the Finish page, give the scene a memorable name, and set any other options you want. Click Save in the top right.

Now, when I triple-click the top paddle of my dimmer, the virtual switch is momentarily turned on; HA sees this, meaning I can automate like this:

- alias: Dimmer - triple click top paddle
  trigger:
    - platform: state
      entity_id: switch.my_virtual_switch_12
      to: "on"
  action:
    - service: homeassistant.turn_on
      entity_id: group.main_floor_lights

The “Delayed action” in the Vera scene ensures that the virtual switch is automatically reset to off after being triggered, meaning it’s ready for the next time I triple-click the top paddle.

This approach to creating Virtual Switches works because of the Category_Num parameter, which the HA Vera component uses to determine what type of device the Vera device is (i.e. dimmer, switch, lock, armable) and map it to an HA entity type (i.e. light, switch, lock, binary_sensor).

D_VSwitch_HA.xml (1.6 KB)

1 Like

This works great when I turn on/off the virtual switch directly in Vera. But it does not update the virtual switch status in Home Assistant when Vera Scene triggers the virtual switch on/off. Any ideas how I can make this work?

1 Like

@marthocoo
Thank you.Works great.

Thanks to you! Works fine for me!!

Hi, just wondering how you got the device to stay in Vera? I’ve tried creating it several times, and each time I do it shows up in my device list for a few minutes, then disappears. I’m on version U17 of the Vera software.

Did you ever get this to work @tshin ? I can get a virtual switch in Vera to show in Hassio. The status in Vera change if I switch it on or off in Hassio but not the other way around.

I’m trying to get a virtual switch show the status of the S2 on a Fibaro Dimmer 2 in Vera (so I can use this input as a trigger in Hassio).