Developer Workspace provides the virtual device through the Developer Workspace and CLI. The virtual device contains a device profile including a device type and its capabilities, so that you can test the Virtual device instead of the physical device with the SmartThings app or the plugin simulator.
To open the virtual device Launcher, do one of the following:
- In the Developer Workspace, go to Tools > Virtual Device and click Run Virtual Device.
- In the CLI, use the following command:
st launch virtual-device
Create a new virtual device
The virtual device contains the information as below:
- Device Type - You can select the direct-connected or cloud-connected device. But for now we support only direct-connected devices.
- Device profile - You can select one of the device profiles you've registered.
- Virtual Device name - Enter the name for your new virtual device.
- Manufacturer ID - This is assigned to your Samsung Account, and identifies which device plugins you can view when you log into the SmartThings app.
With the Developer Workspace
- Go to Tools > Virtual Device.
- Enter the information about the targeted device.
- Click REGISTER.
With the CLI
To launch a virtual device, you must register it to match the device profile of a project. To do this, use the following command:
st publish device --device-profile <Device Profile ID>
--device-profile: Specify target device project ID
--id: Specify device project ID. Generate a random ID if you don't specify
--authcode: Specify an authcode to get the Access Token for registering device. Use internal SSO Token if you don't specify.
--name: Specify a device name. Use a name on device profile if you don't specify.
Launch the virtual device
- To open virtual device launcher, click OPEN VIRTUAL DEVICE LAUNCHER. You can see the virtual device Launcher in a new window.
- Click LAUNCH of the virtual device which you want to test with. You can see your selected virtual device.
- If you want to delete the virtual device, click DELETE of the virtual device.