Skip to content

Models

🏗️ Data Models

Data models and response structures for API operations.

🎛️ API Notifications

NetworkHD API notification data models.

NotificationEndpoint dataclass

NotificationEndpoint(online: bool, device: str)

Endpoint online status notification

parse classmethod

parse(notification: str) -> NotificationEndpoint

Parse endpoint online status notification

Parameters:

Name Type Description Default
notification str

The notification string to parse

required

Returns:

Name Type Description
NotificationEndpoint NotificationEndpoint

Parsed notification object

Raises:

Type Description
ValueError

If notification format is invalid

Command applies to

NHD-110-TX/RX, NHD-100-TX, NHD-140-TX, NHD-100-RX, NHD-200-TX, NHD-200-RX, NHD-210-RX, NHD-220-RX, NHD-250-RX NHD-400-TX, NHD-400-RX, NHD-500-TX, NHD-500-RX NHD-600-TX, NHD-600-RX, NHD-600-TRX, NHD-600-TRXF, NHD-610-RX, NHD-610-TX

NotificationCecinfo dataclass

NotificationCecinfo(device: str, cec_data: str)

Endpoint CEC data notification

parse classmethod

parse(notification: str) -> NotificationCecinfo

Parse endpoint CEC data notification

Parameters:

Name Type Description Default
notification str

The notification string to parse

required

Returns:

Name Type Description
NotificationCecinfo NotificationCecinfo

Parsed notification object

Raises:

Type Description
ValueError

If notification format is invalid

Command applies to

NHD-400-TX, NHD-400-RX, NHD-500-TX, NHD-500-RX

NotificationIrinfo dataclass

NotificationIrinfo(device: str, ir_data: str)

Endpoint Infrared data notification

parse classmethod

parse(notification: str) -> NotificationIrinfo

Parse endpoint infrared data notification

Parameters:

Name Type Description Default
notification str

The notification string to parse

required

Returns:

Name Type Description
NotificationIrinfo NotificationIrinfo

Parsed notification object

Raises:

Type Description
ValueError

If notification format is invalid

Command applies to

NHD-600-TX, NHD-600-RX, NHD-600-TRX, NHD-600-TRXF, NHD-610-RX, NHD-610-TX

Notes

Infrared data will be received if the correct setting is applied to endpoints using the matrix infrared2 set command found in section 6.5 - Stream Matrix Switching – Infrared Stream Breakaway.

NotificationSerialinfo dataclass

NotificationSerialinfo(device: str, data_format: Literal['hex', 'ascii'], data_length: int, serial_data: str)

Endpoint RS-232 data notification

parse classmethod

parse(notification: str) -> NotificationSerialinfo

Parse endpoint RS-232 data notification

Parameters:

Name Type Description Default
notification str

The notification string to parse

required

Returns:

Name Type Description
NotificationSerialinfo NotificationSerialinfo

Parsed notification object

Raises:

Type Description
ValueError

If notification format is invalid

Command applies to

NHD-110-TX/RX, NHD-100-TX, NHD-100-RX, NHD-200-TX, NHD-200-RX, NHD-210-RX, NHD-220-RX, NHD-250-RX NHD-400-TX (IW only), NHD-400-RX, NHD-500-TX, NHD-500-RX NHD-600-TX, NHD-600-RX, NHD-600-TRX, NHD-600-TRXF, NHD-610-RX, NHD-610-TX

Notes

RS-232 data will generate a notification automatically on NetworkHD 100, 200 and 400 Series endpoints. On NetworkHD 600 Series endpoints, data will be received if the correct setting is applied to endpoints using the matrix serial2 set command found in section 6.6 - Stream Matrix Switching – RS-232 Stream Breakaway.

NotificationVideo dataclass

NotificationVideo(status: Literal['lost', 'found'], device: str, source_device: str | None = None)

Video input status notification

parse classmethod

parse(notification: str) -> NotificationVideo

Parse endpoint video status notification

Parameters:

Name Type Description Default
notification str

The notification string to parse

required

Returns:

Name Type Description
NotificationVideo NotificationVideo

Parsed notification object

Raises:

Type Description
ValueError

If notification format is invalid

Command applies to

NHD-400-TX, NHD-400-RX, NHD-500-TX, NHD-500-RX

Notes

Video input at a TX means the video signal entering the video input port. This is not the same thing as hotplug detection, e.g. the source has entered a standby mode and is not outputting video but is still physically connected. Video input at an RX means the AV over IP video stream from an encoder. It is not concerned with video output connections. The field in parenthesis is only used when an RX reports a (re)established connection to a TX and informs of the connected TX as the last variable.

NotificationSink dataclass

NotificationSink(status: Literal['lost', 'found'], device: str)

Sink power status notification

parse classmethod

parse(notification: str) -> NotificationSink

Parse sink power status notification

Parameters:

Name Type Description Default
notification str

The notification string to parse

required

Returns:

Name Type Description
NotificationSink NotificationSink

Parsed notification object

Raises:

Type Description
ValueError

If notification format is invalid

Command applies to

NHD-110-RX, NHD-100-RX, NHD-200-RX, NHD-210-RX, NHD-220-RX, NHD-250-RX NHD-400-RX, NHD-500-RX NHD-600-RX, NHD-600-TRX, NHD-600-TRXF, NHD-610-RX

Notes

Sink power status notifications indicate when a device's power state changes due to CEC, RS-232, or other power control commands.

NotificationParser

Utility class to parse any NetworkHD API notification

get_notification_type staticmethod

get_notification_type(notification: str) -> str

Extract the notification type from a notification string.

Parameters:

Name Type Description Default
notification str

The notification string to analyze

required

Returns:

Type Description
str

The notification type string used for callback registration

Raises:

Type Description
ValueError

If notification type is unknown

parse_notification staticmethod

Parse any NetworkHD API notification and return the appropriate notification object

Parameters:

Name Type Description Default
notification str

The notification string to parse

required

Returns:

Type Description
NotificationEndpoint | NotificationCecinfo | NotificationIrinfo | NotificationSerialinfo | NotificationVideo | NotificationSink

Union of notification objects: Parsed notification object

Raises:

Type Description
ValueError

If notification type is unknown or format is invalid

🎛️ API Query Commands

NetworkHD API query response data models.

Version dataclass

Version(api_version: str, web_version: str, core_version: str)

Version information from 'config get version'

parse classmethod

parse(response: str) -> Version

Parse 'config get version' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
Version Version

Parsed version information object

Raises:

Type Description
ValueError

If required version information cannot be found

Notes

Searches through the response for version patterns, ignoring command echoes and other noise.

Underlying NetworkHD API raw response format:

API version: v<api>
System version: v<web>(v<core>)

Underlying NetworkHD API raw response example:

API version: v1.21
System version: v8.3.1(v8.3.8)

IpSetting dataclass

IpSetting(ip4addr: str, netmask: str, gateway: str)

IP settings from 'config get ipsetting' or 'config get ipsetting2'

parse classmethod

parse(response: str) -> IpSetting

Parse 'config get ipsetting' or 'config get ipsetting2' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
IpSetting IpSetting

Parsed IP setting information object

Raises:

Type Description
ValueError

If response format is invalid or missing required settings

Notes

Underlying NetworkHD API raw response format:

ipsetting is: ip4addr <ipv4> netmask <nm> gateway <gw>

Underlying NetworkHD API raw response examples:

ipsetting is: ip4addr 169.254.1.1 netmask 255.255.0.0 gateway 169.254.1.254
ipsetting2 is: ip4addr 169.254.1.1 netmask 255.255.0.0 gateway 169.254.1.254

EndpointAliasHostname dataclass

EndpointAliasHostname(alias: str | None, hostname: str)

Endpoint name from 'config get name'

parse_single classmethod

parse_single(response: str) -> EndpointAliasHostname

Parse 'config get name' (single entry) response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
EndpointAliasHostname EndpointAliasHostname

Parsed alias/hostname information object

Raises:

Type Description
DeviceNotFoundError

If the specified device does not exist

ValueError

If response format is invalid

Notes

Underlying NetworkHD API raw response format:

<hostname>'s alias is <alias|null>

Underlying NetworkHD API raw response example:

NHD-400-TX-E4CE02104E55's alias is source1

Underlying NetworkHD API raw response erorr:

"<device_name> does not exist."

parse_multiple classmethod

parse_multiple(response: str) -> list[EndpointAliasHostname]

Parse 'config get name' (multiple entries) response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Type Description
list[EndpointAliasHostname]

list[EndpointAliasHostname]: List of parsed alias/hostname information objects

Notes

Underlying NetworkHD API raw response format:

Multiple lines, each with format <hostname>'s alias is <alias|null>

Underlying NetworkHD API raw response example:

NHD-400-TX-E4CE02104E55's alias is source1
NHD-400-TX-E4CE02104E56's alias is source2
NHD-400-RX-E4CE02104A57's alias is display1
NHD-400-RX-E4CE02104A58's alias is null

MatrixAssignment dataclass

MatrixAssignment(tx: str | None, rx: str)

Matrix assignment entry

BaseMatrix dataclass

BaseMatrix(assignments: list[MatrixAssignment])

Base class for matrix assignments with common parsing logic

parse classmethod

parse(response: str) -> T

Parse 'matrix get' response (and similar variants) with standard format

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
BaseMatrix T

Parsed matrix assignment information object

Raises:

Type Description
ValueError

If matrix assignment line format is invalid

Notes

Ignores everything before the matrix information header and parses only the actual matrix data.

Underlying NetworkHD API raw response format:

matrix [type] information:
<TXn|NULL> <RX1>
<TXn|NULL> <RX2>
...
<TXn|NULL> <RXn>

Underlying NetworkHD API raw response examples:

matrix information:
Source1 Display1
Source1 Display2
Source2 Display3
NULL Display4

```
matrix video information:
Source1 Display1
Source1 Display2
Source2 Display3
NULL Display4
```

Matrix dataclass

Matrix(assignments: list[MatrixAssignment])

Bases: BaseMatrix

Matrix assignments from 'matrix get'

MatrixVideo dataclass

MatrixVideo(assignments: list[MatrixAssignment])

Bases: BaseMatrix

Matrix video assignments from 'matrix video get'

MatrixAudio dataclass

MatrixAudio(assignments: list[MatrixAssignment])

Bases: BaseMatrix

Matrix audio assignments from 'matrix audio get'

MatrixAudio2 dataclass

MatrixAudio2(assignments: list[MatrixAssignment])

Bases: BaseMatrix

Matrix audio2 assignments from 'matrix audio2 get'

ARCAssignment dataclass

ARCAssignment(rx: str, tx: str)

ARC assignment entry

MatrixAudio3 dataclass

MatrixAudio3(assignments: list[ARCAssignment])

Matrix audio3 assignments from 'matrix audio3 get'

parse classmethod

parse(response: str) -> MatrixAudio3

Parse 'matrix audio3 get' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
MatrixAudio3 MatrixAudio3

Parsed ARC assignment information object

Raises:

Type Description
ValueError

If response format is invalid or missing TX for RX

Notes

Ignores everything before the 'matrix audio3 information:' line and parses only the actual assignment data.

Underlying NetworkHD API raw response format:

matrix audio3 information:
<RX1>
<TX1>

Underlying NetworkHD API raw response example:

matrix audio3 information:
Display1 Source1
Display2 Source3
Display5 Source2

MatrixUsb dataclass

MatrixUsb(assignments: list[MatrixAssignment])

Bases: BaseMatrix

Matrix USB assignments from 'matrix usb get'

MatrixInfrared dataclass

MatrixInfrared(assignments: list[MatrixAssignment])

Bases: BaseMatrix

Matrix infrared assignments from 'matrix infrared get'

InfraredReceiverAssignment dataclass

InfraredReceiverAssignment(device: str, mode: Literal['single', 'api', 'all', 'null'], target_device: str | None)

Infrared receiver assignment entry

MatrixInfrared2 dataclass

MatrixInfrared2(assignments: list[InfraredReceiverAssignment])

Matrix infrared2 assignments from 'matrix infrared2 get'

parse classmethod

parse(response: str) -> MatrixInfrared2

Parse 'matrix infrared2 get' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
MatrixInfrared2 MatrixInfrared2

Parsed infrared receiver assignment information object

Notes

Ignores everything before the 'matrix infrared2 information:' line and parses only the actual assignment data.

Underlying NetworkHD API raw response format:

matrix infrared2 information:
<TX1|RX1> <mode> (<TXn|RXn>)
<TX2|RX2> <mode> (<TXn|RXn>)
...

Underlying NetworkHD API raw response example:

matrix infrared2 information:
source1 single display1
display1 api
source2 api
display2 null

MatrixSerial dataclass

MatrixSerial(assignments: list[MatrixAssignment])

Bases: BaseMatrix

Matrix serial assignments from 'matrix serial get'

SerialPortAssignment dataclass

SerialPortAssignment(device: str, mode: Literal['single', 'api', 'all', 'null'], target_device: str | None)

Serial port assignment entry

MatrixSerial2 dataclass

MatrixSerial2(assignments: list[SerialPortAssignment])

Matrix serial2 assignments from 'matrix serial2 get'

parse classmethod

parse(response: str) -> MatrixSerial2

Parse 'matrix serial2 get' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
MatrixSerial2 MatrixSerial2

Parsed serial port assignment information object

Notes

Ignores everything before the 'matrix serial2 information:' line and parses only the actual assignment data.

Underlying NetworkHD API raw response format:

matrix serial2 information:
<TX1|RX1> <mode> (<TXn|RXn>)
<TX2|RX2> <mode> (<TXn|RXn>)
...

Underlying NetworkHD API raw response example:

matrix serial2 information:
source1 single display1
display1 api
source2 api
display2 null

VideoWallScene dataclass

VideoWallScene(videowall: str, scene: str)

Video wall scene entry

VideoWallSceneList dataclass

VideoWallSceneList(scenes: list[VideoWallScene])

Scene list from 'scene get'

parse classmethod

parse(response: str) -> VideoWallSceneList

Parse 'scene get' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
VideoWallSceneList VideoWallSceneList

Parsed video wall scene list information object

Raises:

Type Description
ValueError

If no valid scenes are found in response

Notes

Underlying NetworkHD API raw response format:

scene list:
<videowall1>-<scene1> <videowall1>-<scene2> ... <videowalln>-<scenen>

Underlying NetworkHD API raw response example:

scene list:
OfficeVW-Splitmode OfficeVW-Combined

VideoWallLogicalScreen dataclass

VideoWallLogicalScreen(videowall: str, scene: str, logical_screen: str, tx: str, rows: list[list[str]])

Logical screen entry

VideoWallLogicalScreenList dataclass

VideoWallLogicalScreenList(logical_screens: list[VideoWallLogicalScreen])

Video wall logical screens from 'vw get'

parse classmethod

parse(response: str) -> VideoWallLogicalScreenList

Parse 'vw get' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
VideoWallLogicalScreenList VideoWallLogicalScreenList

Parsed video wall logical screen information object

Notes

Underlying NetworkHD API raw response format:

Video wall information:
<videowall1>-<scene1>_<Lscreen1> <TX>
Row 1: <RX1> <RX2>
Row 2: <RX3> <RX4>
...

Underlying NetworkHD API raw response example:

Video wall information:
OfficeVW-Combined_TopTwo source1
Row 1: display1 display2
OfficeVW-AllCombined_AllDisplays source2
Row 1: display1 display2 display3
Row 2: display4 display5 display6

VideowallWithinWallSceneList dataclass

VideowallWithinWallSceneList(scenes: list[VideoWallScene])

Videowall within wall scene list from 'wscene2 get'

parse classmethod

parse(response: str) -> VideowallWithinWallSceneList

Parse 'wscene2 get' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
VideowallWithinWallSceneList VideowallWithinWallSceneList

Parsed videowall within wall scene list information object

Notes

Underlying NetworkHD API raw response format:

wscene2 list:
<videowall1>-<wscene1> <videowall1>-<wscene2> ... <videowalln>-<wscenen>

Underlying NetworkHD API raw response example:

wscene2 list:
OfficeVW-windowscene1 OfficeVW-windowscene2

MultiviewLayout dataclass

MultiviewLayout(rx: str, layouts: list[str])

Multiview layout entry

PresetMultiviewLayoutList dataclass

PresetMultiviewLayoutList(multiview_layouts: list[MultiviewLayout])

Preset multiview layout list from 'mscene get'

parse classmethod

parse(response: str) -> PresetMultiviewLayoutList

Parse 'mscene get' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
PresetMultiviewLayoutList PresetMultiviewLayoutList

Parsed preset multiview layout list information object

Raises:

Type Description
ValueError

If preset multiview layout line format is invalid

Notes

Ignores everything before the 'mscene list:' line and parses only the actual layout data.

Underlying NetworkHD API raw response format:

mscene list:
<RX> <lname1> <lname2> ... <lnamen>
<RXn> <lname3> <lname4> ...

Underlying NetworkHD API raw response example:

mscene list:
display5 gridlayout piplayout
display6 pip2layout
display7 grid5layout grid6layout

MultiviewTile dataclass

MultiviewTile(tx: str, x: int, y: int, width: int, height: int, scaling: Literal['fit', 'stretch'])

Multiview tile configuration

parse_tile_config classmethod

parse_tile_config(tile_config: str) -> MultiviewTile

Parse tile configuration string

Parameters:

Name Type Description Default
tile_config str

The tile configuration string to parse

required

Returns:

Name Type Description
MultiviewTile MultiviewTile

Parsed tile configuration object

Raises:

Type Description
ValueError

If tile configuration format is invalid

Notes

Underlying NetworkHD API raw response format:

<tx>:<x>_<y>_<width>_<height>:<scaling>

Underlying NetworkHD API raw response example:

source1:0_0_960_540:fit

CustomMultiviewLayout dataclass

CustomMultiviewLayout(rx: str, mode: Literal['tile', 'overlay'], tiles: list[MultiviewTile])

Custom multiview configuration entry

CustomMultiviewLayoutList dataclass

CustomMultiviewLayoutList(configurations: list[CustomMultiviewLayout])

Custom multiview layout list from 'mview get'

parse classmethod

parse(response: str) -> CustomMultiviewLayoutList

Parse 'mview get' response

Parameters:

Name Type Description Default
response str

The raw response string from the device

required

Returns:

Name Type Description
CustomMultiviewLayoutList CustomMultiviewLayoutList

Parsed custom multiview layout list information object

Raises:

Type Description
ValueError

If multiview layout line format is invalid or tile configuration is invalid

Notes

Underlying NetworkHD API raw response format:

mview information:
<RX1> [tile|overlay] <TX1>:<X1>_Y1>_<W1>_<H1>:[fit|stretch] <TX2>:<X2>_Y2>_<W2>_<H2>:[fit|stretch] ...

Underlying NetworkHD API raw response example:

mview information:
display10 tile source1:0_0_960_540:fit source2:960_0_960_540:fit source3:0_540_960_540:fit source4:960_540_960_540:fit
display11 overlay source1:100_50_256_144:fit source2:0_0_1920_1080:fit