orangebucket:
JDRoberts:
if you don’t have a hub but you do have a PC. You can use the CLI to create a simple virtual switch, but it’s quite a bit of work.
The work is in largely setting up the CLI. If you do have a Windows PC for example, you need to download a zip file from GitHub . You can then open a command prompt, change directory to where you want the executable to be, and tar xvzf {{path-to-downloaded-zip-file}}
(tar
ships with Windows these days).
Once the CLI is set up, you just need smartthings virtualdevices:create-standard
to be prompted to set up a virtual switch. It will be a cloud executing one and it does work fine, though there is an argument for waiting for them to be formally launched before getting carried away. Other standard virtual devices are equally easy to create but it is yet to become clear how it is proposed to use them usefully as many of them are built around capabilities which do not have commands. Creating custom virtual devices is fairly simply to as it just requires creating a device profile first, something that you can be led through in the CLI.
When it comes to locally executing virtual devices it is definitely worth waiting to find out what the score is. Have I created a working virtual switch based on the stock Virtual Switch Edge driver? Yes. Have I created working virtual devices based on my own custom virtual device driver? Yes. Did they stay working more than a few hours at most? No. Is that because I did it wrong? Quite probably, I was guessing.
So positive signs in this direction but we aren’t there yet.
The API Browser from @TAustin can be used to create virtual devices and is much easier than the CLI. Plus it can be used from any location and not just when you are connected to your local LAN.
NOTICE!!: SmartThings has now released its own equivalent of this app here , so you may prefer to use that instead.
I have a browser-based web app that provides a point-and-click way to explore most of the SmartThings API. For the non-technical, this gives you access to an important SmartThings resource without having to learn tools like Postman, curl, or the CLI. You don’t even need a computer: a tablet or even smartphone can be used. For the more technically inclined, it provides much faster and more convenient access to those commonly-accessed CLI commands. Although I originally thought of it as a portal for the non-technical, I’ve actually found it quite useful to use during my own development activities.
This is not intended as a replacement or ‘competitor’ to the CLI, mysmart…
2 Likes