Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

Monitoring the status of a Live System with getStructureJson()

 3 Minutes

 0 Likes

 8 Views

The API command Pixera.LiveSystems.LiveSystem.getStructureJson() returns a JSON description of the hardware structure and current state of a Live System.

It can be used to retrieve information about:

  • The Live System itself
  • Installed graphics devices
  • Configured outputs
  • Available video devices
  • Video input streams
  • Connection and usage states

The command returns the data as a JSON string. Inside PIXERA Control, this string must be decoded before individual values can be accessed.


API Command

Pixera.LiveSystems.LiveSystem.getStructureJson(handle)

When working with a Live System handle, the command can be called directly on the handle:

local structureJson = liveSystem.getStructureJson()

Return value

Type Description
string JSON-formatted description of the Live System hardware structure

Control Example

The following example retrieves all known Live Systems, decodes their structure JSON and prints the result to the Control log:

if self.helper == nil then
	require "pixcHelper"
	self.helper = createPixcHelper(pixc, self())
end

if self.json == nil then
	self.json = require "json"
end

local systems = Pixera.LiveSystems.getLiveSystems()

for i, sys in pairs(systems) do
	local structure = self.json.decode(sys.getStructureJson())
	pixc.log(self.helper.dump(structure))
end

Pixera.LiveSystems.getLiveSystems() returns a table containing Live System handles. This table can also include systems that are currently no longer connected, as noted in the PIXERA API documentation.

The JSON result is decoded into a Lua table using:

local structure = self.json.decode(sys.getStructureJson())

The resulting table can then be inspected or processed like any other Lua table.

Note: pixcHelper is only required for creating a readable table dump. To print the original, undecoded JSON string, use:

pixc.log(sys.getStructureJson())

Returned Structure

The available properties can depend on the PIXERA version, operating system, installed hardware and device configuration.

A decoded result has the following general structure:

Live System
├── General system information
├── Graphics devices
│   └── Outputs
└── Video devices
    └── Streams

Live System properties

Property Type Description
name string Name of the Live System
ip string IP address of the Live System
state string Current engine or system state
isConnected boolean Indicates whether the system is currently connected
isInUse boolean Indicates whether the system is currently in use
client boolean Indicates whether the system is configured as a client
doAutoBackup boolean Indicates whether automatic backup is enabled
usageTag string Usage tag assigned to the system
graphicsDevices table Graphics devices detected on the system
videoDevices table Available video-device interfaces

Example:

{
	client = true,
	doAutoBackup = false,
	ip = "10.4.0.167",
	isConnected = true,
	isInUse = true,
	name = "Local",
	state = "Engine Opened",
	usageTag = "",
}

Graphics Devices

graphicsDevices contains the graphics adapters available on the Live System.

graphicsDevices = {
	[1] = {
		id = 1,
		idPath = "1",
		name = "Graphics Card 1",
		type = "Quadro RTX 4000",
		outputs = {
			-- Output entries
		},
	},
}

Graphics-device properties

Property Type Description
id number Internal device ID
idPath string Path used to identify the device
name string Display name of the graphics device
type string Detected graphics-card model
outputs table Outputs belonging to the graphics device

Graphics Outputs

Each graphics device can contain one or more output entries:

{
	active = true,
	enabled = true,
	fps = 59.0,
	id = 5,
	idPath = "1/5",
	name = "Output 5",
	resolution = {
		[1] = 2560,
		[2] = 1440,
	},
	type = "Output 1",
}

Output properties

Property Type Description
id number Internal output ID
idPath string Path of the output within the graphics device
name string Name of the output
type string Output type reported by PIXERA
enabled boolean Indicates whether the output is enabled in the configuration
active boolean Indicates whether the output is currently active
fps number Configured or reported refresh rate
resolution table Output resolution as width and height

The resolution values can be accessed as follows:

local width = output.resolution[1]
local height = output.resolution[2]

Important: enabled and active describe different states. An output can be enabled in the configuration without currently being active.


Video Devices

videoDevices contains the video interfaces and providers detected by PIXERA.

Examples include:

  • DirectShow
  • NDI
  • Art-Net/sACN
  • Spout
  • Datapath
  • Unreal Engine

Example device:

{
	id = 2,
	idPath = "Ndi_0",
	index = 0,
	name = "NDI",
	type = "Ndi",
	streams = {
		-- Stream entries
	},
}

Video-device properties

Property Type Description
id number Internal device ID
idPath string Unique device path
index number Device index
name string Display name of the device
type string Device or protocol type
streams table or nil Streams belonging to the device, if available

Not every video device contains a streams table. Code processing this property should therefore check that it exists.


Video Streams

A video device such as DirectShow or NDI can contain multiple streams:

{
	active = true,
	enabled = true,
	fps = 0.0,
	id = 4000000003,
	idPath = "Ndi_0/In_PX4-20081 (OBS PGM)",
	name = "PX4-20081 (OBS PGM)",
	resolution = {
		[1] = 0,
		[2] = 0,
	},
	type = "Input",
}

Stream properties

Property Type Description
id number Internal stream ID
idPath string Unique path of the stream
name string Stream or source name
type string Stream type, such as Input
enabled boolean Indicates whether the stream is available or enabled
active boolean Indicates whether the stream is currently active
fps number Reported frame rate
resolution table Reported width and height

Inactive or currently unused sources can report:

fps = 0.0
resolution = {
	[1] = 0,
	[2] = 0,
}

This does not necessarily mean that the source is unavailable. The final state should be evaluated together with active and enabled.


Typical Use Cases

getStructureJson() can be useful for:

  • Creating a hardware overview of all Live Systems
  • Checking output activation and resolution
  • Detecting available GPUs and video interfaces
  • Monitoring connected NDI or DirectShow sources
  • Comparing the configuration of multiple servers
  • Creating status dashboards in PIXERA Control
  • Collecting system information for troubleshooting

Notes

  • The command returns a snapshot of the structure at the time it is called.
  • The exact fields and device types can differ between PIXERA versions and systems.
  • Live Systems returned by getLiveSystems() are not necessarily connected. Check isConnected before relying on live device information.
  • Avoid calling the command at very short polling intervals. The returned JSON can contain a considerable amount of hardware and device data.

PIXERA 26.1 | 23. July 2026 | J.B.

Was this article helpful?