[ST Edge] Virtual Things Edge Driver

Hi! It’s the same situation as the issue with the refresh. No updates yet, so, I also pinged the team in that report.

Could there be virtual device that runs as a counter that counts how many times something has happened?

1 Like

Hi @ygerlovin

I have been trying out your driver for virtual devices and have also been working with @lmullineux on testing his Harmony driver for 2 hub setups.

One thing which would be great is a virtual device, similar to your momentary button which allows you to choose a device to control when pressed

It would then allow a user to have an understanding of state, so for harmony it would be a good way to control activities, or if you wish to use a camera to turn on movement notifications you could see what state the device is in.

Thanks for your time

A “momentary” button by definition is almost always off. It’s like a traditional doorbell: it only turns on for a second or two when it is actually pressed and then it returns on its own to its off state.

image

this is probably what you meant, but I just want to make sure everybody’s on the same page… a momentary button doesn’t fit the use case you describe: you wouldn’t know that the other device is on from looking at the momentary button because it’s already turned itself off again.

instead, most people would use a virtual on/off switch as a proxy, because it does retain state until actively turned off again.

So I just wanted to make sure you were asking for what you actually need. You’re asking for a virtual binary switch, right? Not a momentary button. But one that could trigger some kind of webhook or LAN call.

I’m still not quite following though… If the device lets you choose from among several possible targets, how would the virtual device’s tile indicate which target was last chosen?

1 Like

Correct @JDRoberts.

I need a virtual on/off switch with extra features. I was trying to point out that the momentary button allows the device control at the moment like the image below, which is what i would like extending to a virtiual on/off switch

Selecting the ‘Pressed’ action allows you to choose a routine, although I do not think it is a routine like in the automations section and is more a way of linking a virtual button to something physical without needing an automation trigger to alter state.

I only also require binary state, but it would require a seperate control for the off position. So in my example, i would post one uri to switch something on, and a seperate uri when it moves to off

1 Like

@JDRoberts There is such a virtual device , with up to 5 switches that I use. Only one can be active at the time or none. By turning one switch on (precondition), and using dimmer/remote I can control up to 5 different light(s) with single dimmer/remote.

Any time you turn any other device, all other switches go off.

Just use this in Routines as precondition swithces, and add add normal routines for single dimmer/button/remote, and control different set of lights or any other device.
I am controling On/Off, dimming, and changing White Temperature with single remote on 5 different light sets, and have another one that controls 3 different light sets.
Single remote controls 5 different CCT light sets

1 Like

Thanks.

I will take a look at that driver

So I have taken a look at the switch board and mirror vd.

I am not sure it will do what I was looking for without an automation which is what I am hoping to avoid especially as there is a limit of 200, but maybe I do not understand the switch well enough, so I’ll try and be little clearer on what I am trying to achieve.

The details on the momentary driver I posted above where another device can be initiated from the press is what I am looking to do as it does not seem to utilise an automation slot

Here is a breakdown of what I would like, using a real world example of me wanting to activate/deactivate motion detection on a camera. I could then build this switch into an automation that automatically arms on leaving/disarms on arrival.

  1. When the switch is moved to the on position, I can select a device to control. As part of my example, I would then select the WebRequestor virtual device, and use that to post a URI
  2. When the switch is moved to the off position, I can repeated the procedure above of selecting another device to trigger, but it should allow a different device to control. To expand on my example, I would probably in this case chose the WebRequestor driver again, but this time I would post a different URI

I think the possibilities of such a switch would probably help others build more complex routines as well locally with other devices.

I have never seen with the old groovy DTH, or any other virtual edge device the ability to select an action when the virtual device state control another device directly without using an automation /rule engine. It was the momentary button I posted above that has made me believe it is possible as it currently works for me controlling Harmony commands all without taking up a precious automation slot to control the state.

I can ask developer if this is possible, however I believe that assignable action is used only for button capabilities, not switch.
@Mariano_Colmenarejo

1 Like

Hi @Wayne_Myers

Please let me see if I understand you correctly.
So, there are 2 things:

  1. The requirement is to have a switch capability with button capability for each switch case
    Something like this
    -switch
    -on button
    -off button

When a switch goes on, on button should receive press event
When a switch goes off, off button receives a press event
Then it would be possible to associate each button with other device, like web requestor

  1. The claim that button associations are not counted as automation, so you may have them in addition to 200 automations.

Unfortunately, I don’t think #2 is correct. I believe each button association is internally considered as routine.
Perhaps @nayelyz could elaborate on this.
Thanks

Hi,

Thank you for coming back to me.

You are spot on with understanding my ask for requirements 1, although if @nayelyz confirms your suspicions on point 2 the first point may not have much benefit as my aim was to keep down the number of automations to help with the 200 limit some will see

1 Like

@Wayne_Myers
Is this still to control harmony devices using voice control without the need to use up a routine?

If the harmony thing you are trying to do, is start an harmony activity - I have updated the harmony driver to have a virtual switch for every activity which i hope will solve your problem - please give it a try. This has a massive advantage in that the harmony activity can be triggered from either harmony or ST but both should maintain state. This is working now on the new version of the driver I released this week. It would be good if you could test that

If you are trying to achieve the same thing for a harmony device command, I will figure a way to add a virtualswitch that does that same thing - but button presses on a device are by their nature stateless.

Louis

@lmullineux

Hi,

Thanks for coming back to me on this.

Initially Harmony activities were in my thoughts, but I also expanded this to potentially activating/deactivating something via web request, for example enabling motion detection, and then turning it off.

I’ve been watching the Harmony thread and see you have implemented the switch for activities, not got round to testing it yet but its on my list of things to do I do think though that if we could also have a switch in the Harmony driver, it would help for things like mute which only has 2 states, you could then easily see if a device was muted or not.

@Wayne_Myers

When I get around to doing virtual devices for harmony button presses - that can send any command I will make them configurable so you can configure, whether the switch automatically rocks back into the Off position after it is switched on, I will also try and make it configurable so that you can specify any harmony command.

Truly maintaining state though would be impossible, taking your example MUTE - mute is only stateful at the TV itself - harmony doesn’t know if your TV is muted or not, therefore smartthings cannot know for sure. You can fake it, but as soon as somebody changes mute outside of smartthings the switch would be in the wrong state. The very nature of TV remote controls over IR, is that it is one way, their is no feedback to the controlling device the current state, or even whether the last request was received and executed.

I understand, it would only work in edge cases and could easily get out of state with the actual device

Having a configurable switch would be great though.

Thanks

1 Like

Hi, @ygerlovin, @Wayne_Myers.
I’m checking this with the engineering team, I’ll keep you updated.
Thanks for reaching out!

1 Like

Update:
@ygerlovin, @Wayne_Myers
The team mentioned the automation you can create from the detail view is expected to be part of the Routines, therefore considered in the 200 limit.

1 Like

Thanks for coming back to us @nayelyz.

It’s a shame, but I was expecting that answer.

1 Like

@ygerlovin

I’ve been using a groovy virtual thermostat, with aeotec smartthings buttons as the temperature sensor and mode selection and the nano switch to turn far infrared heaters on. I pressume the end of groovy this month is going to mean I have to work out another way of doing this. I’ve installed the edge virtual thermostat and have it working, but have picked up on the thread that hardware devices can’t be directly linked to edge virtual devices. Is there a way to replicate what I had with the groovy thermostat and get real world inputs and outputs working with the virtual thermostat?

2 Likes

Hello @ygerlovin,

No words to thank you for your amazing work.

Started the change from the old “Simulated Alexa Switch” to your “Virtual Things Edge Driver”, and it works really well.

Sorry about this question, because is maybe something that I’m not getting.

But how the name of the virtual device change inside “vDev Controller”? I already changed the name of virtual device, when I was making is configuration, but inside “vDev Controller”, still remains - vContact1

1 Like