DeviceHub
6 min
devicehub devicehub is the heart of litmus edge understanding its data model makes the rest of the api obvious the hierarchy driver group (modbus, opc ua, ab ethernetip, ) └── driver (modbus tcp, opc ua client advanced, ) └── device (one configured connection to an asset) └── tag / register (one data point on that asset) └── value (live + historical) concept what it is created by driver group protocol family (modbus, opc ua, ab, siemens, etc ) litmus (fixed list) driver specific implementation within a family (modbus tcp vs modbus rtu vs modbus udp) litmus (fixed list, 146 drivers) device a configured instance of a driver pointing at a physical asset (ip, port, credentials, polling rate) user tag / register a single data point on the device (e g modbus holding register 40001) user value time series data captured by polling the tag devicehub runtime why each layer matters for the api you want to first find the create a device driver id (from listdrivergroups ) know what tag types are valid driver's supportedregisters (varies per driver) create a tag device id and the register type for that device's driver browse for tags automatically device must already exist (browse runs against a device) api entry points operation graphql on /devicehub/v2 list driver families and their drivers listdrivergroups get one driver's template (config fields, supported registers) getdriver with id "\<driver uuid>" create a device createdevice start / stop a device startdevice / stopdevice create a tag on a device createregisters list tags listregisters validate a tag payload before creating validateupdateregisters browse the device's address space createbrowsetask > startbrowsetasks > driver ids you'll see often driver id generator (simulator, useful for testing) 5bc98836 cfd4 11e9 bb65 2a2ae2dbcce4 opc ua client advanced (recommended opc ua) 2372e68f ba1b 46e9 bc07 e92ca006b377 use listdrivergroups to discover the rest live; ids are stable see also create device + tags workflow # browse bulk tag discovery workflow # opc ua advanced driver #