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

This is what i’ve tried to use and it works fine to be honest. I just thought that having a switch icon on a virtual device that will trigger switches thru Alexa would look nicer. But if it’s going to be too complicated, then i guess i am fine with the virtual sensors. Thanks for the advise.

I did that with a DTH and had the option of linking all the capabilities so they were all active or inactive, or their working independently.

Working independently required custom capabilities for each capability to handle the active/inactive commands for each. That was fine programmatically but not for the detail view as last time I checked separate commands still weren’t supported, only the single setter command with an argument. I gave up waiting for that basic functionality after about a year.

Advantage was simply that I only had to have one DTH. Theoretical advantages would have been that I could have shared the device but I didn’t need to. I could also repurpose the device without creating a new one but that is a trivial gain. If I had a use for a device that went active for, for example, motion and contact simultaneously that would be great, but I didn’t find one.

A disadvantage is that the app really doesn’t ĺike having controls that don’t do anything when you press them. If a control is supposed to set an attribute in a certain way it gets cross if it doesn’t. In theory you can make the visibility of each control conditional. In practice it didn’t work.

Another disadvantage it that you can’t hide the existence of the capabilities. You may not be using the motion sensor, for example, but the device is still a motion sensor as far as ST is concerned.

Ah yes, I see. It looks like the device ‘name’ may be for compatibility with legacy devices as much as anything. I haven’t looked at other integrations, but it can’t be changed in the API and it doesn’t appear in the Edge device object at all. That is pretty reasonable actually, the label is sufficient.

The answer is most likely no but il ask

The energy monitor ST smart app wants an actual device to measure its energy useage, wash machine blah blah

Completely useless unless you have compat hardware

Anyway to create or spoof a driver into pretending to be a bit of hardware, If the spoofed device pulled in power useage info from a smart plug the energy smart app might have a use for watching power used at plugs rather than hardware

I found a nice useage for the vedge smoke device

I have a camera out front that records on movement and a few other internal triggers, trouble is in the UK at this time of year we suffer from spider invasions, cameras are always a good place for spiders as there is generally a small amount of heat around the camera, this causes the camera to record when arms and legs creep across the lens

I also have security lighting that is triggered by a passive movement detector, no heat no spider attack

When the movement detector detects movement the security lights come on and the camera switches to day mode and records

Inline with the movement sensor and attached lighting I have a smart plug that detects power draw, that triggers a virtual switch to on and in turn switches the vedge smoke on, that pops up on the TV and gets saved in the vedge smoke history, so instead of looking at the cameras recorded events which are mainly spider legs at mo, I look at the history of the vedge smoke device for events and then check the camera for the corresponding event time frame

Quite usefull at the mo so thanks Tod

2 Likes

That’s sounds pretty cool! Great use for a virtual device!

I learned that insects can be attracted to infrared light from security cameras. In fact I had to turn off the infrared on my cameras for this very reason. Best to have a setup like yours with separate light turned on by its own motion detector.

Yeah I’m pretty bonkers on cameras, they are cool gadgets

My passive detector is situated separate from the actual lights so is 100% reliable for detection, trip the sensor, lights on camera into colour day mode, much better for intruder ID

I also have a 10w led flood, fitted backwards so it washes the wall with light, this is just enough to make the camera stay in day mode if I want but externaly the 10w looks almost pointless for security, when infact the camera sees very well and in colour

Lots of tricks and lots if fun, seen my car rifled twice now, never caught the perps though, just watched them the next day, my fault for leaving the car unlocked and being asleep :sweat_smile:

Also have an awesome PTZ out back, upside down it makes for a wicked telescope for star gazing

Also constructed a pretty technical roof closure system for it to stop rain getting in the electrics

4 Likes

Tod, is there anyway a driver can be created that collates and displays energy useage from power sense plugs ?

Perhaps displaying a list of selected devices in power useage order

The amount of configurations and options can be many with this sort of thing but it would be excellent to actually have a proper smart app/driver

@fido we already asked that question, and there is no answer yet.
https://community.smartthings.com/t/st-edge-capability-that-receives-values-from-external-device-source/233030/8
Maybe there is need for new platform SmartApps that would emulate some device types.

To me this is like the ‘virtual thermostat’ discussion in another thread. It is working against the architecture. In ST that is really the job of an app.

@orangebucket you are probably right as Edge architecture will probably not allow this. :frowning:
Even in Groovy there is Virtual Thermostat, but also required SmarApp to connect external devices.

Fair enough guys, probability on it happening and colating the info at the apps fingertips into something actually useful for users… low

@fido Some developers might start creating apps as they have in the past. For example, besides device handlers, @RBoy has a lot apps done in groovy. He might start converting them to new platform.
I can see need for those, as we all want to have same functionality that we have with groovy.
I like to have all batteries listed in one app, with their status and type, and alarm when they go below specified level. Currently @RBoy has groovy app.
It’s the same for Virtual Thermostat, that I am looking for.

Here’s my two cents:

The beauty of the Edge platform for me is that I ‘feel’ free to code up anything I want. I can’t really explain, but the DTH/Groovy environment just felt more restrictive. On Edge, I feel like I’m basically on a Raspberry Pi and you can write whatever code logic your heart desires. The only limiting factor is input and output. You can’t get access, or subscribe to, other devices for state query or control; and you are limited with what you can output to the user via standard & custom capabilities. It may be contrary to the intended architecture, but it is possible to do some limited things in an Edge driver which SmartApps were really intended for.

Can you write a driver that manages a bunch of power sense plugs, collates values, applies computation, and outputs results through a device capability? Sure! Just create a dummy/virtual device to use for that output.

Can you write a virtual thermostat driver that connects to external devices? Sure - as long as you have a way to exchange data with them on the LAN.

Are these things something that probably should be done in a SmartApp? Sure. But the world we have at the moment is that if you want local execution, there is no Edge SmartApp environment (maybe there will be one in the future??). So I do in a driver as much as I possibly can do, and with Edge and its ability to connect with other things on the local LAN, the possibilities are endless.

4 Likes

ST Wifi Hubs are receiving updates to 38.11 that should enable Edge drivers. Mine has been updated and I’ve deleted and reinstalled the vEdge v2 driver. I’ve done a Scan Nearby, but no new devices are being found. Tried to get logging info from the hub, but also getting an error:

bep@debian10:~$ ./st edge:drivers:logcat 094aa202-dc1f-47ee-bdb3-4e2bd09e83e7
? Enter hub IP address with optionally appended port number: 192.168.1.71
Error: write EPROTO 139686789678976:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:…/deps/openssl/openssl/ssl/record/ssl3_record.c:332:

Code: EPROTO

Any suggestions?

I’ll have to find and read the info on this. Are all Edge driver types supported (zigbee/zwave/LAN)? I don’t know if this problem you’re seeing is specific to the vEdge driver or not; do you have any other Edge drivers that you’ve got successfully running?

I do not know at all what that error is you got from the logger! You may need to post something on a separate topic to get some help from Nayley or someone from the ST team.

AFAIK, all driver types are supported. I loaded the Hello World driver to test and can’t seem to discover anything with that either.

I posted in the Release thread and a logging thread about the logging error. Strangely, if I telnet to port 9495 and do a “get / http/1.1”, I get back the html with the list of logs. If I do it in a browser however, it just times out.

P.S. And then it dawned on me that I need to add the port number in the URL for the browser to connect :grimacing:

Any chance it might be possible to create a virtual air quality sensor?

How would you want to set its value? There’s no built-in command for that capability. But maybe including a dimmer switch would be one option.

That might do the trick. That works in several other cases