[ST Edge] vEdge Creator: a virtual device generator for end users

Sure I’ll look at that. Providing the option for multiple icons is just a big pain because you have to then create and maintain multiple (mostly duplicate) device profiles, so it’s not just Lua code. It really needs to be a function of the mobile app to be able to pick any icon you want for any device!

Something else once possible Tod but removed in the quest for progress.

2 Likes

First of nice job! Just made 3 switches but a simple question with I’m guessing a simple answer…

The difference between a virtual switch and a virtual presence sensor is just the words at the switch?
On/off, home/away and so on?

It’s a few things:

  1. the dashboard icon
  2. the dashboard state & controls
  3. the category of the device, which is used to profile devices by various other platform functions and SmartApps
2 Likes

The virtual switch implements the switch capability. The switch capability has both attributes (the switch attribute reports whether the switch is on or off) and commands (the on and off commands allow the switch to be controlled by apps and automations).

All a virtual switch has to do is set the attribute to on when the on command is called and off when the off command is called. So the capability has everything required.

The virtual presence sensor implements the presenceSensor capability. This only has a presence attribute to report present or not present. It doesn’t have any commands (and nor do contactSensor and motionSensor).

In order to create a virtual presence sensor there have to be commands for apps and automations to use in order to set the presence attribute. This could be achieved with custom capabilities but it is common to simply add a switch capability instead and exploit the on and off commands as they are already well supported. So, for example, setting the switch to on will also set the presence to present.

1 Like

This could be achieved with custom capabilities but it is common to simply add a switch capability instead and exploit the on and off commands as they are already well supported. So, for example, setting the switch to on will also set the presence to present.

Okay, but would be using the on/off directly in stead of with the presence switch be the same? As in the function that it could do the same, but ofcourse wouldn’t be as nice? Home away is beter than on/off.

For example, I have a virtual switch to switch between eco and heating for my Nest thermostat.
If the switch is on=heating to a set temperature, if the switch is off=eco (set 15 degrees Celsius)
If there would be a virtual switch “Heating” and “eco” it would be the same but just look better?

I’m sorry if I’m missing the point, just trying to learn new stuff here (and English is my third language).

Hey @TAustin :

I’m trying to sync one of your virtual temp/humidity sensors with the value from a multipurpose sensor using Webcore. But I don’t think it’s updating. Does this Webcore code make sense? How does the device reconcile the setting through Webcore and the manual slider within the driver itself?
Thanks!

That is absolutely correct, particularly if you use app Routines where there is only one device per condition.

I use the Rules API where multiple devices with the same attribute can be listed in a single condition (as was the case with Smart Lighting and webCoRE) so it can be useful to present things in terms of that attribute. For example, the television being switched on could be considered as there being motion in the room.

If you use Alexa routines (I don’t) you will find that they can use contact and motion sensors as conditions, but not switches. Similarly they can use switches in actions but have no concept of setting a motion sensor. So in that case virtual motion and contact sensors are a means to an end.

Also you sometimes just need to test things in the absence of the actual hardware.

1 Like

Check! All clear, thanks.

It looks like it should work! Those are the right capability commands. I don’t know if webcore is passing the right values; I’m not that familiar with webcore variables. Just make sure they are numbers and not strings.

We can do some debugging from logs if we need to and you have the CLI, but I think webcore should have some logging/debugging output you can use to check those values.

Thanks, I think that was it - I was passing a string and not a decimal value. Should be working now, will check. Thanks!

Thank you for the easy instructions and development of these edge devices. Do you have more details on your other edge programs. Like what they would be used for.

Hi there - for most of my other drivers, I have the details in a readme file on their respective github repositories. You can see all my public repositories here.

Here’s a summary of my other drivers:

  • UPnP & mDNS (device discovery)
  • LAN Device Monitor (via UPnP) with WOL
  • Wake-on-LAN
  • LAN device app integration: Trigger, Presence, Motion
  • LAN device monitoring: phone tracker, ping tracker
  • Edge bridge server (LAN app integration and proxy for reaching internet from Edge drivers)
  • Webrequestor (issue http(s) requests)
  • Roku devices
  • Shelly devices (GEN1)
  • DSC/Envisalink (security system)
  • Direct Connect device integration for Raspberry Pi
  • MQTT: (Discovery Edge Driver plus SmartApp)
  • WLED
  • Weather
  • ONVIF Video cameras (video streaming and motion detection)
  • vEdge (virtual devices)
  • Virtual Energy Meter
5 Likes

I see @TAustin has a “Web Requestor v1.2” device. I currently have my Alexa TTS integration in Node-Red, and I invoke it from SmartThings via a WebCore Piston like this:

Would it be possible to have the vEdge Creator have a TTS virtual device that appears in the “Play message on speaker” action in routines, or could I just use the “Web Requestor v1.2” device to call the URL?

Thanks. This vEdge Creator is a life saver.

1 Like

I guess I answered my own question. I installed “Web Requestor v1.2”, and I am able to add a URL to call in the action of a routine.

Looks like “Web Requestor Multi V1.0” is the one to use. “Web Requestor v1.2” wasn’t working.

1 Like

first sorry if I write here, I did not know where was the best place to ask.
I follow many of your projects and I will never tire of complimenting you! What do you think, is there a chance that you will create something that can track the location of the phone? I’m currently using Life360 and I already know it won’t work anymore. I was simply wondering if it was possible in some way to put life 360 in communication with smarthings in another way, or if possible to create anything other than position monitors. I don’t want to use LAN, because not always when we are at home everyone is connected to the home network.
I realize that I am completely off topic, and I apologize again for this, but I did not want to send a private message or make a new post on a topic that I think I have already discussed several times, but without a solution currently for me.

If you mean tracking it based on it’s geolocation, I would love to find a solution for that myself! It’s the one thing I still use webcore for, since it’s quite reliable. But unfortunately I think this one is going to be outside the realm of an Edge driver.

I have a solution to track whether your phone is connected to your home LAN or not (present or away), but that’s probably not what you’re looking for.

1 Like

New driver update notification!

Version 2022-08-20T22:47:53.717670548

As earlier suggested by @DaWeav, this update expands the dashboard icon choices for the vEdge Contact device. Previously you could choose between contact and light. Now you can choose among contact, light, motion, switch, plug, and remote. This also further expands your choices of icons from the device Edit screen.

As @DaWeav pointed out in his earlier post, for those that don’t like to have virtual contact-type devices show up in the Favorites status section, this is a way to prevent that from happening.

This update will automatically be installed to your hub.

4 Likes

Some of you might be interested in another driver I’m working on now that may be helpful in your efforts to port webcore pistons to automation routines/Rules. It provides two main functions: timer for how long a switch has been ON, and a counter that can be incremented or decremented via pushbuttons or linked to the switch state. See this topic if you are interested. I have a driver available for testing.

9 Likes