Rethinking Virtual Devices

Brandon Cannaday
Brandon Cannaday | 1 minute read

Within Losant, virtual devices have provided a way to store data from sources other than physical widgets. For example, our weather station walkthrough populates a virtual device with data from a remote weather API. There were also enforced limitations on how state could be reported on standalone versus virtual devices, which caused users to come up with complicated work-arounds. After seeing how common this was among our users, we've decided to remove the separation between standalone and virtual devices and add some much needed flexibility.

All virtual devices that currently exist have been automatically migrated to a standalone devices. All existing applications will continue to work without any changes required on your part. From this point on, you are now able to report state using a workflow on any device type. With this change, the virtual device type no longer exists. Moving forward, simply use the standalone device type for all virtual device needs.

The primary use-case for workflows reporting state on standalone devices was for higher-level or calculated attributes. For example, if a tracking device was reporting GPS coordinates, a workflow could be performing reverse lookups to get an address associated with the coordinate. The developer would then want to store this address as state on the device. Prior to this update, this would have not been possible and would have required the developer to create a second virtual device just to store this computed attribute. With this update, the developer can simply use the Device State node to report the state directly back on the device.

As users continue to build amazing things on our platform, we will continue to learn what does and does not work. In this case, we made the incorrect choice to force the separation between virtual and standalone devices. Losant will always evolve to maximize your ability to create, and your feedback is critical for this goal.

Tagged