Can I use this driver to create a device with these kind capabilities? A c02 sensor, temp humidity etc. I want to use it so I can send data from netatmo to that device with the api.
[ST Edge] vEdge Creator: a virtual device generator for end users
You won’t find one single device that has all those capabilities, but you can create individual ones that will probably cover most of what you need. For example, there is a temp/humidity device, and an air quality device. I could add a sound device if you need that.
Otherwise if you needing one device that has all the capabilities you want, then that will take some custom work to create.
I’m already using the temp humidity one, works great! If it’s not too much hassle to create a sound sensor, then yes please.
And a c02 sensor? The air quality one does not use ppm but another unit.
I’d like to use a standard level capability for setting the sound level value. That would give you 0-100 (db) range. Is that sufficient or will you be taking measurements in a nightclub?
How about the ppm values for CO2; what range would you need for setting the value?
My livingroom is my own nightclub.
I think thats more than enough!
Regarding the c02 meter. I think from 0 to 2500 is good. thanks in advance!
I created a single virtual presence device successfully just now. Then I tried to create a virtual switch but the action keeps timing-out with a network error. Looking at the logcat I am seeing the following whether I’m trying to create anything or not.
2023-01-31T17:24:18.516399680+00:00 WARN Virtual Devices V2 Unexpected filesystem lookup for capability partyvoice23922.vbatterylevel 2023-01-31T17:24:18.575100597+00:00 FATAL Virtual Devices V2 Lua: callback error stack traceback: [C]: in field 'st_json_decode' [string "json"]:17: in field 'decode' [string "st/capabilities/init.lua"]:56: in field 'build_cap_from_json_string' [string "st/capabilities/init.lua"]:142: in function <[string "st/capabilities/init.lua"]:134> [C]: in function 'pcall' [string "st/capabilities/init.lua"]:94: in metamethod '__index' [string "init.lua"]:1533: in main chunk caused by: error converting Lua lightuserdata to String (expected string or number) Traceback: stack traceback: [C]: in function 'error' [string "st/capabilities/init.lua"]:98: in metamethod '__index' [string "init.lua"]:1533: in main chunk 2023-01-31T17:24:24.203070391+00:00 WARN Virtual Devices V2 Unexpected filesystem lookup for capability partyvoice23922.vbatterylevel 2023-01-31T17:24:24.567988517+00:00 FATAL Virtual Devices V2 Lua: callback error stack traceback: [C]: in field 'st_json_decode' [string "json"]:17: in field 'decode' [string "st/capabilities/init.lua"]:56: in field 'build_cap_from_json_string' [string "st/capabilities/init.lua"]:142: in function <[string "st/capabilities/init.lua"]:134> [C]: in function 'copcall' [string "st/capabilities/init.lua"]:94: in metamethod '__index' [string "init.lua"]:1533: in main chunk caused by: error converting Lua lightuserdata to String (expected string or number) Traceback: stack traceback: [C]: in function 'error' [string "st/capabilities/init.lua"]:98: in metamethod '__index' [string "init.lua"]:1533: in main chunk
Is this normal/expected?
Yikes, no this is not expected or normal!
There was a driver change earlier that fixed a problem with virtual battery devices. Do you have any? If so, I’d recommend deleting them and recreating them.
If that’s not it, could you please confirm what driver version you have installed. It’s not making sense why you would be getting this particular error…
I did have one virtual battery device until a few days ago but I wasn’t using it so I deleted it.
Installed driver details:
And note I still cannot create any more virtual devices with the driver since adding that single presence device earlier today. I keep getting “A network or server error occurred. Try again later.” in the app.
Sorry for all the questions, but…
- Now that you’ve deleted that battery device, are you seeing anything different in the log?
- Are you getting that error only when you tried to create a new device? When you try again, are you still getting that same error repeated in the log?
- Are other virtual devices still operating ok?
If everthing still seems to be botched up, you could try reinstalling the driver with the CLI:
I actually deleted the battery device several days ago. The logs are from today.
The error occurs without me trying to create a new device. When I do attempt to create a new device it does not appear to generate anything in the logs.
All other virtual appear to be working (I have a lot so cannot be 100% certain).
I reinstalled via the CLI and boom, all working again and those log errors have gone away.
6 posts were split to a new topic: Zipato Siren: Use Doorbell Sound?
Weird. Let me know if this happens again, and get the logging running if it does.
Thanks for reporting.
DRIVER UPDATE NOTICE!!
New driver version 2023-02-01T22:35:17.008560957 has been pushed out to everyone’s hub. Your driver will be automatically updated.
New in this update:
Due to a recent change in the way automation routines are configured for switch level (dimmer) devices, I have added a dimmer level-only virtual device. This has no switch; just the dimmer control. (@NickA)
Related to the above, I have added a new Settings option to the Level virtual device (switch+dimmer) that allows you to select whether or not to have the switch affected when changing the dimmer. This will behave like a standard light dimmer switch where if you change the level to anything above 0, it will turn ON the switch automatically. Conversely, if you set the dimmer to 0, it will turn OFF the switch automatically. Turning the switch itself on or off does not affect the dimmer. Note that this behavior had always been available with the Light virtual device, and will continue to be. (@HalD)
New ‘AlexaSwitch’ device. This is basically the same as the Contact virtual device, in that it contains both a contact and a switch useful for Alexa routines. However this new separate device type should be more obvious for newcomers, and hides the contact which some people prefer. You also have several dashboard icon options available through device Settings.
Additional new virtual device types added:
- Illuminance (@fido)
- Sound Sensor
- Sound Pressure (db level) (@Firdb)
- CO2 Detector (@Firdb)
Each of the above new device types include controls for setting the respective values.
What to expect
It continues to be a challenge to update the Creator device buttons with new options. Previously, I recommended everyone to delete and recreate their Creator device. However, this time around, I’m trying a new approach that is intended to be less intrusive. Once the driver has been updated on your hub, it may take some time and fiddling with the SmartThings app, but I’m hopeful the Creator device will automatically update for you.
It is possible that the Create and Inventory buttons may be temporarily non-functional, but give it some time and restart the app to see if it eventually gets fixed.
I anticipate that Android users will have things work fairly quickly, but iOS users may see delays or even have the Creator device not working again. If that is the case, then delete the Creator device and get it re-created through an Add device / Scan for nearby devices action in the app. You can do this without affecting your existing virtual devices. (Those with the CLI can use it to reinstall the driver manually, which should also get things back to normal).
Please report your experiences here (specify Android or iOS) so I can determine if this new approach worked or is a failure!
Be aware that new devices seem to now be created in whatever room your hub device is located in, as opposed to the No room assigned room.
A few weeks ago, I was able to add the vEdge Creator to two Hubs without a problem.
Tonight, I tried to add it to two more (v2 and v3 Hubs), but it’s not showing up anywhere, including the SmartThings-Room where the Hub is located.
I was able to install the driver from both the Hub and the Web Interface. I also tried Uninstalling/Re-installing, but the vEdge Creator Device Card just doesn’t show up anywhere.
Please let me know if there’s anything else that I can try.
Hi my friend. I just tried to add other new virtual switch. When I click on Select&Create a Network error message appear, tried some more times, different virtual drivers types and get the same warning. After I close the VEdge driver and open it again I found that Select&Create option is banned with a “-” char on it, also Virtual Device Inventroy option is banned and a “-” char on it. Am I missing something ?
Please read my post above. Your driver has been updated, and you may be forced to recreate your creator device.
@TAustin I deleted the previous version and did scan/add again to have it re-added. I confirmed the driver version is the current release but I don’t see options for the new device types. CLI shows the error log below:
2023-02-02T02:50:57.842110016+00:00 WARN Virtual Devices V2 Unexpected filesystem lookup for capability partyvoice23922.createdev6
2023-02-02T02:50:57.847907808+00:00 WARN Virtual Devices V2 Unexpected filesystem lookup for capability partyvoice23922.inventory6
2023-02-02T02:50:57.875289266+00:00 WARN Virtual Devices V2 Unexpected filesystem lookup for capability partyvoice23922.setilluminance
2023-02-02T02:50:57.880855391+00:00 WARN Virtual Devices V2 Unexpected filesystem lookup for capability partyvoice23922.setco
2023-02-02T02:50:57.885903350+00:00 FATAL Virtual Devices V2 Lua: callback error
[C]: in field ‘st_json_decode’
[string “json”]:17: in field ‘decode’
[string “st/capabilities/init.lua”]:56: in field ‘build_cap_from_json_string’
[string “st/capabilities/init.lua”]:142: in function <[string “st/capabilities/init.lua”]:134>
[C]: in function ‘copcall’
[string “st/capabilities/init.lua”]:94: in metamethod ‘__index’
[string “init.lua”]:1547: in main chunk
caused by: error converting Lua lightuserdata to String (expected string or number)
[C]: in function ‘error’
[string “st/capabilities/init.lua”]:98: in metamethod ‘__index’
[string “init.lua”]:1547: in main chunk
Can you please try using the CLI to reinstall the driver?
I’ve just installed this driver as I’m migrating a script off of Webcore to Sharptools. I needed the new simulated contact sensor, which I have installed. I must be missing something because in Sharptools, when working with a rule, I only have the options on/off instead of open/close. Am I doing something wrong?
I haven’t tried that particular device from this driver, but that makes sense to me.
close() commands on the Groovy Virtual Contact Sensor were custom commands that were not associated with a capability (eg. they weren’t ‘official’ or ‘standard’). So I suspect that this driver implements the
switch capabilities so it can expose the native
off() commands from the
switch capability which then influences the reported attribute state of the