CYBERAUTOMATIONSStart a project
OT referencePublished reference

Niagara 4 BQL and NEQL queries you can paste and run

A set of ready-to-paste BQL and NEQL queries for Niagara 4 stations: device and point inventory, network topology, live status, users and audit history, plus per-protocol queries for BACnet, Modbus, LonWorks, SNMP, KNX, OPC and Fox.

query files by task
8
syntax and reference docs
4
protocol sections
7

The problem

Taking stock of a Niagara 4 station means knowing which devices, points, networks and user accounts it holds. Clicking through the component tree one folder at a time is slow, and it is easy to miss something.

BQL can answer those questions in one line, but only if you know the right type name for the from clause, the right scope ORD, and how to encode a slot name that has a colon or a space in it.

NEQL adds tag-based queries, with its own requirements: Niagara 4.4 or later and the tagDictionary module.

The approach

  1. The queries are grouped by task in eight Markdown files: device inventory, point inventory, network topology, security and access, real-time status, protocol-specific queries, NEQL tagging and HTTP access.
  2. Every query is a single line you paste into the Workbench ORD bar with CTRL+L. The results open in a Collection Table.
  3. Values that differ per station are written as placeholders such as [stationName] and [cutoffDate], so the queries carry no real station names.
  4. Four reference docs sit beside the queries: BQL syntax, NEQL and tag dictionaries, the type hierarchy for from clauses, and ORD encoding rules.
  5. The HTTP file shows the same kind of query as a URL-encoded /ord? request, with Python and curl examples, for scripts and external tools. It notes that the Basic Hx Profile must be enabled.
  6. The scope is asset discovery, status and access review. Alarm database records and trend history are left out on purpose.

How it flows

YouReferenceWorkbenchStationPick a query by taskFill in placeholders such as the station namePress CTRL+L and pasteRun the BQL or NEQL queryMatching rowsCollection Table
  1. You to Reference: Pick a query by task
  2. You: Fill in placeholders such as the station name
  3. You to Workbench: Press CTRL+L and paste
  4. Workbench to Station: Run the BQL or NEQL query
  5. Station to Workbench: Matching rows
  6. Workbench to You: Collection Table
Running one query from the reference in Workbench. Solid arrows are requests, dashed arrows are replies.
Show this diagram as Mermaid text
sequenceDiagram
    participant P0 as You
    participant P1 as Reference
    participant P2 as Workbench
    participant P3 as Station
    P0->>P1: Pick a query by task
    P0->>P0: Fill in placeholders such as the station name
    P0->>P2: Press CTRL+L and paste
    P2->>P3: Run the BQL or NEQL query
    P3-->>P2: Matching rows
    P2-->>P0: Collection Table

Tech stack

Platform
Tridium Niagara 4, JENEsys ProBuilder
Query languages
BQL (Baja Query Language), NEQL (Niagara Entity Query Language)
Where queries run
Workbench ORD bar, Fox prefix for remote stations, HTTP ORD requests
Protocols covered
BACnet, Modbus, LonWorks, SNMP, KNX, OPC, Fox
Tag dictionaries
Niagara (n:), Project Haystack (hs:), custom tags
Format
Markdown, MIT license

Results

  • The reference is public on GitHub under the MIT license.
  • One query lists every device on a station across all protocols, and a second lists only the devices that are down or faulted.
  • The README has a decision chart for choosing between BQL, NEQL and the Java Entity API, and a table that maps common tasks to the file that answers them.
  • This is a set of reference documents with no code to run, so there are no performance numbers to report. When a query returns nothing, the type hierarchy doc explains how to find the right type name.

Every figure on this page comes from the project's own code, tests or notes. Where there is no measured number, we describe the outcome in words.

Demo

Workbench ORD bar (CTRL+L)
station:|slot:/Drivers|bql:select * from driver:Device

station:|slot:/Drivers|bql:select slotPath, displayName, status from driver:Device where status.fault = true or status.down = true

station:|slot:|neql:hs:equip|bql:select displayName, slotPath
Three queries from the reference: all devices, devices that are down or faulted, and assets tagged as Haystack equipment.

Service

Windows fleet security posture audits

Passive, read-only posture audits on every Windows host, delivered as scheduled findings reports with remediation steps.

See all custom build services

More builds

Last updated 2026-11-11

Want something like this on your data?

Tell us what you want automated. If it fits, we will tell you exactly what it looks like and what it costs.