Models
🏗️ Data Models¶
Data models and response structures for API operations.
🎛️ API Notifications¶
NetworkHD API notification data models.
NotificationEndpoint
dataclass
¶
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
¶
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
¶
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
¶
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
¶
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
¶
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_notification(notification: str) -> NotificationEndpoint | NotificationCecinfo | NotificationIrinfo | NotificationSerialinfo | NotificationVideo | NotificationSink
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 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 |
IpSetting
dataclass
¶
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:
Underlying NetworkHD API raw response examples:
EndpointAliasHostname
dataclass
¶
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 |
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:
Underlying NetworkHD API raw response example:
BaseMatrix
dataclass
¶
BaseMatrix(assignments: list[MatrixAssignment])
Base class for matrix assignments with common parsing logic
parse
classmethod
¶
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:
Underlying NetworkHD API raw response examples:
```
matrix video information:
Source1 Display1
Source1 Display2
Source2 Display3
NULL Display4
```
Matrix
dataclass
¶
Matrix(assignments: list[MatrixAssignment])
MatrixVideo
dataclass
¶
MatrixVideo(assignments: list[MatrixAssignment])
MatrixAudio
dataclass
¶
MatrixAudio(assignments: list[MatrixAssignment])
MatrixAudio2
dataclass
¶
MatrixAudio2(assignments: list[MatrixAssignment])
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:
Underlying NetworkHD API raw response example:
MatrixUsb
dataclass
¶
MatrixUsb(assignments: list[MatrixAssignment])
MatrixInfrared
dataclass
¶
MatrixInfrared(assignments: list[MatrixAssignment])
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:
Underlying NetworkHD API raw response example:
MatrixSerial
dataclass
¶
MatrixSerial(assignments: list[MatrixAssignment])
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:
Underlying NetworkHD API raw response example:
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 |
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 |
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 |
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:
Underlying NetworkHD API raw response example:
MultiviewTile
dataclass
¶
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 |
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 |