1. Knowledge base
  2. Neowit Platform
  3. Configuration - Office/Building

Virtual Devices

In simple terms, a Virtual Device in Neowit is a configurable representation of sensor data, combining information from one or more physical sensors.

What you'll gain and How to Use Virtual Devices

Virtual Devices decouple your data and logic from the underlying hardware—so your insights and automations keep working even when devices change.

Swap hardware without losing history

  • Replace a physical device with another and keep a single, continuous data stream.
    Example: Replace a video conferencing system in a room; the Virtual Device preserves the room’s full historical data and identity.

Aggregate many devices into one

  • Combine multiple physical devices into a single Virtual Device at any scope: 1:1, per room, per floor, or entire building.
    Example: Merge 10 energy meters into one “Building Energy” Virtual Device for unified reporting. Or bundle multiple motion sensors; if any are triggered within a defined time window (e.g., after hours), raise an alarm.

Fan-out one sensor to multiple purposes

  • Use a single physical sensor to power several Virtual Devices with independent rules.
    Examples:
    • Lighting control: turn lights off after 10 minutes of no motion.
    • Occupancy state: mark a room idle if no motion is detected for 1 minute.

Why it’s powerful

  • Continuous data history and device identity
  • Vendor-agnostic flexibility as hardware changes
  • Simpler management with roll-ups by room, floor, or building
  • Reusable sensors and cleaner, scalable automations

Implement and manage Virtual Devices

A virtual device is a digital representation of a physical device. You can configure its inputs, outputs, resolution, and data history.

Defining Inputs and Outputs

To create a virtual device's output, you'll write a query expression using the Neowit Query Language. This expression processes data from a set of input variables.

These input variables represent one or more sensor data sources, including:

  • Physical devices and other virtual devices.
  • Higher-level groupings of devices, such as spaces, integrations, and user tags.

The query expression describes how data from these sources should be processed to produce the virtual device's output.

Data Processing and History

The data a virtual device outputs is stored in a database and continually updated as new data comes in from the input sources.

You can reconfigure a virtual device's inputs and outputs at any time. This will affect all future output data, but it will not alter the historical data already saved.

virtual_device-icon

You can manage all of your organization's virtual devices from the "Virtual Devices" page. Access it by clicking the icon with two angled brackets in the toolbar.

On this page, you'll see a list of all your virtual devices. You can easily filter and sort this list using these basic properties:

  • Name: The name assigned to the virtual device. Note: This does not have to be unique.
  • Expression: The query expression defining the output of the virtual device.
  • Resolution: The temporal resolution of the data outputted by the virtual device. Note: This can not be changed after the virtual device has been created.
  • Status: Indicates whether the virtual device is functioning properly or if there are issues preventing it from processing data.
  • Space: The space the virtual device is assigned to.
  • Data since: The date configured to be the beginning of the data history of the virtual device. Note: This can not be changed after the virtual device has been created.
  • Created: When the virtual device was created.
  • Last modified: The last time the configuration of the virtual device was changed.

Change view

You can switch from the list view to a graph view by clicking the toggle button next to the filter bar. This view visualizes the dependencies between your virtual and physical devices.

In the graph view, virtual devices appear as rounded boxes. Lines connect them to their input devices on the right (or bottom, if you flip the view). These inputs can be either:

  • Physical devices (represented by sharp-edged boxes)

  • Other virtual devices

Similarly, lines connected to the left (or top) of a virtual device show which other virtual devices it is providing data to.

To navigate the graph, you can pan and zoom the view, drag the boxes to rearrange them, and switch between horizontal and vertical layouts for better visibility.

Create a virtual device

To create a new virtual device, click the large "+" button in the lower-right corner of the list view. This will take you to the "Create virtual device" page.

When creating a new virtual device, you must provide a name and a query expression.

You can also optionally:

  • Change the output resolution.

  • Assign it to a space.

  • Adjust the start date, which determines how far back its data history will be computed.

For guidance on creating query expressions and variables, please refer to the <playground tutorial document>. For comprehensive documentation on the Neowit Query Language, visit https://developers.neowit.io/rest-api/query-language.

Before you create the virtual device, you can preview your query's output. Just click the "Enable" toggle button in the "Output preview" box.

Use the resolution, date, and time controls to test the data at different times and resolutions. Keep in mind that the start and end times you set only apply to the first and last days of the date range you select.

Important: These preview controls don't affect the final virtual device's configuration, they only affect the preview. The preview data won't reflect the resolution or start date you've configured for your device.

Once a virtual device is created, you'll be taken to its "Virtual device details" page. You can always return here by clicking the device's name in the virtual device list or graph.

At the top of the page, the header shows the same basic information found in the virtual device list, along with buttons to edit or delete the device.

Upon creating a virtual device, you are taken to its "Virtual device details" page, which can also be accessed by clicking the name of the virtual device in the virtual device list or graph.

The header at the top displays the same basic information that can be seen in the virtual device list. It also contains buttons for editing and deleting the virtual device.

Below the header, you'll find a detailed breakdown of the device's configuration and data:

  • Expression inputs: This section lists the input variables used in your query. It shows which specific devices (both physical and virtual) or groups (spaces, integrations, or tags) are linked to each variable, along with the sensor types included from each source.

  • Dependencies: This box displays a dependency graph for this specific virtual device. If you want to see how it fits into your broader system, click the "Full graph" button to view a complete dependency map of all virtual devices.

  • Location: This shows which space the virtual device is assigned to, if any.

Finally, the page displays graphs of the virtual device's output data. You can adjust the resolution and time range using the controls in the "Visualization" box, which function identically to the preview controls on the creation page.

Edit a virtual device

To edit a virtual device, click the "Edit" button in the header of its "Virtual device details" page. This will take you to the "Edit virtual device" page, where you can change any of the original settings.

However, you can't change the output resolution or start date. This is because altering either of these would affect the virtual device's historical data, which is always preserved. If you need to update either of these settings, you'll have to create a new virtual device.

Delete a virtual device

To delete a virtual device, either click the "Delete" button in the header of the virtual device's "Virtual device details" page, or select it in the virtual device list and click the "Delete" button in the filter bar.