API reference¶
Generated from the docstrings in the package. The guides cover how these fit together; this page is the exhaustive list.
Autodoc emits reStructuredText, which the markdown parser does not read, so
every directive below sits in an eval-rst block. Without it the page renders
the directive source as prose and the build still succeeds.
mx_remote - Python 3 library for interfacing with MX Remote compatible devices.
Provides device discovery, video/audio routing, volume control, remote control key passthrough, OneIP streaming, and multiviewer control over a local network using UDP multicast or broadcast.
- Main entry point:
>>> import mx_remote >>> mx = mx_remote.Remote() >>> await mx.start_async()
- Key classes:
Remote Main component that manages network connections and device registry. DeviceBase A discovered device on the network (matrix, OneIP unit, amplifier). BayBase A single input or output port on a device. MxrCallbacks Subclass to receive notifications on state changes.
See README.md for full usage documentation.
Client¶
Remote owns the socket, the device registry and the background probe that
keeps both in step with the mesh.
Remote device discovery and management over UDP multicast/broadcast.
- class mx_remote.remote.Remote.Remote[source]¶
Bases:
DeviceRegistry,ConnectionCallbacksMain component that handles the network connections and registration of remote devices
- __init__(target_ip=None, port=None, http_session=None, open_connection=True, callbacks=None, name='MXR Python', local_ip=None, broadcast=None, addr_filter=None, uid_path=None, logo_port=None)[source]¶
Initialise the remote controller.
- Parameters:
target_ip (str | None) – multicast/broadcast IP to use, or None for the default
port (int | None) – UDP port to use, or None for the default
http_session (ClientSession | None) – shared aiohttp session for API calls, or None to create one
open_connection (bool) – open the UDP connection immediately when True
callbacks (MxrCallbacks | None) – event callbacks for device state changes
name (str) – human-readable name advertised on the network
local_ip (str | None) – local interface IP to bind to, or None for any
broadcast (bool | None) – use broadcast instead of multicast when True
addr_filter (str | None) – only log frames from this IP address when set
uid_path (str | None) – file holding this client’s uid, or None for ~/.mxr-uid. Give concurrent clients on one host separate paths - see _load_uid
logo_port (int | None) – TCP port to serve overlay sync logo images on, or None for a free one
- Return type:
None
- property uid: MxrDeviceUid¶
uid of this device
- property callbacks: MxrCallbacks¶
callbacks to call when the device is updated
- property http_session: ClientSession¶
Active HTTP client session for API commands
- async update_config(callbacks=None, name=None, target_ip=None, port=None, local_ip=None, broadcast=None)[source]¶
Update runtime configuration, reconnecting if network parameters changed.
- has_completed_devices()[source]¶
Return True if at least one registered device has completed configuration.
- Return type:
- async start_async()[source]¶
Start the server that listens for mx_remote frames from other devices.
- Return type:
None
- get_by_serial(serial)[source]¶
Get the cached device matching the given serial number, or None.
- Parameters:
serial (str)
- Return type:
DeviceBase | None
- get_by_uid(remote_id)[source]¶
Get the cached device matching the given unique id, or None.
- Parameters:
remote_id (str | MxrDeviceUid | None)
- Return type:
DeviceBase | None
- uid_to_user_string(remote_id)[source]¶
return the serial of the unit if the uid is known, or the uid as string if it isn’t
- Parameters:
remote_id (str | MxrDeviceUid | bytes | None)
- Return type:
- get_bay_by_portnum(remote_id, portnum)[source]¶
Get the cached bay for a device, given the device id and port number.
- Parameters:
remote_id (str | MxrDeviceUid)
portnum (int)
- Return type:
BayBase | None
- get_bay_by_portname(remote_id, portname)[source]¶
get a bay of a device by its unique id and port name
- Parameters:
remote_id (str | MxrDeviceUid)
portname (str)
- Return type:
BayBase | None
- tx_discover()[source]¶
Transmit a discover frame. All remotes will respond with a hello frame.
- Return type:
- async set_all_oneip_device_settings(settings)[source]¶
Change settings on every OneIP device of the mesh with one frame.
settings carries the settings behind their bits in valid, as a device reports them. Each device applies those it has and ignores the rest, and none below protocol 0x2A applies any. A setting only a device reports about itself, a profile, PTP mode, PTP domain or power save level out of range, a PTP DSCP above ONEIP_DSCP_MAX, a stream TTL outside 1 to 255, a rotation above ONEIP_SINK_ROTATION_MAX and a power save time that is not a time of day are refused here, since every device would ignore them. Each device takes a rotation only by its own step.
Nothing is cached: each device that applies a change reports its settings, and its oneip_settings reads that.
- Parameters:
settings (OneIPDeviceSettings)
- Return type:
- async set_all_oneip_power_save(enabled)[source]¶
Switch power save on or off on every OneIP device of the mesh with one frame, written as Device.set_oneip_power_save() writes it. Otherwise as set_all_oneip_device_settings().
- async request_all_oneip_privacy()[source]¶
Ask every OneIP source unit of the mesh how its streams are encrypted, as Device.request_oneip_privacy() asks one. A unit below protocol 0x30 ignores it.
- Return type:
- async set_mesh_time_zone(zone, rule)[source]¶
Set the time zone of every device that hears it.
zone is an IANA name such as Europe/Amsterdam and rule the POSIX TZ rule the devices keep time by, such as CET-1CEST,M3.5.0,M10.5.0/3. A device applies the rule and shows the name. Neither may be empty, hold a NUL, or be longer than its field on the wire leaves room for; clear_mesh_time_zone() sends both empty.
The mesh controller takes it too, and announces it from then on with every periodic broadcast. A device takes it only from a management application or the controller, and this client announces itself as a management application.
- async clear_mesh_time_zone()[source]¶
Clear the time zone of every device that hears it, which then keeps UTC. Sent, received and announced as set_mesh_time_zone() with an empty name and rule.
- Return type:
- async set_mesh_time(when=None)[source]¶
Set the clock of every device that hears it to when, or to now.
A device keeps its own clock where that is within 2s of when. It takes the time only from a management application or the controller; see set_mesh_time_zone(). A time before 1970 or past 2106, which 32 bits of seconds do not hold, is refused.
- on_connection_made()[source]¶
Callback invoked after ConnectionAsync has started the server.
- Return type:
None
- process_frame(timestamp, data, addr)[source]¶
Decode and process a received mx_remote frame.
A device that may hold state this client missed is left in _state_request rather than asked here, so replaying a capture sends nothing; on_datagram_received does the asking.
- property osd_sync_held: bool¶
Whether this client holds an overlay sync, and so announces itself as the mesh’s overlay sync manager.
- async send_osd_sync(content)[source]¶
Have every unit copy content, and keep it in place, returning the sync’s number, or None when it was refused or did not go out.
Units take a sync from the mesh controller or a management application, which this client announces itself as. Each unit fetches the images from a server this client runs, then asks for the settings, which this client answers until the content is replaced or clear_osd_sync(). Meanwhile it announces itself as the mesh’s overlay sync manager, so a unit waking from power save takes this content too, rather than the controller’s. The controller can still send its own over it; the last sync a unit took is what it shows. Each unit’s osd_sync_report says how it went.
Refused for content a unit would refuse: copying nothing, more than OSD_SYNC_RECORDS_MAX settings, a caption font over OSD_SYNC_FONT_MAX or text over OSD_SYNC_TEXT_MAX bytes, a logo other than -1 to 4, or an image that is not a PNG within OSD_SYNC_IMAGE_MAX bytes and OSD_SYNC_IMAGE_WIDTH_MAX by OSD_SYNC_IMAGE_HEIGHT_MAX pixels, shown at over OSD_SYNC_PERCENT_MAX percent. Refused content leaves the held sync as it was; content that fails to go out leaves none held.
- Parameters:
content (OsdSyncContent)
- Return type:
int | None
- async resend_osd_sync(device)[source]¶
Have one unit copy the held sync again, returning the new sync’s number. As send_osd_sync().
Refused while no sync is held, and for a unit that does not announce DeviceFeature.OSD_SYNC, as one that does not take overlay syncs.
- Parameters:
device (DeviceBase)
- Return type:
int | None
- async clear_osd_sync()[source]¶
Stop holding the sync this client sent, and hand the overlay sync manager’s part back to the controller. Units keep what they took; one still taking it fails, as its requests go unanswered.
- Return type:
None
- set_all_v2ip_device_settings¶
use set_all_oneip_device_settings.
- Type:
Deprecated
Devices, bays and callbacks¶
A client works against these types rather than the classes implementing them: they are what the registry hands out and what a callback receives.
- mx_remote.Interface.mxr_valid_addresses()[source]¶
Get the list of valid local_ip addresses that can be used
- mx_remote.Interface.mxr_broadcast_address(local_ip=None)[source]¶
Get the broadcast address for the interface matching local_ip, or the first non-loopback interface.
- class mx_remote.Interface.DeviceStatus[source]¶
Bases:
IntEnumStatus of a device on the network
- ONLINE = 0¶
unit is online
- OFFLINE = 1¶
unit is offline
- REBOOTING = 2¶
unit indicated that it is going to reboot
- BOOTING = 3¶
unit is booting
- INACTIVE = 4¶
bay is inactive (OneIP encoder/decoder idle)
- __new__(value)¶
- class mx_remote.Interface.FirmwareVersion[source]¶
Bases:
objectOne firmware component’s version. timestamp is when the image was built or installed, in seconds since 1970, or 0 when it carries none, and hash the image’s checksum.
- class mx_remote.Interface.VideoColourSpace[source]¶
Bases:
IntEnumVideo colour space encoding format.
- __new__(value)¶
- class mx_remote.Interface.VideoSignalDetails[source]¶
Bases:
objectVideo format of a bay: CTA-861 svd, colour space, bit depth, frame rate kind.
from_reportsays where it came from, because the two sources do not carry the same currency. A signal status report is the live format and arrives on a signal change. The bay config snapshot is a fallback for a bay no report has been seen for: it refreshes on the bay config broadcast cycle, so it can lag a change by a broadcast interval.bppis a bit depth in both cases, not a wire index. None means no format is set; 0 means one is set whose depth is not known, and those are different answers.- __init__(svd, colour, bpp, non_int, from_report)[source]¶
- Parameters:
svd (int | None)
colour (VideoColourSpace | None)
bpp (int | None)
non_int (bool | None)
from_report (bool)
- Return type:
None
- property colour: VideoColourSpace | None¶
Colour space, or None when no format is set or the value is unknown to this build.
- class mx_remote.Interface.AmpDolbySettings[source]¶
Bases:
objectDolby Digital settings for an amplifier
- class mx_remote.Interface.AmpZoneSettings[source]¶
Bases:
objectZone specific settings for an amplifier input/output
- class mx_remote.Interface.OneIPAudioFormat[source]¶
Bases:
objectOneIP audio format (sample rate + channels). Zero values mean “use firmware defaults”.
- class mx_remote.Interface.OneIPStreamSource[source]¶
Bases:
ABCOneIP multicast IP address and port number
- class mx_remote.Interface.OneIPStreamSources[source]¶
Bases:
objectAll OneIP multicast IP addresses and port numbers used by a device
- abstract property uid: MxrDeviceUid | None¶
uid of the originating source device, when known
- abstract property video: OneIPStreamSource¶
video stream source
- abstract property audio: OneIPStreamSource¶
audio stream source
- abstract property anc: OneIPStreamSource¶
ancillary stream source
- abstract property arc: OneIPStreamSource | None¶
audio return stream source
- property valid: bool¶
True when this entry carries a usable address.
Video and anc must both be multicast with a non-zero port; audio is optional and rides along. A sender without MXR_FEATURE_CONFIG_INITIALISED can put stack contents in bay 0’s addresses under its own uid, which rarely satisfy both halves of this test.
- class mx_remote.Interface.OneIPStreamSourcesList[source]¶
Bases:
list[OneIPStreamSources]list of OneIP sources
- class mx_remote.Interface.AudioEndpoint[source]¶
Bases:
ABC- property status: AudioFeatures | None¶
The state this endpoint reports, on the bits of its features: FEATURE_MUTE while it is muted, FEATURE_TRIGGER while its trigger is active, and FEATURE_AUDIO_LOCK while its audio source is locked. None when the device did not report one.
- property audio_locked: bool | None¶
Whether this endpoint keeps its audio source when the video route changes, None when it has reported no status.
- is_v2ip¶
use is_oneip.
- Type:
Deprecated
- class mx_remote.Interface.DeviceList[source]¶
Bases:
list[MxrDeviceUid]- append(item)[source]¶
Append object to the end of the list.
- Parameters:
item (MxrDeviceUid)
- Return type:
None
- class mx_remote.Interface.FilteredDevices[source]¶
Bases:
DeviceListlist of filtered devices
- class mx_remote.Interface.BayContentField[source]¶
Bases:
objectOne thing an input’s source is showing, such as its channel name.
A source reports these as named values in the order they are meant to be shown. The names are open-ended: a driver for a new kind of source adds its own without any other unit changing, so a caller passes on names it does not know.
- class mx_remote.Interface.BayContent[source]¶
Bases:
tuple[BayContentField, …]What the source on an input is showing, as its unit last reported it: the fields in the order they are meant to be shown, empty when it shows nothing.
The content outlives the signal, so check signal_detected before showing it.
- class mx_remote.Interface.BayBase[source]¶
Bases:
ABCA bay (input/output) of an mx_remote device
- abstract property status: DeviceStatus¶
bay status
- abstract property callbacks: MxrCallbacks¶
mx_remote callbacks
- abstract property device: DeviceBase¶
device to which this bay belongs
- abstract property features: BayFeaturesMask¶
List of supported features as strings
- abstract property video_route_endpoint: str | None¶
port’ literal when the sink is subscribed to a multicast that does not map to any registered input bay; else None.
- Type:
Current video route as ‘ip
- abstract property audio_route_endpoint: str | None¶
port’ literal when the sink is subscribed to a multicast that does not map to any registered input bay; else None.
- Type:
Current audio route as ‘ip
- abstract property powered_on: bool¶
True the connected device supports CEC and reports that the device is powered on
- abstract property powered_off: bool¶
True the connected device supports CEC and reports that the device is powered off
- abstract property power_status: PowerStatus¶
Power status
True if flagged as hidden
- abstract property zone_powered: bool¶
True if the amplifier zone the bay drives is powered on. Only a ProAmp8v2 reports it.
- property poe_powered: bool¶
use zone_powered. Bay status bit 2 says an amplifier zone is powered on, not that PoE is.
- Type:
Deprecated
- abstract property signal_detected: bool¶
Video signal detected (matrix/oneip) or audio signal detected (proamp)
- abstract property video_details: VideoSignalDetails | None¶
Current video format, or None if neither source has carried one.
Prefers the signal status report, which arrives on a signal change, and falls back to the bay config snapshot for a bay no report has been seen for. Read from_report to tell which one this is.
- abstract property content: BayContent¶
What the source on this input is showing, as its unit last reported it; empty when it shows nothing or its unit has no source driver.
- abstract property mirroring: BayMirrorStatus¶
Bay mirroring status
- abstract property filtered: FilteredDevices¶
Filtered bays
- abstract property oneip_source: OneIPStreamSources | None¶
OneIP source address information
- abstract property oneip_uid: MxrDeviceUid | None¶
Remote OneIP device uid
- abstract property oneip_device: DeviceBase | None¶
Remote OneIP device
- abstract property linked_bay: BayBase | None¶
linked bay if an mx-remote virtual link has been set up
- abstract property amp_settings: AmpZoneSettings | None¶
proamp zone settings
- abstract property audio_endpoint: AudioEndpoint | None¶
primary audio endpoint. currently v2ip only
- abstractmethod async select_video_source(port, opt=True)[source]¶
change the video source of an output bay
- abstractmethod async select_video_source_by_user_name(name, opt=True)[source]¶
change the video source of an output bay
- abstractmethod async select_audio_source(source, endpoint=None, audio_fmt=None)[source]¶
change the audio source of an output bay
- abstractmethod async select_edid_profile(profile)[source]¶
change the edid profile of an input bay
- Parameters:
profile (EdidProfile)
- Return type:
- abstractmethod async power_on()[source]¶
power on the remote device if CEC is supported
- Return type:
- abstractmethod async power_off()[source]¶
power off the remote device if CEC is supported
- Return type:
- abstractmethod register_callback(callback)[source]¶
register a callback, called when the bay state changed
- abstractmethod call_callbacks()[source]¶
notify callbacks that this bay has changed
- Return type:
None
- is_v2ip_remote¶
use is_oneip_remote.
- Type:
Deprecated
- is_v2ip_sink¶
use is_oneip_sink.
- Type:
Deprecated
- is_v2ip_source¶
use is_oneip_source.
- Type:
Deprecated
- v2ip_device¶
use oneip_device.
- Type:
Deprecated
- v2ip_source¶
use oneip_source.
- Type:
Deprecated
- v2ip_uid¶
use oneip_uid.
- Type:
Deprecated
- class mx_remote.Interface.SelectedBays[source]¶
Bases:
objectA route a frame reports for an output. video and audio are None where the frame names no bay, and the port of a OneIP unit’s input its mappings have yet to create; clear_video says the output shows nothing, and audio_follows that its audio follows its video again.
- class mx_remote.Interface.DeviceOneIPScalingSettings[source]¶
Bases:
ABC- abstract property refresh: int¶
Refresh rate paired with mode, under the same MXR_SCALING_FLAG_MODE_VALID marker
- abstract property flags: int¶
mxr_scaling_config.flags.
MXR_SCALING_FLAG_MODE_VALID, MXR_SCALING_FLAG_OPTIONS_VALID and MXR_SCALING_FLAG_OPTIONS2_VALID mark which part a sender meant to send, and are separately valid; a sender setting none of them is offering no scaling at all. MXR_SCALING_FLAG_AUTO_SCALING sits behind the first marker, MXR_SCALING_FLAG_MATCH_SOURCE and MXR_SCALING_FLAG_SKIP_420 behind the second.
- property configured_mode: tuple[MxrSignalType, int] | None¶
The mode and refresh rate this sink scales to, None when it has none.
The two are distinct on the wire: a sink with no mode configured leaves MXR_SCALING_FLAG_MODE_VALID clear, and never sets it over a zero mode.
Trust it only from a peer whose hello carries CONFIG_INITIALISED (DeviceBase.config_initialised). Firmware without that builds this block over uninitialised stack, where the valid bit itself is noise.
- property auto_scaling: bool | None¶
Whether the output scales automatically, None when the sender did not say.
- property match_source: bool | None¶
Whether the output follows its source’s format, None when the device has never said.
Firmware with this option announces it on every configuration it sends about itself, so a device that has reported it once is known to have it. The cached block accumulates its validity bit, so a later write carrying only the first options group does not take that back.
Reported only from a sender announcing DeviceBase.config_initialised, which is why this needs no caveat of its own: no firmware has these options without that announcement, and one that lacks it would be reporting uninitialised stack. That is the difference from configured_mode, which is reported from any sender because a mode can be genuine on one of those.
- mx_remote.Interface.oneip_stream_valid(stream)[source]¶
True when a stream source carries an address a frame actually meant to send.
Mirrors the firmware’s own test: a multicast ip and a non-zero port. A controller write that offers no addresses leaves the block zeroed, which fails both tests.
- Parameters:
stream (OneIPStreamSource | None)
- Return type:
- mx_remote.Interface.oneip_av_source_valid(video, anc)[source]¶
True when an av source block carries addresses a frame meant to send.
Mirrors the firmware’s own test: video and anc must both be valid, audio is optional and is carried along with them.
- Parameters:
video (OneIPStreamSource | None)
anc (OneIPStreamSource | None)
- Return type:
- mx_remote.Interface.oneip_stream_cleared(stream)[source]¶
True when a stream source is zeroed, which is how “no source” is spelled.
- Parameters:
stream (OneIPStreamSource | None)
- Return type:
- class mx_remote.Interface.OneIPOutputMode[source]¶
Bases:
objectThe output format to scale a OneIP sink to.
Built from a depth and a colour space rather than from a packed mxr_signal_type word, so the word a caller sends cannot carry the unset bpp index a sink reports while it has no mode configured.
- __init__(svd, depth, colour, refresh)[source]¶
- Parameters:
svd (int)
depth (int)
colour (VideoColourSpace)
refresh (int)
- Return type:
None
- svd¶
CTA-861 short video descriptor to output.
- depth¶
8, 10 or 12.
- Type:
Bit depth
- colour¶
Colour space to output.
- refresh¶
Refresh rate in Hz, ONEIP_SCALING_REFRESH_MIN to ONEIP_SCALING_REFRESH_MAX.
- validate()[source]¶
Why a sink will refuse this mode, or None when it will take it.
Checked here because a sink checks it and then says nothing: every value this rejects is one the receiver decodes cleanly and drops, leaving a caller with a send that succeeded and a setting that did not move.
Passing is not a guarantee. A sink also weighs the format against the EDID of the display attached to it and against what its own clock and output stage can produce, and none of that is knowable from here.
- Return type:
str | None
- property signal_type: MxrSignalType¶
The packed signal type a scaling write carries for this mode.
Call validate() first: an unvalidated depth packs as the index for “no depth”, which a receiver drops.
- class mx_remote.Interface.OneIPScalingSettings[source]¶
Bases:
DeviceOneIPScalingSettingsPlain holder for a merged mxr_scaling_config.
- property refresh: int¶
Refresh rate paired with mode, under the same MXR_SCALING_FLAG_MODE_VALID marker
- property flags: int¶
mxr_scaling_config.flags.
MXR_SCALING_FLAG_MODE_VALID, MXR_SCALING_FLAG_OPTIONS_VALID and MXR_SCALING_FLAG_OPTIONS2_VALID mark which part a sender meant to send, and are separately valid; a sender setting none of them is offering no scaling at all. MXR_SCALING_FLAG_AUTO_SCALING sits behind the first marker, MXR_SCALING_FLAG_MATCH_SOURCE and MXR_SCALING_FLAG_SKIP_420 behind the second.
- class mx_remote.Interface.OneIPDscpConfig[source]¶
Bases:
objectPer-stream DSCP marking carried in a OneIP device configuration.
DSCP 0 (CS0) is a legal marking, so each wire byte carries a set bit alongside its value and a stream whose byte is unset reads back as None here. A unit treats the marking as all-or-nothing: it keeps a frame’s markings only when all three streams carry a value, and otherwise keeps the ones it had -
completereports which case a frame is in.
- class mx_remote.Interface.DeviceOneIPDetails[source]¶
Bases:
objectOneIP stream source details for a device
- __init__(video, audio, anc, arc, tx_rate, scaling, dscp=None, whole_scaling=False)[source]¶
whole_scaling says the scaling block is the sink’s whole state rather than a write of one part of it, so a mode it does not carry is a mode the sink no longer has.
- Parameters:
video (OneIPStreamSource | None)
audio (OneIPStreamSource | None)
anc (OneIPStreamSource | None)
arc (OneIPStreamSource | None)
tx_rate (int | None)
scaling (DeviceOneIPScalingSettings | None)
dscp (OneIPDscpConfig | None)
whole_scaling (bool)
- Return type:
None
- property tx_rate: int | None¶
Source rate this device transmits at, or None if none is known.
Only a rate within ONEIP_SOURCE_RATE_MIN..MAX is one a sender meant to send; anything else is an absent offer rather than a rate, and merge() keeps the previously known value instead of caching what was on the wire.
- property dscp: OneIPDscpConfig | None¶
Per-stream DSCP marking, or None from peers that predate it.
- merge(previous)[source]¶
Carry forward every field this frame did not carry.
A controller writing one field of a peer’s config leaves the others zeroed on the wire, so each is applied only behind its own validity marker. See FrameV2IPDeviceConfiguration for the markers.
- Parameters:
previous (DeviceOneIPDetails | None)
- Return type:
- class mx_remote.Interface.DeviceOneIPSink[source]¶
Bases:
objectA OneIP sink’s effective multicast subscriptions and resolved audio format.
Mirrors the sink-side state broadcast alongside v2ip_device_config updates and manual-switch frames.
addressesis None when no active route is announced; when present, each stream may still carry an all-zero ip when that stream is inactive.audio_fmtcarries the resolved sink audio format (zero fields fall back to firmware defaults of 48kHz / 2 channels).An address that reads as unset means “no route, or the sink could not work one out”, never “definitely not subscribed”. This block is the one part of a device configuration with no validity marker of its own, so a sink with nothing to say sends zeros and they are stored. A sender leaves it empty whenever its own stream configuration does not resolve, which covers more than having no route: a selected source whose record has not arrived yet, the state after a restart at either end, missing audio bay configuration, or a stream failing its validity check.
audio_fmthas a second gate of its own, so it can be absent while the addresses are not.Expect that reading rather than guarding against it. Any scaling change makes the device rebuild and rebroadcast this block, so an empty reading turns up most often during exactly the no-signal troubleshooting that prompted the change. A device’s periodic report puts a real route back within a minute of it having one, so a reader that needs certainty should wait one out rather than treat the first empty reading as an answer.
An empty reading is cached rather than dropped on purpose. A sink that has genuinely lost its route sends the same zeros, and so does every report after it, so refusing them would hold a route that nothing later could clear.
Only the device’s own report sets this. A controller writing another device’s configuration sends the block zeroed, and that frame is ignored.
- __init__(addresses, audio_fmt)[source]¶
- Parameters:
addresses (OneIPStreamSources | None)
audio_fmt (OneIPAudioFormat | None)
- Return type:
None
- class mx_remote.Interface.TimeZone[source]¶
Bases:
objectThe time zone a device announces for its mesh.
The mesh controller announces it with every periodic broadcast, and each device of the mesh keeps its clock and its power save windows by it. An empty zone and rule mean the controller has none, and the devices keep UTC.
- class mx_remote.Interface.DeviceClock[source]¶
Bases:
objectThe time a device last announced, and when that arrived here.
- class mx_remote.Interface.OneIPPowerSaveSchedule[source]¶
Bases:
objectA OneIP device’s daily power save windows, Monday first, in the device’s time zone.
Day
dpowers down atstart[d]and up again atend[d], both in minutes after midnight. A window belongs to the day it starts on and runs past midnight into the next when it ends before it starts; one that ends where it starts means no window that day.
- class mx_remote.Interface.UnitNetConfig[source]¶
Bases:
objectAn IP configuration: the addresses a unit uses, or is told to use.
- property addresses: tuple[str, str, str, str, str]¶
The five addresses, in the order the wire carries them.
- class mx_remote.Interface.UnitStatus[source]¶
Bases:
objectA unit’s health and IP configuration, as it last reported them.
A unit reports this about itself with its periodic broadcast, and within a few seconds of a change to its flags, its status or its addresses.
- network: UnitNetConfig = UnitNetConfig(ip='0.0.0.0', netmask='0.0.0.0', gateway='0.0.0.0', dns1='0.0.0.0', dns2='0.0.0.0')¶
The IP configuration in use.
- temperatures: tuple[int, ...] = ()¶
Temperatures in degrees Celsius, at most UNIT_MAX_TEMPERATURES of them.
- power_save: tuple[UnitPowerSave, ...] = ()¶
What the unit offers at each power save level, from OneIPPowerSaveLevel.REDUCED up; empty for a unit that predates the field. A route change or a command wakes the unit at every level it supports.
- power_save_level(level)[source]¶
What the unit offers at a power save level, empty for OneIPPowerSaveLevel.NONE or a level it does not report.
- Parameters:
level (OneIPPowerSaveLevel | int)
- Return type:
- property network_pending: bool¶
Whether an IP configuration changed through the mesh waits for the mesh controller to confirm it.
- __init__(flags=<UnitFlag: 0>, uptime=0, boot_count=None, reboot_count=0, encoder_health=0, decoder_health=0, network=UnitNetConfig(ip='0.0.0.0', netmask='0.0.0.0', gateway='0.0.0.0', dns1='0.0.0.0', dns2='0.0.0.0'), fan_rpm=None, fan_duty=0, status=0, net_revert_s=0, temperatures=(), status_message='', power_save=())¶
- Parameters:
- Return type:
None
- class mx_remote.Interface.OneIPPtpState[source]¶
Bases:
objectA OneIP device’s PTP state, as it reports it about itself.
Only the device can read its own video processor, so this is never written to a device, and a controller’s frame about one carries none.
- flags: OneIPPtpFlag = 0¶
The block’s flags.
- mode: OneIPPtpMode | int = 0¶
The mode the video processor runs; a raw int for one this library does not name.
- lock: OneIPPtpLock | int = 0¶
How far the clock has locked; a raw int for a value this library does not name.
- grandmaster_identity: bytes = b'\x00\x00\x00\x00\x00\x00\x00\x00'¶
The clock identity of the grandmaster the device runs on, all zero while it runs on none.
- property followed: bool¶
Whether the device locked to a master since its PTP started, so its mesh holds a time.
- __init__(flags=<OneIPPtpFlag: 0>, mode=OneIPPtpMode.OFF, domain=0, port_state=0, lock=OneIPPtpLock.UNLOCKED, clock_identity=b'\x00\x00\x00\x00\x00\x00\x00\x00', grandmaster_identity=b'\x00\x00\x00\x00\x00\x00\x00\x00')¶
- Parameters:
flags (OneIPPtpFlag)
mode (OneIPPtpMode | int)
domain (int)
port_state (int)
lock (OneIPPtpLock | int)
clock_identity (bytes)
grandmaster_identity (bytes)
- Return type:
None
- class mx_remote.Interface.OneIPDownmix[source]¶
Bases:
objectHow a OneIP output mixes 5.1 and 7.1 PCM down to stereo, and whether it does now.
A device reports it once its video processor has answered for it, so never one whose output cannot mix down.
- mode: OneIPDownmixMode | int = 0¶
When the output mixes down; a raw int for a mode this library does not name.
- level: OneIPDownmixLevel | int = 0¶
How loud the mix is; a raw int for a level this library does not name.
- lfe: int = 0¶
The percent the LFE channel is mixed in at, at most ONEIP_DOWNMIX_LFE_MAX; 0 leaves it out.
- state: int = 0¶
Why the stream is or is not mixed down, as the device’s own code. Only the device reports it.
- channels: int = 0¶
The stream’s channels while it is mixed down, else 0. Only the device reports it.
- written(write)[source]¶
The settings of write applied to this report, which keeps what only the device reports.
- Parameters:
write (OneIPDownmix)
- Return type:
- __init__(mode=OneIPDownmixMode.OFF, level=OneIPDownmixLevel.NORMALISED, lfe=0, state=0, channels=0)¶
- Parameters:
mode (OneIPDownmixMode | int)
level (OneIPDownmixLevel | int)
lfe (int)
state (int)
channels (int)
- Return type:
None
- class mx_remote.Interface.OneIPVlan[source]¶
Bases:
objectVLAN tagging on a OneIP device’s uplink.
Only the device knows what it runs, so this is what it reported about itself. A change written to it is applied at once and stays PENDING until the mesh controller confirms it, which proves the device still reaches the mesh and the mesh still reaches it; unconfirmed, the device reverts it.
- flags: OneIPVlanFlag = 0¶
The block’s flags.
- port: tuple[int, ...] = (0, 0, 0)¶
The VLAN id each downlink port carries, 0 to share the device’s untagged traffic, indexed as ONEIP_VLAN_PORTS orders them.
- active_uplink: int = 0¶
the port in use as the uplink, as 1 + its index.
- Type:
Reported by the device
- revert_s: int = 0¶
the seconds before a pending configuration is reverted.
- Type:
Reported by the device
- property is_pending: bool¶
Whether the device reverts this configuration unless the mesh controller confirms it.
- property pinned_uplink_port: int | None¶
The index of the port pinned as the uplink, None when the device detects it.
- property active_uplink_port: int | None¶
The index of the port the device uses as its uplink, None for a value that names no port.
- class mx_remote.Interface.OneIPPtpMessages[source]¶
Bases:
objectHow a OneIP device paces its PTP messages, its SAP timings, its streams’ TTL and its output’s rotation, which a frame carries in the same block. Each value is behind its own bit of OneIPDeviceSettings.valid, one of ONEIP_DEVICE_SETTINGS_BLOCK.
Intervals are base-2 logarithms of seconds, so -3 is 125 ms and 1 is 2 s.
- announce_timeout: int = 0¶
The announce intervals before a silent master is dropped, behind PTP_ANNOUNCE_TIMEOUT.
- sap_expire_min: int = 0¶
The minutes after which a SAP announcement the device heard is forgotten, behind SAP_EXPIRE.
- stream_ttl: int = 0¶
The TTL of the device’s streams, 1 to 255, behind STREAM_TTL. A device whose video processor cannot change it keeps the setting and sends ONEIP_STREAM_TTL_DEFAULT.
- sink_rotation: int = 0¶
The degrees the device’s HDMI output is turned by, clockwise, at most ONEIP_SINK_ROTATION_MAX, behind SINK_ROTATION.
- sink_rotation_step: int = 0¶
the device takes only an angle that is a multiple of it, and 0 alone when it is 0. Only the device reports it, behind the same bit.
- Type:
The step the output turns by
- takes_sink_rotation(degrees)[source]¶
Whether a device reporting this step takes degrees as its output’s rotation.
- merge(other, which)[source]¶
The values behind the bits of which copied from other, the rest kept.
- Parameters:
other (OneIPPtpMessages)
which (OneIPDeviceSetting)
- Return type:
- describe(valid)[source]¶
The values behind the bits of valid, one “name=value” each.
- Parameters:
valid (OneIPDeviceSetting)
- Return type:
- __init__(log_announce_interval=0, log_sync_interval=0, log_delay_req_interval=0, announce_timeout=0, dscp=0, sap_expire_min=0, sap_interval_s=0, stream_ttl=0, sink_rotation=0, sink_rotation_step=0)¶
- class mx_remote.Interface.OsdSyncSlot[source]¶
Bases:
objectOne logo slot, as an overlay sync describes it.
- class mx_remote.Interface.OsdSync[source]¶
Bases:
objectAn overlay sync, as its source sent it: a management unit having other units copy its overlay captions, logo choice and place, backgrounds and logo images. A unit takes one only from a management unit: the mesh controller, or one that announces DeviceFeature.MANAGER.
- target: MxrDeviceUid¶
The unit it is for, or an empty uid for every unit.
- what: OsdSyncWhat¶
What it copies.
- slots: tuple[OsdSyncSlot, ...] | None¶
The logo slots, when it copies them. A unit fetches a slot whose size or CRC differs from its own from http://source_ip:http_port/osd-sync/slotN.png, N being 1 to 4.
- __init__(seq, target, what, http_port, source_ip, records, slots)¶
- Parameters:
seq (int)
target (MxrDeviceUid)
what (OsdSyncWhat)
http_port (int)
source_ip (str)
records (int)
slots (tuple[OsdSyncSlot, ...] | None)
- Return type:
None
- class mx_remote.Interface.OsdSyncRequest[source]¶
Bases:
objectA unit asking for an overlay sync, or for settings of one it is taking, or management asking for a new sync for a unit.
- target: MxrDeviceUid¶
The unit the sync is for, which sent the request unless management did.
- what: OsdSyncWhat¶
What it asks a new sync to copy.
- source: MxrDeviceUid¶
Who sent the sync it asks about. Empty when it asks for a new sync.
- __init__(target, seq, what, missing, source)¶
- Parameters:
target (MxrDeviceUid)
seq (int)
what (OsdSyncWhat)
missing (bytes)
source (MxrDeviceUid)
- Return type:
None
- class mx_remote.Interface.OsdCaption[source]¶
Bases:
objectA caption, as an overlay setting gives it.
- __init__(text='', font='', size=0, x=-32768, y=-32768, wrap=-2, align=OsdCaptionAlign.DEFAULT, format=OsdCaptionFormat.DEFAULT, colour=4294967295)¶
- class mx_remote.Interface.OsdLogo[source]¶
Bases:
objectA logo choice and place, as an overlay setting gives it.
- mx_remote.Interface.OsdSyncValue = mx_remote.Interface.OsdCaption | mx_remote.Interface.OsdLogo | int¶
a caption, a logo choice and place, or a background colour as 0xRRGGBB, 0xFFFFFFFF for the layout’s.
- Type:
What one overlay setting sets
- class mx_remote.Interface.OsdSyncSetting[source]¶
Bases:
objectOne setting of an overlay sync, which its source sends to one unit.
- target: MxrDeviceUid¶
The unit it is for.
- size: OsdSyncSize | int¶
The output size it applies at.
- set: int¶
OsdCaptionField bits for a caption, OsdLogoField bits for a logo, and bit 0 for a background’s colour.
- Type:
The fields it gives
- __init__(seq, target, index, records, size, layers, set, value)¶
- Parameters:
seq (int)
target (MxrDeviceUid)
index (int)
records (int)
size (OsdSyncSize | int)
layers (int)
set (int)
value (OsdCaption | OsdLogo | int)
- Return type:
None
- class mx_remote.Interface.OsdSyncReport[source]¶
Bases:
objectHow a unit is getting on with an overlay sync. A unit reports taking, then done or failed. One in power save reports deferred, and reports again once it takes the sync on waking.
- class mx_remote.Interface.OsdMessage[source]¶
Bases:
objectThe message on a unit’s output, as the unit last reported it. The unit holds it until it restarts.
- flags: OsdMessageFlag¶
Whether a message is set and shown, whether the unit can show one, and whether it refused the write it answers. Without SET the other fields are empty.
- priority: OsdMessagePriority | int¶
Where it stands against the unit’s own messages.
- __init__(flags, logo, priority, text)¶
- Parameters:
flags (OsdMessageFlag)
logo (int)
priority (OsdMessagePriority | int)
text (str)
- Return type:
None
- class mx_remote.Interface.OsdSyncEntry[source]¶
Bases:
objectOne setting of an overlay sync this client sends.
- value: OsdCaption | OsdLogo | int¶
What it sets.
- set: int¶
The fields it gives, as in OsdSyncSetting.set. A field given its default value goes back to the layout’s.
- size: OsdSyncSize = 1¶
The output size it applies at.
- layers: int = 1¶
The layers it applies to, a bit per layer. A unit leaves out the layers it does not have, and skips the setting when none is left.
- __init__(value, set, size=OsdSyncSize.LARGE, layers=1)¶
- Parameters:
value (OsdCaption | OsdLogo | int)
set (int)
size (OsdSyncSize)
layers (int)
- Return type:
None
- class mx_remote.Interface.OsdSyncImage[source]¶
Bases:
objectThe logo image for one slot.
- class mx_remote.Interface.OsdSyncContent[source]¶
Bases:
objectWhat this client has units copy.
- what: OsdSyncWhat¶
The kinds of setting it copies. OsdSyncWhat.LOGO_SLOTS follows from images.
- entries: tuple[OsdSyncEntry, ...] = ()¶
The settings, which units write in this order.
- images: tuple[OsdSyncImage, ...] | None = None¶
The four logo slots, or None to leave every unit’s own.
- __init__(what, entries=(), images=None)¶
- Parameters:
what (OsdSyncWhat)
entries (tuple[OsdSyncEntry, ...])
images (tuple[OsdSyncImage, ...] | None)
- Return type:
None
- class mx_remote.Interface.OneIPSinkSdp[source]¶
Bases:
objectWhat a OneIP output plays from a session description, as it last reported it. The stream’s fields are zero while it plays none.
- flags: OneIPSdpFlag = 0¶
The report’s flags.
- encoding: OneIPSdpEncoding | int = 0¶
The sample encoding; a raw int for one this library does not name.
- clock_mode: OneIPSdpClockMode | int = 0¶
What the video processor times the stream by, behind OneIPSdpFlag.CLOCK.
- clock_state: OneIPSdpClockState | int = 0¶
How far the video processor has got with its timing, behind OneIPSdpFlag.CLOCK.
- __init__(flags=<OneIPSdpFlag: 0>, screen=0, encoding=OneIPSdpEncoding.NONE, channels=0, payload_type=0, media_clock=OneIPSdpMediaClock.NONE, ref_clock=OneIPSdpRefClock.NONE, clock_mode=OneIPSdpClockMode.ARRIVAL, clock_state=OneIPSdpClockState.IDLE, port=0, rate_hz=0, media_clock_offset=0, group='0.0.0.0', name='', layout='')¶
- Parameters:
flags (OneIPSdpFlag)
screen (int)
encoding (OneIPSdpEncoding | int)
channels (int)
payload_type (int)
media_clock (OneIPSdpMediaClock | int)
ref_clock (OneIPSdpRefClock | int)
clock_mode (OneIPSdpClockMode | int)
clock_state (OneIPSdpClockState | int)
port (int)
rate_hz (int)
media_clock_offset (int)
group (str)
name (str)
layout (str)
- Return type:
None
- class mx_remote.Interface.OneIPPrivacyStream[source]¶
Bases:
objectHow one of a OneIP source unit’s streams is encrypted, as the unit reports it: the values of the stream’s
a=privacyanda=extmapsession description attributes.A receiver needs these to decrypt the stream. The key itself never travels: every unit of a mesh holds the same one. This library holds no key and decrypts nothing.
- on: bool = False¶
Whether the stream is encrypted. Without it the stream goes out in the clear, and the fields below mean nothing.
- key_generator: bytes = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'¶
The key generator, 16 bytes.
- key_id: bytes = b'\x00\x00\x00\x00\x00\x00\x00\x00'¶
Names the mesh’s key, 8 bytes. A receiver holding another drops the stream.
- __init__(group='0.0.0.0', port=0, version=0, on=False, full_id=0, short_id=0, iv=b'\x00\x00\x00\x00\x00\x00\x00\x00', key_generator=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', key_id=b'\x00\x00\x00\x00\x00\x00\x00\x00', key_version=0)¶
- class mx_remote.Interface.OneIPPrivacy[source]¶
Bases:
objectHow a OneIP source unit’s streams are encrypted, as it last reported it. A unit reports this whenever it changes, at least once a minute, and when asked. A unit that is in no mesh sends in the clear.
- anc: OneIPPrivacyStream¶
The ancillary data stream.
- __init__(video, audio, anc)¶
- Parameters:
video (OneIPPrivacyStream)
audio (OneIPPrivacyStream)
anc (OneIPPrivacyStream)
- Return type:
None
- class mx_remote.Interface.OneIPTestTone[source]¶
Bases:
objectA OneIP sink’s test tone.
- mode: OneIPToneMode | int = 0¶
What plays; a raw int for a mode this library does not name.
- class mx_remote.Interface.OneIPTestSync[source]¶
Bases:
objectA OneIP sink’s lip-sync flash: a pattern frame is marked every
period, the frameleadafter a mark flashes white, and a BEEP tone startsoffsetsample periods after it.The offset is a calibration: nothing measures the sink’s own delay between a picture and a sample reaching the HDMI link, and a display adds its own.
- class mx_remote.Interface.OneIPTestcard[source]¶
Bases:
objectThe test card a OneIP sink draws on its output, as it last reported it.
A sink reports it only when asked, with request_oneip_testcard() or in answer to a change. The counters run free and wrap.
- flags: OneIPTestcardFlag = 0¶
What the sink reports about its test card.
- pattern: OneIPTestPattern | int = 0¶
The pattern; a raw int for a pattern this library does not name.
- tone: OneIPTestTone = OneIPTestTone(mode=<OneIPToneMode.OFF: 0>, freq=0, level=0, channels=0, rate=0)¶
The tone.
- sync: OneIPTestSync = OneIPTestSync(period=0, lead=0, offset=0, beep_ms=0)¶
The lip-sync flash.
- __init__(flags=<OneIPTestcardFlag: 0>, pattern=OneIPTestPattern.OFF, colour=0, tone=OneIPTestTone(mode=<OneIPToneMode.OFF: 0>, freq=0, level=0, channels=0, rate=0), sync=OneIPTestSync(period=0, lead=0, offset=0, beep_ms=0), frames=0, periods=0, marks=0)¶
- Parameters:
flags (OneIPTestcardFlag)
pattern (OneIPTestPattern | int)
colour (int)
tone (OneIPTestTone)
sync (OneIPTestSync)
frames (int)
periods (int)
marks (int)
- Return type:
None
- class mx_remote.Interface.OneIPDeviceSettings[source]¶
Bases:
objectThe device settings of a OneIP unit, as it reports them and as its controller changes them.
Each setting is carried only behind its bit in
valid, so a frame changes one setting without restating the others, and a device reports only the settings it has. Read a setting throughget()and the profile properties, which answer None for one the device has not reported.- __init__(valid=<OneIPDeviceSetting: 0>, flags=<OneIPDeviceSetting: 0>, ir_profiles=0, ir_profile=0, ir_profile_sink=0, auto_power_save=0, power_save=None, ptp_mode=OneIPPtpMode.OFF, ptp_domain=0, ptp_priority1=0, power_save_level=OneIPPowerSaveLevel.NONE, ptp_messages=None)[source]¶
- Parameters:
valid (OneIPDeviceSetting)
flags (OneIPDeviceSetting)
ir_profiles (int)
ir_profile (int)
ir_profile_sink (int)
auto_power_save (int)
power_save (OneIPPowerSaveSchedule | None)
ptp_mode (OneIPPtpMode | int)
ptp_domain (int)
ptp_priority1 (int)
power_save_level (OneIPPowerSaveLevel | int)
ptp_messages (OneIPPtpMessages | None)
- Return type:
None
- classmethod power_save_switch(enabled)[source]¶
The settings that switch a device’s power save on or off. On is both POWER_SAVE_DISABLED, clear, and POWER_SAVE_LEVEL, at 0.
- Parameters:
enabled (bool)
- Return type:
- property valid: OneIPDeviceSetting¶
The settings reported so far.
- property flags: OneIPDeviceSetting¶
The values of the on/off settings among
valid.
- get(setting)[source]¶
Whether an on/off setting is on, None while the device has not reported it.
- Parameters:
setting (OneIPDeviceSetting)
- Return type:
bool | None
- property ir_profile_sink: int | None¶
The output infrared port’s profile, None while it is not reported. ONEIP_IR_PROFILE_NOT_SET means the port follows the global one.
- property stored_ir_profiles: int | None¶
The infrared profiles stored on the device, bit n for profile n, None while it is not reported.
- property auto_power_save: int | None¶
The idle minutes before the device powers down by itself, 0 for never, None while it is not reported.
- property power_save_schedule: OneIPPowerSaveSchedule | None¶
The daily power save windows, None while they are not reported.
- property ptp_mode: OneIPPtpMode | int | None¶
The PTP mode, a raw int for one this library does not name, None while it is not reported.
- property ptp_domain: int | None¶
The PTP domain, up to ONEIP_PTP_DOMAIN_MAX, None while it is not reported.
- property ptp_priority1: int | None¶
The priority1 the device announces as a PTP grandmaster, lower winning, None while it is not reported.
- property power_save_level: OneIPPowerSaveLevel | int | None¶
The level the device powers down to in power save, which it picks itself, a raw int for one this library does not name, None while it is not reported.
- property ptp_messages: OneIPPtpMessages | None¶
The settings carried in the block of their own the device has reported, None while it has reported none of them; each value is meaningful only behind its own bit of valid.
- merge(previous)[source]¶
Fold this received block onto the cached one.
Each bit in this block’s
validreplaces its own setting and leaves the others alone, so a write about one setting does not clear what was known about the rest.- Parameters:
previous (OneIPDeviceSettings | None)
- Return type:
- as_applied_to(reported)[source]¶
This block limited to what a device that reported reported takes from a write about it.
A device applies a setting only if it has it, a profile, PTP mode, PTP domain or PTP DSCP only within its range, a stream TTL only when it is not 0, a rotation only by its own step, and never what only it can report about itself. The step stays the device’s. It picks its power save level itself, and takes a level it is written, without POWER_SAVE_DISABLED, as switching power save on.
reported may be only the bits the device reported, which says nothing of its step, so a rotation other than 0 is then left out.
- Parameters:
reported (OneIPDeviceSettings | OneIPDeviceSetting | None)
- Return type:
- class mx_remote.Interface.NetworkPortStatus[source]¶
Bases:
ABCdetailed status of a network port
- property errors: UtpLinkErrorStatus | None¶
link error status
- property link_speed: UtpLinkSpeed¶
link speed
- property cable_status: list[UtpCableStatus] | None¶
utp cable pair status
- class mx_remote.Interface.DeviceBase[source]¶
Bases:
ABCan mx_remote device on the network
- abstract property status: DeviceStatus¶
device status
- abstract property registry: DeviceRegistry¶
local device information registry
- abstract property configuration_complete: bool¶
check whether all configuration info for this device has been received
- abstract property callbacks: MxrCallbacks¶
callbacks for this device
- abstract property remote_id: MxrDeviceUid¶
unique id
- abstract property oneip_features: OneIPVideoProcessorFeature | None¶
What this device’s video processor supports, None until it has said.
A device reports the mask only on a configuration it sends about itself, and reports nothing at all until its processor has answered - which looks the same on the wire as a processor without any of the optional commands, so neither is read as a capability set.
- abstract property oneip_sources: OneIPStreamSourcesList | None¶
OneIP stream source addresses
- abstract property oneip_details: DeviceOneIPDetails | None¶
OneIP encoder/decoder configuration
- abstract property oneip_sink: DeviceOneIPSink | None¶
OneIP sink-side multicast subscriptions and resolved audio format (None until first announced)
- abstract property oneip_settings: OneIPDeviceSettings | None¶
The OneIP device settings, None until the device has reported any.
A device reports only the settings it has, so one missing from valid once the rest have arrived is one the device does not have.
- abstract property oneip_vlan: OneIPVlan | None¶
The VLAN configuration this OneIP device last reported about itself, None until it has reported one.
- abstract property unit_status: UnitStatus | None¶
The health and IP configuration this unit last reported, None until it has reported them.
- abstractmethod async clear_unit_status()[source]¶
clear the unit’s current system status
- Return type:
- abstractmethod async upgrade_unit_video_processor(force=False)[source]¶
upgrade the unit’s video processor to the latest image it holds
- abstractmethod async set_unit_dhcp()[source]¶
switch the unit to an IP configuration from DHCP
- Return type:
- abstractmethod async set_unit_network(network)[source]¶
give the unit a static IP configuration
- Parameters:
network (UnitNetConfig)
- Return type:
- abstractmethod async confirm_unit_network()[source]¶
keep the unit’s pending IP configuration
- Return type:
- abstract property oneip_downmix: OneIPDownmix | None¶
How this OneIP device’s output mixes down to stereo, as it last reported, None while it reports no downmix: until its video processor has answered for it, and always for one whose output cannot mix down.
- abstract property oneip_ptp: OneIPPtpState | None¶
The PTP state this OneIP device last reported about itself, None until it has reported one, and while it has no PTP to report: none on its video processor, or in power save.
- abstract property oneip_testcard: OneIPTestcard | None¶
The test card this OneIP sink last reported, None until it has.
A sink reports it only when asked or in answer to a change.
- abstract property time_zone: TimeZone | None¶
The time zone this device announced for its mesh, None until it has.
The mesh controller announces it with every periodic broadcast, empty when it has none.
- abstract property clock: datetime | None¶
This device’s clock as of now, None until it has announced one.
The time it last announced, advanced by how long ago that arrived. The mesh controller announces its clock with every periodic broadcast, and only once it has been set.
- abstract property oneip_source_local: OneIPStreamSources | None¶
local v2ip source addresses
- abstract property mesh_master: DeviceBase | None¶
The device that is the master device in the OneIP mesh to which this device belongs
- abstract property mesh_master_uid: MxrDeviceUid | None¶
UID of the mesh controller this device reports, None while it has named none.
Distinct from mesh_master, which falls back to the device itself. A device that has named no controller is not a device that follows nobody: a client that has just started knows nothing about anyone for as long as a broadcast period.
- abstract property protocol: int¶
Highest protocol version this device advertises, or 0 if none has been seen.
- abstractmethod supports_opcode(opcode)[source]¶
True when this device can receive opcode.
Each opcode has a minimum protocol version, and a device whose cap is lower drops the frame without answering - there is no NAK at any layer, so an ungated send looks like success. A device that has advertised no version yet returns True: refusing on that would break every send made before the first hello arrives, and the firmware itself only compares against a version it has.
- abstract property is_management: bool¶
True when this device announces itself as a writer of other devices’ configuration: MANAGER, which external management applications set and no device firmware does, or MESH_MASTER, which a controlling device sets.
Whether a unit takes a write from it is the unit’s question, not this device’s. A unit takes one from a MANAGER, or from the controller it follows (its mesh_master_uid), whatever bits that controller announces; MESH_MASTER stands in for that only until the unit has named one.
- abstract property is_oneip_sink: bool¶
True if this device decodes a OneIP stream, which is what carries the scaling settings
- abstract property supports_video_wall: bool¶
True if this sink can crop its source to a video wall window (MXR_FEATURE_VIDEO_WALL)
- abstract property config_initialised: bool¶
True if every configuration block this device broadcasts is fully written.
A device without MXR_FEATURE_CONFIG_INITIALISED builds some config payloads from stack locals it never zeroes, so these are unreliable from it: the scaling block in V2IP_DEVICE_CFG, bay 0’s addresses in SYS_BAY_V2IP_SOURCES, and the padding beside the rc target in RC_SETTINGS. None of that is detectable within a frame.
- abstract property dolby_settings: AmpDolbySettings | None¶
Dolby Digital settings (proamp)
- abstract property oneip_firmware_versions: dict[FirmwareType, FirmwareVersion] | None¶
OneIP video processor firmware versions
- abstractmethod oneip_source(bay)[source]¶
Get the OneIP source addresses for the given bay
- Parameters:
bay (BayBase)
- Return type:
OneIPStreamSources | None
- abstractmethod get_by_portname(portname)[source]¶
Get the bay with the given port name (not user set name) on this device
- abstract property network_status: dict[int, NetworkPortStatus]¶
network status for all ports
- abstractmethod merge_oneip_sources(first, total, page)[source]¶
merge one frame of this device’s OneIP source list into the cached list
- Parameters:
first (int)
total (int)
page (OneIPStreamSourcesList)
- Return type:
None
- abstractmethod note_link_config()[source]¶
internal callback: a page of the link configuration was received
- Return type:
None
- abstractmethod note_bay_config()[source]¶
internal callback: the primary bay configuration was received
- Return type:
None
- abstractmethod register_callback(callback)[source]¶
register a callback, called when the device state changed
- Parameters:
callback (Callable[[DeviceBase], None])
- Return type:
None
- abstractmethod unregister_callback(callback)[source]¶
unregister a callback
- Parameters:
callback (Callable[[DeviceBase], None])
- Return type:
None
- clear_v2ip_output_mode¶
use clear_oneip_output_mode.
- Type:
Deprecated
- is_v2ip¶
use is_oneip.
- Type:
Deprecated
- is_v2ip_sink¶
use is_oneip_sink.
- Type:
Deprecated
- merge_v2ip_sources¶
use merge_oneip_sources.
- Type:
Deprecated
- set_v2ip_auto_power_save¶
use set_oneip_auto_power_save.
- Type:
Deprecated
- set_v2ip_auto_scaling¶
use set_oneip_auto_scaling.
- Type:
Deprecated
- set_v2ip_ir_profile¶
use set_oneip_ir_profile.
- Type:
Deprecated
- set_v2ip_output_mode¶
use set_oneip_output_mode.
- Type:
Deprecated
- set_v2ip_power_save_schedule¶
use set_oneip_power_save_schedule.
- Type:
Deprecated
- set_v2ip_setting¶
use set_oneip_setting.
- Type:
Deprecated
- set_v2ip_sink_ir_profile¶
use set_oneip_sink_ir_profile.
- Type:
Deprecated
- v2ip_details¶
use oneip_details.
- Type:
Deprecated
- v2ip_features¶
use oneip_features.
- Type:
Deprecated
- v2ip_firmware_versions¶
use oneip_firmware_versions.
- Type:
Deprecated
- v2ip_settings¶
use oneip_settings.
- Type:
Deprecated
- v2ip_sink¶
use oneip_sink.
- Type:
Deprecated
- v2ip_source¶
use oneip_source.
- Type:
Deprecated
- v2ip_source_local¶
use oneip_source_local.
- Type:
Deprecated
- v2ip_sources¶
use oneip_sources.
- Type:
Deprecated
- v2ip_stats¶
use oneip_stats.
- Type:
Deprecated
- abstractmethod async auto_assign_oneip_source_addresses()[source]¶
hand this OneIP source’s stream addresses back to automatic assignment
- Return type:
- abstractmethod async set_oneip_auto_scaling(enabled)[source]¶
turn this sink’s automatic scaling on or off
- abstractmethod async set_oneip_output_mode(mode)[source]¶
set the output format this sink scales to
- Parameters:
mode (OneIPOutputMode)
- Return type:
- abstractmethod async clear_oneip_output_mode()[source]¶
clear the output format this sink is configured to scale to
- Return type:
- abstractmethod async set_oneip_setting(setting, enabled)[source]¶
switch on/off OneIP device settings, all to the same value
- Parameters:
setting (OneIPDeviceSetting)
enabled (bool)
- Return type:
- abstractmethod async set_oneip_ir_profile(profile)[source]¶
set the infrared profile of the device’s global infrared port
- abstractmethod async set_oneip_sink_ir_profile(profile)[source]¶
set the infrared profile of the device’s output infrared port
- abstractmethod async set_oneip_auto_power_save(minutes)[source]¶
set the idle minutes before the device powers down by itself, 0 for never
- abstractmethod async set_oneip_power_save_schedule(schedule)[source]¶
set the device’s daily power save windows
- Parameters:
schedule (OneIPPowerSaveSchedule)
- Return type:
- abstractmethod async set_oneip_ptp_mode(mode)[source]¶
set the PTP mode the device runs
- Parameters:
mode (OneIPPtpMode)
- Return type:
- abstractmethod async set_oneip_ptp_priority1(priority1)[source]¶
set the priority1 the device announces as a PTP grandmaster
- abstractmethod async set_oneip_power_save(enabled)[source]¶
switch power save on, so the device powers down by itself to the level it picks, or off
- abstractmethod async set_oneip_power_save_level(level)[source]¶
write the level the device powers down to in power save, which switches power save on
- Parameters:
level (OneIPPowerSaveLevel)
- Return type:
- abstractmethod async set_oneip_ptp_messages(which, messages)[source]¶
set how the device paces its PTP messages, its SAP timings and its streams’ TTL: the values of messages behind the bits of which
- Parameters:
which (OneIPDeviceSetting)
messages (OneIPPtpMessages)
- Return type:
- abstractmethod async set_oneip_downmix(downmix)[source]¶
set how the device’s output mixes down to stereo
- Parameters:
downmix (OneIPDownmix)
- Return type:
- abstractmethod async set_audio_endpoint_locked(endpoint, locked)[source]¶
lock or unlock the audio source of one of this device’s audio endpoints
- abstract property osd_sync: OsdSync | None¶
The last overlay sync this management unit sent, None until it has.
- abstract property osd_sync_report: OsdSyncReport | None¶
This unit’s last report on taking an overlay sync, None until it has.
- abstract property osd_message: OsdMessage | None¶
The message on this unit’s output, as it last reported it to this client, None until it has. A unit reports it only when asked, or when this client writes it.
- abstractmethod async request_osd_message()[source]¶
ask this unit for the message on its output
- Return type:
- abstractmethod async show_osd_message(text, logo=-1, priority=OsdMessagePriority.NORMAL)[source]¶
show a message on this unit’s output, in place of any it has
- Parameters:
text (str)
logo (int)
priority (OsdMessagePriority)
- Return type:
- abstractmethod async clear_osd_message()[source]¶
take the message down from this unit’s output
- Return type:
- abstract property oneip_sink_sdp: OneIPSinkSdp | None¶
What this OneIP output plays from a session description, as it last reported it, None until it has. It reports when that changes and at least once a minute.
- abstract property oneip_privacy: OneIPPrivacy | None¶
How this OneIP source unit’s streams are encrypted, as it last reported it, None until it has. It reports when that changes and at least once a minute.
- abstractmethod async request_oneip_privacy()[source]¶
ask this OneIP source unit how its streams are encrypted now
- Return type:
- abstractmethod async play_oneip_sdp(sdp)[source]¶
have this OneIP output play the stream a session description describes
- abstractmethod async stop_oneip_sdp()[source]¶
stop the stream this OneIP output plays from a session description
- Return type:
- abstractmethod async set_oneip_sdp_screen(screen)[source]¶
set what this OneIP output shows while it plays audio alone, as the wire value
- abstractmethod async request_oneip_sink_sdp()[source]¶
ask this OneIP output what it plays from a session description now
- Return type:
- abstractmethod async set_oneip_test_pattern(pattern, colour=0)[source]¶
show a test pattern on this sink’s output
- Parameters:
pattern (OneIPTestPattern)
colour (int)
- Return type:
- abstractmethod async set_oneip_test_tone(tone)[source]¶
play a test tone on this sink’s output
- Parameters:
tone (OneIPTestTone)
- Return type:
- abstractmethod async set_oneip_test_sync(sync)[source]¶
set this sink’s lip-sync flash
- Parameters:
sync (OneIPTestSync)
- Return type:
- class mx_remote.Interface.BayLink[source]¶
Bases:
objecta virtual mx_remote link between bays, like an amp output that’s linked to a oneip sink
- __init__(registry, bay, linked_serial, linked_bay, features)[source]¶
- Parameters:
registry (DeviceRegistry)
bay (BayBase)
linked_serial (str)
linked_bay (str)
features (int)
- Return type:
None
- property features_mask: LinkFeature¶
supported link features as bitmask
- class mx_remote.Interface.BayLinks[source]¶
Bases:
objectlinked bay configurations for all devices
- __init__(registry)[source]¶
- Parameters:
registry (DeviceRegistry)
- Return type:
None
- class mx_remote.Interface.DeviceRegistry[source]¶
Bases:
ABCall mx_remote devices on the network
- abstract property net_protocol_version_max: int¶
highest protocol version used by devices on the network
- abstract property net_protocol_version_min: int¶
lowest protocol version used by devices on the network
- property uid: MxrDeviceUid¶
uid of this device
- abstract property callbacks: MxrCallbacks¶
callbacks to call when the device is updated
- abstractmethod get_by_serial(serial)[source]¶
get a device by its serial number
- Parameters:
serial (str)
- Return type:
DeviceBase | None
- abstractmethod get_by_uid(remote_id)[source]¶
get a device by its unique id
- Parameters:
remote_id (str | MxrDeviceUid | None)
- Return type:
DeviceBase | None
- abstractmethod uid_to_user_string(remote_id)[source]¶
return the serial of the unit if the uid is known, or the uid as string if it isn’t
- Parameters:
remote_id (str | MxrDeviceUid | bytes | None)
- Return type:
- abstractmethod get_bay_by_portnum(remote_id, portnum)[source]¶
get a bay of a device by its unique id and port number
- Parameters:
remote_id (str | MxrDeviceUid)
portnum (int)
- Return type:
BayBase | None
- class mx_remote.Interface.MxrCallbacks[source]¶
Bases:
objectcallbacks that can be used by an external application to get notified when a status changes
- on_device_update(dev)[source]¶
called when properties of ‘dev’ have been updated
- Parameters:
dev (DeviceBase)
- Return type:
None
- on_bay_update(bay)[source]¶
called when properties of ‘bay’ have been updated
- Parameters:
bay (BayBase)
- Return type:
None
- on_device_config_changed(dev)[source]¶
called when device configuration properties of ‘dev’ have been updated
- Parameters:
dev (DeviceBase)
- Return type:
None
- on_device_config_complete(dev)[source]¶
called when device configuration of ‘dev’ had been received fully
- Parameters:
dev (DeviceBase)
- Return type:
None
- on_device_online_status_changed(dev, online)[source]¶
called when the online status of ‘dev’ changed
- Parameters:
dev (DeviceBase)
online (bool)
- Return type:
None
- on_bay_registered(bay)[source]¶
called when a new bay was registered by mx_remote
- Parameters:
bay (BayBase)
- Return type:
None
- on_device_temperature_changed(dev)[source]¶
called when the temperature values of ‘dev’ changed
- Parameters:
dev (DeviceBase)
- Return type:
None
- on_power_changed(bay, power)[source]¶
called when the power status of ‘bay’ changed
- Parameters:
bay (BayBase)
power (PowerStatus)
- Return type:
None
- on_name_changed(bay, user_name)[source]¶
called when the name that’s set up by the user of ‘bay’ changed
- on_status_signal_detected_changed(bay, val)[source]¶
called when the signal detect status of ‘bay’ changed
called when the hidden status of ‘bay’ changed
- on_status_zone_powered_changed(bay, val)[source]¶
called when the amplifier zone ‘bay’ drives is powered on or off
- on_status_poe_powered_changed(bay, val)[source]¶
Deprecated: override on_status_zone_powered_changed. A subclass that still overrides this is called in its place.
- on_status_hdbt_connected_changed(bay, val)[source]¶
called when the HDBaseT connection status of ‘bay’ changed
- on_osd_sync(dev, sync)[source]¶
called when management unit ‘dev’ sent an overlay sync
- Parameters:
dev (DeviceBase)
sync (OsdSync)
- Return type:
None
- on_osd_sync_report(dev, report)[source]¶
called when unit ‘dev’ reported on taking an overlay sync
- Parameters:
dev (DeviceBase)
report (OsdSyncReport)
- Return type:
None
- on_osd_message_changed(dev, message)[source]¶
called when unit ‘dev’ reported something different about the message on its output
- Parameters:
dev (DeviceBase)
message (OsdMessage)
- Return type:
None
- on_osd_sync_requested(dev, request)[source]¶
called when ‘dev’ asked for an overlay sync, or for settings of one
- Parameters:
dev (DeviceBase)
request (OsdSyncRequest)
- Return type:
None
- on_osd_sync_setting(dev, setting)[source]¶
called when management unit ‘dev’ sent a unit a setting of an overlay sync
- Parameters:
dev (DeviceBase)
setting (OsdSyncSetting)
- Return type:
None
- on_bay_content_changed(bay, content)[source]¶
called when what the source on input ‘bay’ shows changed
- Parameters:
bay (BayBase)
content (BayContent)
- Return type:
None
- on_status_arc_changed(bay, val)[source]¶
called when the audio return channel status of ‘bay’ changed
- on_volume_changed(bay, volume)[source]¶
called when the volume/mute status of ‘bay’ changed
- Parameters:
bay (BayBase)
volume (VolumeMuteStatus | None)
- Return type:
None
- on_video_source_changed(bay, video_source)[source]¶
called when a video source changed was detected on ‘bay’
- on_audio_source_changed(bay, audio_source)[source]¶
called when an audio source changed was detected on ‘bay’
- on_bay_linked(bay, linked_serial, linked_bay, features)[source]¶
called when a bay link was detected
- on_mirror_status_changed(bay, mirror)[source]¶
called when a bay mirroring setup change was detected
- Parameters:
bay (BayBase)
mirror (BayMirrorStatus)
- Return type:
None
- on_filter_status_changed(bay, filtered)[source]¶
called when a bay filtering setup change was detected
- Parameters:
bay (BayBase)
filtered (list[MxrDeviceUid])
- Return type:
None
- on_edid_profile_changed(bay, profile)[source]¶
called when a source EDID profile was changed
- Parameters:
bay (BayBase)
profile (EdidProfile | None)
- Return type:
None
- on_amp_zone_settings_changed(bay, settings)[source]¶
called when amp zone settings were changed
- Parameters:
bay (BayBase)
settings (AmpZoneSettings)
- Return type:
None
- on_amp_dolby_settings_changed(device, settings)[source]¶
called when amp dolby settings were changed
- Parameters:
device (DeviceBase)
settings (AmpDolbySettings)
- Return type:
None
Bay content¶
What the source on an input is showing, and how much of it a unit keeps.
- mx_remote.proto.Constants.BAY_CONTENT_KEY_MAX = 31¶
The most bytes in a BayContentField key.
- mx_remote.proto.Constants.BAY_CONTENT_VALUE_MAX = 255¶
The most bytes in a BayContentField value, UTF-8 encoded.
Overlay sync¶
A management unit having other units copy its overlay captions, logo choice and place, backgrounds and logo images.
- class mx_remote.proto.Constants.OsdSyncWhat[source]¶
Bases:
IntFlagWhat an overlay sync copies.
- LOGO = 2¶
Which logo is shown, and where.
- BACKGROUNDS = 4¶
Background colours.
- LOGO_SLOTS = 8¶
The logo images in the four slots.
- __new__(value)¶
- class mx_remote.proto.Constants.OsdSyncState[source]¶
Bases:
IntEnumHow far a unit has got with taking an overlay sync.
- DONE = 1¶
Every setting written and committed.
- FAILED = 2¶
Failed, for the reason the report gives.
- DEFERRED = 3¶
Kept for later, as the unit’s video processor is off in power save.
- __new__(value)¶
- class mx_remote.proto.Constants.OsdSyncSize[source]¶
Bases:
IntEnumThe output size an overlay setting applies at.
- LARGE = 1¶
Large outputs, which every value but SMALL also means.
- __new__(value)¶
- class mx_remote.proto.Constants.OsdCaptionAlign[source]¶
Bases:
IntEnumHow a caption’s lines are aligned.
- DEFAULT = 255¶
The layout’s default.
- __new__(value)¶
- class mx_remote.proto.Constants.OsdCaptionFormat[source]¶
Bases:
IntEnumHow a caption’s text is read.
- DEFAULT = 255¶
The layout’s default.
- __new__(value)¶
- class mx_remote.proto.Constants.OsdCaptionField[source]¶
Bases:
IntFlagThe caption fields an overlay setting gives. A field left out keeps what the unit has.
- __new__(value)¶
- class mx_remote.proto.Constants.OsdLogoField[source]¶
Bases:
IntFlagThe logo fields an overlay setting gives. A field left out keeps what the unit has.
- __new__(value)¶
- mx_remote.proto.Constants.OSD_SYNC_SLOTS = 4¶
The logo slots an overlay sync can copy.
- mx_remote.proto.Constants.OSD_SYNC_RECORDS_MAX = 128¶
The most settings one overlay sync carries.
- mx_remote.proto.Constants.OSD_SYNC_FONT_MAX = 31¶
The longest caption font name, in bytes.
- mx_remote.proto.Constants.OSD_SYNC_TEXT_MAX = 360¶
The longest caption text a unit shows, in bytes. It cuts a longer one short.
- mx_remote.proto.Constants.OSD_SYNC_IMAGE_MAX = 524288¶
The largest logo image a unit takes, in bytes.
- mx_remote.proto.Constants.OSD_SYNC_IMAGE_WIDTH_MAX = 1920¶
The widest logo image a unit takes, in pixels.
- mx_remote.proto.Constants.OSD_SYNC_IMAGE_HEIGHT_MAX = 1080¶
The tallest logo image a unit takes, in pixels.
- mx_remote.proto.Constants.OSD_SYNC_PERCENT_MAX = 100¶
The largest size a logo is shown at, in percent.
Overlay messages¶
The message on a unit’s output, which the overlay sync opcode carries too.
- class mx_remote.OsdMessage[source]¶
Bases:
objectThe message on a unit’s output, as the unit last reported it. The unit holds it until it restarts.
- flags: OsdMessageFlag¶
Whether a message is set and shown, whether the unit can show one, and whether it refused the write it answers. Without SET the other fields are empty.
- priority: OsdMessagePriority | int¶
Where it stands against the unit’s own messages.
- __init__(flags, logo, priority, text)¶
- Parameters:
flags (OsdMessageFlag)
logo (int)
priority (OsdMessagePriority | int)
text (str)
- Return type:
None
- class mx_remote.proto.Constants.OsdMessageFlag[source]¶
Bases:
IntFlagWhat a unit says of the message on its output.
- SET = 1¶
show it, rather than take it down.
- Type:
A message is set. In a write
- SHOWN = 2¶
The output shows it, rather than another message ahead of it.
- SUPPORTED = 4¶
The unit’s video processor composes the message layer.
- REFUSED = 8¶
The unit did not take the write it answers, and reports the message it kept.
- __new__(value)¶
- class mx_remote.proto.Constants.OsdMessagePriority[source]¶
Bases:
IntEnumWhere a message stands against the unit’s own messages: its upgrade, Locate Device and encrypted source messages.
- LOW = 0¶
After them.
- NORMAL = 1¶
Between them.
- TOP = 2¶
Before them.
- __new__(value)¶
- mx_remote.proto.Constants.OSD_MESSAGE_TEXT_MAX = 255¶
The longest message text a unit takes, in bytes.
Device identity¶
Unique device and bay identifier types for mx_remote.
- class mx_remote.Uid.MxrDeviceUid[source]¶
Bases:
objectUnique ID of an mx_remote device on the network
Remote-control keys and actions¶
The key and action codes a bay reports, and the target a key was aimed at.
- class mx_remote.proto.Constants.RCKey[source]¶
Bases:
IntEnumRemote control key codes (CEC/IR).
- __new__(value)¶
- KEY_0 = 0¶
- KEY_1 = 1¶
- KEY_2 = 2¶
- KEY_3 = 3¶
- KEY_4 = 4¶
- KEY_5 = 5¶
- KEY_6 = 6¶
- KEY_7 = 7¶
- KEY_8 = 8¶
- KEY_9 = 9¶
- KEY_SELECT = 10¶
- KEY_BACK = 11¶
- KEY_UP = 12¶
- KEY_DOWN = 13¶
- KEY_LEFT = 14¶
- KEY_RIGHT = 15¶
- KEY_MENU = 16¶
- KEY_CONTENT_MENU = 17¶
- KEY_CHANNEL_UP = 18¶
- KEY_CHANNEL_DOWN = 19¶
- KEY_PLAY = 20¶
- KEY_PAUSE = 21¶
- KEY_STOP = 22¶
- KEY_RECORD = 23¶
- KEY_FAST_FORWARD = 24¶
- KEY_REWIND = 25¶
- KEY_RED = 26¶
- KEY_GREEN = 27¶
- KEY_YELLOW = 28¶
- KEY_BLUE = 29¶
- KEY_HELP = 30¶
- KEY_INFORMATION = 31¶
- KEY_TEXT = 32¶
- KEY_GUIDE = 33¶
- KEY_VIDEO_ON_DEMAND = 34¶
- KEY_PREVIOUS_CHANNEL = 80¶
- KEY_3D_MODE = 81¶
- KEY_SUBTITLE = 82¶
- KEY_SOUND_SELECT = 83¶
- KEY_INPUT_SELECT = 84¶
- KEY_EJECT = 85¶
- KEY_NEXT_CHAPTER = 86¶
- KEY_PREVIOUS_CHAPTER = 87¶
- KEY_CUSTOM_CEC = 1280¶
- KEY_INTERACTIVE = 128¶
- KEY_SEARCH = 129¶
- KEY_SKY = 130¶
- KEY_CUSTOM_SKY = 2048¶
- class mx_remote.proto.Constants.RCAction[source]¶
Bases:
IntEnumRemote control actions.
- __new__(value)¶
- ACTION_POWER_TOGGLE = 0¶
- ACTION_POWER_ON = 1¶
- ACTION_POWER_OFF = 2¶
- ACTION_VOLUME_UP = 3¶
- ACTION_VOLUME_DOWN = 4¶
- ACTION_VOLUME_MUTE = 5¶
- class mx_remote.proto.Constants.RCType[source]¶
Bases:
IntEnumRemote control protocol type.
- __new__(value)¶
- IR = 0¶
- CEC = 1¶
- SKY_UK = 2¶
- TIVO = 3¶
- KODI = 4¶
- DISH = 5¶
- DIRECTV = 6¶
- MX_REMOTE = 7¶
- INTERNAL = 8¶
Routed inside the device itself.
- mx_remote.proto.Constants.MXR_PROTOCOL_VERSION = 48¶
Highest mx_remote protocol version this library understands.
Mirrors the firmware’s own protocol version. Bump when adding RX support for an opcode revision; transmitters stamp the per-opcode minimum from MXR_OPCODE_VERSIONS so older peers still parse the frame.
This is also a receive ceiling: Remote.process_frame drops any frame stamped above it, unparsed. So it has to reach the stamp of every layout revision decoded below, or that revision goes silent on the mesh rather than noisy - 0x29 is what a MatrixOS 10.12.46 unit stamps on V2IP_STATS.
0x2A is also what MatrixOS reads a hello by: a device on 0x2A or later is given 60s to hello again rather than 15s, and a unit only slows its own hello to one every 20-30s once every device it knows is on 0x2A.
0x2B is the row of V2IP_TESTCARD, so a sink’s test card report arrives stamped 0x2B.
0x2E is the row of V2IP_SINK_SDP, so an output’s session description report arrives stamped 0x2E, 0x2F the row of V2IP_OSD_SYNC and 0x30 the row of V2IP_PRIVACY.
OneIP device settings¶
The settings a OneIP device reports and a controller writes, each behind its own bit, and the range of the infrared profiles.
- class mx_remote.proto.Constants.OneIPDeviceSetting[source]¶
Bases:
IntFlagThe device settings a OneIP configuration can carry, each on its own bit.
The same bits serve as the settings a frame carries and as the values of the on/off ones among them. IR_PROFILE to POWER_SAVE_SCHEDULE and the PTP settings carry a value elsewhere in the block and have no on/off value of their own.
A device reports every setting it has, so one it never reports is one it does not have.
- SINK_CHECK_POWER = 1¶
Disables the decoder while the display is off.
- SINK_OFF_NO_SIGNAL = 2¶
Disables the HDMI output while there is no signal.
- IR_TX_MODULATED = 4¶
Sends infrared modulated.
- STATUS_LED = 8¶
Lights the status LED.
- NETWORK_LED = 16¶
Lights the network port LEDs.
- FAN_QUIET = 32¶
Runs the fan in quiet mode.
- CEC_COMBO_KEYS = 64¶
Accepts CEC combo keys.
- CEC_COMBO_INPUT = 128¶
Accepts CEC combo keys for the device’s own input.
- IR_PROFILE = 256¶
The infrared profile of the device’s global infrared port.
- IR_PROFILE_SINK = 512¶
The infrared profile of the output’s infrared port.
- IR_PROFILES = 1024¶
The infrared profiles stored on the device. Reported by the device itself and never written.
- AUTO_POWER_SAVE = 2048¶
The minutes a device stays idle before it powers down by itself.
- POWER_SAVE_SCHEDULE = 4096¶
The daily windows in which the device powers down.
- CLOCK_SET = 8192¶
The device’s clock has been set, on/off. Reported by the device itself and never written.
- PTP_MODE = 16384¶
The PTP mode the device runs.
- PTP_DOMAIN = 32768¶
The PTP domain the device runs in.
- PTP_PRIORITY1 = 65536¶
The priority1 the device announces as a PTP grandmaster.
- AES67 = 131072¶
Sends the source’s audio as an AES67 flow, where the source allows.
- POWER_SAVE_LEVEL = 262144¶
The level the device powers down to in power save. A device picks it itself: the level that saves the most while its input and display can still wake it. Written without POWER_SAVE_DISABLED, it switches power save on, and the level written is ignored, except by a device whose firmware predates picking it, which takes the level as its setting.
- PTP_ANNOUNCE = 524288¶
The interval between the device’s PTP announce messages.
- PTP_SYNC = 1048576¶
The interval between the device’s PTP sync messages.
- PTP_DELAY_REQ = 2097152¶
The interval between the device’s PTP delay requests.
- PTP_ANNOUNCE_TIMEOUT = 4194304¶
The announce intervals before the device drops a silent PTP master.
- PTP_DSCP = 8388608¶
The DSCP of the device’s PTP messages.
- SAP_EXPIRE = 16777216¶
The minutes after which the device forgets a SAP announcement it heard.
- SAP_LISTEN = 33554432¶
Listens for SAP announcements.
- SAP_ANNOUNCE = 67108864¶
Sends SAP announcements.
- SAP_INTERVAL = 134217728¶
The seconds between the device’s SAP announcements.
- POWER_SAVE_DISABLED = 268435456¶
automatic power save and the power save schedule leave the device running, and switching this on wakes a device either has powered down. A power save request still powers it down. Writing POWER_SAVE_LEVEL switches it off.
- Type:
Never powers down by itself
- STREAM_TTL = 536870912¶
The TTL of the device’s streams, video, audio and ancillary alike. Reported only by a device with an encoder.
- CLOUD = 1073741824¶
Connects to the cloud service. A device that does not report it connects regardless.
- SINK_ROTATION = 2147483648¶
The angle the device’s HDMI output is turned by. Reported only by a device with an HDMI output.
- __new__(value)¶
- mx_remote.proto.Constants.ONEIP_DEVICE_SETTING_SWITCHES = <OneIPDeviceSetting.SINK_CHECK_POWER|SINK_OFF_NO_SIGNAL|IR_TX_MODULATED|STATUS_LED|NETWORK_LED|FAN_QUIET|CEC_COMBO_KEYS|CEC_COMBO_INPUT|AES67|SAP_LISTEN|SAP_ANNOUNCE|POWER_SAVE_DISABLED|CLOUD: 1442971903>¶
The settings that are on or off, as opposed to carrying a value, and that can be written.
- mx_remote.proto.Constants.ONEIP_IR_PROFILE_NOT_SET = -1¶
The infrared profile an output’s port reports when it follows the device’s global one.
- mx_remote.proto.Constants.ONEIP_IR_PROFILE_MAX = 18¶
the default profile is 0, the Atlona profile 1, and user-defined profiles 1 to 16 are 2 to 17.
- Type:
One past the highest infrared profile
- mx_remote.proto.Constants.ONEIP_DEVICE_SETTINGS_REPORTED_ONLY = <OneIPDeviceSetting.IR_PROFILES|CLOCK_SET: 9216>¶
The settings only a device reports about itself, which no write carries.
- mx_remote.proto.Constants.ONEIP_MINUTES_PER_DAY = 1440¶
every time in a power save schedule is below this.
- Type:
Minutes in a day
- class mx_remote.OneIPPowerSaveSchedule[source]¶
Bases:
objectA OneIP device’s daily power save windows, Monday first, in the device’s time zone.
Day
dpowers down atstart[d]and up again atend[d], both in minutes after midnight. A window belongs to the day it starts on and runs past midnight into the next when it ends before it starts; one that ends where it starts means no window that day.
- class mx_remote.proto.Constants.OneIPPowerSaveLevel[source]¶
Bases:
IntEnumHow far a OneIP device powers down in power save, each level saving more than the one before.
- NONE = 0¶
No level.
- REDUCED = 1¶
Part of the video processing powers down.
- LOW = 2¶
All of the video processing powers down.
- OFF = 3¶
Everything but the network powers down.
- __new__(value)¶
- class mx_remote.OneIPVlan[source]¶
Bases:
objectVLAN tagging on a OneIP device’s uplink.
Only the device knows what it runs, so this is what it reported about itself. A change written to it is applied at once and stays PENDING until the mesh controller confirms it, which proves the device still reaches the mesh and the mesh still reaches it; unconfirmed, the device reverts it.
- flags: OneIPVlanFlag = 0¶
The block’s flags.
- port: tuple[int, ...] = (0, 0, 0)¶
The VLAN id each downlink port carries, 0 to share the device’s untagged traffic, indexed as ONEIP_VLAN_PORTS orders them.
- active_uplink: int = 0¶
the port in use as the uplink, as 1 + its index.
- Type:
Reported by the device
- revert_s: int = 0¶
the seconds before a pending configuration is reverted.
- Type:
Reported by the device
- property is_pending: bool¶
Whether the device reverts this configuration unless the mesh controller confirms it.
- property pinned_uplink_port: int | None¶
The index of the port pinned as the uplink, None when the device detects it.
- property active_uplink_port: int | None¶
The index of the port the device uses as its uplink, None for a value that names no port.
- class mx_remote.proto.Constants.OneIPVlanFlag[source]¶
Bases:
IntFlagThe flags of a OneIP device’s VLAN configuration.
- VALID = 1¶
The block carries a configuration. A block without it carries nothing, whatever its other bytes hold.
- TRUNK = 2¶
Untagged frames arriving on the uplink are dropped instead of reaching the device.
- PENDING = 4¶
the configuration is applied, and reverted unless the mesh controller confirms it. Never written.
- Type:
Reported by the device
- CONFIRM = 8¶
a pending configuration it heard, which the device then keeps.
- Type:
Sent by the mesh controller
- HAS_SFP = 16¶
it has an SFP port. Never written.
- Type:
Reported by the device
- __new__(value)¶
- mx_remote.proto.Constants.ONEIP_VLAN_PORTS = 3¶
The external network ports a OneIPVlan covers, in the order of its port field: the SFP port, the UTP port with PoE, then the UTP port.
- mx_remote.proto.Constants.ONEIP_VLAN_PORT_SFP = 0¶
The index of the SFP port in OneIPVlan.port.
- mx_remote.proto.Constants.ONEIP_VLAN_ID_MAX = 4094¶
0 means untagged, and 4095 is reserved by IEEE 802.1Q.
- Type:
The highest VLAN id
OneIP stereo downmix¶
How a device’s output mixes 5.1 and 7.1 PCM down to stereo.
- class mx_remote.OneIPDownmix[source]¶
Bases:
objectHow a OneIP output mixes 5.1 and 7.1 PCM down to stereo, and whether it does now.
A device reports it once its video processor has answered for it, so never one whose output cannot mix down.
- mode: OneIPDownmixMode | int = 0¶
When the output mixes down; a raw int for a mode this library does not name.
- level: OneIPDownmixLevel | int = 0¶
How loud the mix is; a raw int for a level this library does not name.
- lfe: int = 0¶
The percent the LFE channel is mixed in at, at most ONEIP_DOWNMIX_LFE_MAX; 0 leaves it out.
- state: int = 0¶
Why the stream is or is not mixed down, as the device’s own code. Only the device reports it.
- channels: int = 0¶
The stream’s channels while it is mixed down, else 0. Only the device reports it.
- written(write)[source]¶
The settings of write applied to this report, which keeps what only the device reports.
- Parameters:
write (OneIPDownmix)
- Return type:
- __init__(mode=OneIPDownmixMode.OFF, level=OneIPDownmixLevel.NORMALISED, lfe=0, state=0, channels=0)¶
- Parameters:
mode (OneIPDownmixMode | int)
level (OneIPDownmixLevel | int)
lfe (int)
state (int)
channels (int)
- Return type:
None
- class mx_remote.proto.Constants.OneIPDownmixMode[source]¶
Bases:
IntEnumWhen a OneIP output mixes 5.1 and 7.1 PCM down to stereo.
- OFF = 0¶
Never.
- AUTO = 1¶
When the display’s EDID lists two PCM channels or fewer.
- ALWAYS = 2¶
Always.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPDownmixLevel[source]¶
Bases:
IntEnumHow loud a OneIP output’s stereo downmix is.
- NORMALISED = 0¶
Scaled so the mix never clips.
- UNSCALED = 1¶
Unscaled, with dialogue at the level it has in stereo.
- __new__(value)¶
- mx_remote.proto.Constants.ONEIP_DOWNMIX_LFE_MAX = 100¶
The largest percent a OneIP output mixes its LFE channel in at.
OneIP PTP¶
A device’s PTP settings, which it reports and a controller writes, and the PTP state only the device reports.
- class mx_remote.OneIPPtpState[source]¶
Bases:
objectA OneIP device’s PTP state, as it reports it about itself.
Only the device can read its own video processor, so this is never written to a device, and a controller’s frame about one carries none.
- flags: OneIPPtpFlag = 0¶
The block’s flags.
- mode: OneIPPtpMode | int = 0¶
The mode the video processor runs; a raw int for one this library does not name.
- lock: OneIPPtpLock | int = 0¶
How far the clock has locked; a raw int for a value this library does not name.
- grandmaster_identity: bytes = b'\x00\x00\x00\x00\x00\x00\x00\x00'¶
The clock identity of the grandmaster the device runs on, all zero while it runs on none.
- property followed: bool¶
Whether the device locked to a master since its PTP started, so its mesh holds a time.
- __init__(flags=<OneIPPtpFlag: 0>, mode=OneIPPtpMode.OFF, domain=0, port_state=0, lock=OneIPPtpLock.UNLOCKED, clock_identity=b'\x00\x00\x00\x00\x00\x00\x00\x00', grandmaster_identity=b'\x00\x00\x00\x00\x00\x00\x00\x00')¶
- Parameters:
flags (OneIPPtpFlag)
mode (OneIPPtpMode | int)
domain (int)
port_state (int)
lock (OneIPPtpLock | int)
clock_identity (bytes)
grandmaster_identity (bytes)
- Return type:
None
- class mx_remote.proto.Constants.OneIPPtpMode[source]¶
Bases:
IntEnumHow a OneIP device takes part in PTP.
- OFF = 0¶
No PTP.
- FOLLOWER = 1¶
Follows a grandmaster, and never becomes one.
- AUTO = 2¶
Follows a grandmaster, or becomes one when there is none.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPPtpFlag[source]¶
Bases:
IntFlagThe flags of a OneIP device’s PTP state.
- VALID = 1¶
The device runs PTP and the block holds its state. A block without it holds nothing: the device has no PTP, or is in power save.
- FOLLOWED = 2¶
The device locked to a master since its PTP started, so its mesh holds a time.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPPtpLock[source]¶
Bases:
IntEnumHow far a OneIP device’s PTP clock has locked to its master.
- UNLOCKED = 0¶
Not locked.
- LOCKING = 1¶
Locking.
- LOCKED = 2¶
Locked.
- __new__(value)¶
- mx_remote.proto.Constants.ONEIP_DEVICE_SETTINGS_PTP = <OneIPDeviceSetting.PTP_MODE|PTP_DOMAIN|PTP_PRIORITY1: 114688>¶
The PTP settings.
- class mx_remote.OneIPPtpMessages[source]¶
Bases:
objectHow a OneIP device paces its PTP messages, its SAP timings, its streams’ TTL and its output’s rotation, which a frame carries in the same block. Each value is behind its own bit of OneIPDeviceSettings.valid, one of ONEIP_DEVICE_SETTINGS_BLOCK.
Intervals are base-2 logarithms of seconds, so -3 is 125 ms and 1 is 2 s.
- announce_timeout: int = 0¶
The announce intervals before a silent master is dropped, behind PTP_ANNOUNCE_TIMEOUT.
- sap_expire_min: int = 0¶
The minutes after which a SAP announcement the device heard is forgotten, behind SAP_EXPIRE.
- stream_ttl: int = 0¶
The TTL of the device’s streams, 1 to 255, behind STREAM_TTL. A device whose video processor cannot change it keeps the setting and sends ONEIP_STREAM_TTL_DEFAULT.
- sink_rotation: int = 0¶
The degrees the device’s HDMI output is turned by, clockwise, at most ONEIP_SINK_ROTATION_MAX, behind SINK_ROTATION.
- sink_rotation_step: int = 0¶
the device takes only an angle that is a multiple of it, and 0 alone when it is 0. Only the device reports it, behind the same bit.
- Type:
The step the output turns by
- takes_sink_rotation(degrees)[source]¶
Whether a device reporting this step takes degrees as its output’s rotation.
- merge(other, which)[source]¶
The values behind the bits of which copied from other, the rest kept.
- Parameters:
other (OneIPPtpMessages)
which (OneIPDeviceSetting)
- Return type:
- describe(valid)[source]¶
The values behind the bits of valid, one “name=value” each.
- Parameters:
valid (OneIPDeviceSetting)
- Return type:
- __init__(log_announce_interval=0, log_sync_interval=0, log_delay_req_interval=0, announce_timeout=0, dscp=0, sap_expire_min=0, sap_interval_s=0, stream_ttl=0, sink_rotation=0, sink_rotation_step=0)¶
- mx_remote.proto.Constants.ONEIP_DEVICE_SETTINGS_PTP_MESSAGES = <OneIPDeviceSetting.PTP_ANNOUNCE|PTP_SYNC|PTP_DELAY_REQ|PTP_ANNOUNCE_TIMEOUT|PTP_DSCP: 16252928>¶
The PTP message settings.
- mx_remote.proto.Constants.ONEIP_DEVICE_SETTINGS_BLOCK = <OneIPDeviceSetting.PTP_ANNOUNCE|PTP_SYNC|PTP_DELAY_REQ|PTP_ANNOUNCE_TIMEOUT|PTP_DSCP|SAP_EXPIRE|SAP_INTERVAL|STREAM_TTL|SINK_ROTATION: 2851602432>¶
The settings whose values a frame carries in a block of their own behind the rest, OneIPPtpMessages: the PTP message settings, the two SAP values, the stream TTL and the output’s rotation.
- mx_remote.proto.Constants.ONEIP_STREAM_TTL_DEFAULT = 64¶
The TTL a OneIP device’s streams carry until it is set.
- mx_remote.proto.Constants.ONEIP_SINK_ROTATION_MAX = 359¶
The largest angle a OneIP device’s HDMI output is turned by, in degrees.
- mx_remote.proto.Constants.ONEIP_PTP_DOMAIN_MAX = 127¶
The highest PTP domain a OneIP device runs in.
Unit status and commands¶
A unit’s health and IP configuration, and the commands sent to one unit.
- class mx_remote.UnitStatus[source]¶
Bases:
objectA unit’s health and IP configuration, as it last reported them.
A unit reports this about itself with its periodic broadcast, and within a few seconds of a change to its flags, its status or its addresses.
- network: UnitNetConfig = UnitNetConfig(ip='0.0.0.0', netmask='0.0.0.0', gateway='0.0.0.0', dns1='0.0.0.0', dns2='0.0.0.0')¶
The IP configuration in use.
- temperatures: tuple[int, ...] = ()¶
Temperatures in degrees Celsius, at most UNIT_MAX_TEMPERATURES of them.
- power_save: tuple[UnitPowerSave, ...] = ()¶
What the unit offers at each power save level, from OneIPPowerSaveLevel.REDUCED up; empty for a unit that predates the field. A route change or a command wakes the unit at every level it supports.
- power_save_level(level)[source]¶
What the unit offers at a power save level, empty for OneIPPowerSaveLevel.NONE or a level it does not report.
- Parameters:
level (OneIPPowerSaveLevel | int)
- Return type:
- property network_pending: bool¶
Whether an IP configuration changed through the mesh waits for the mesh controller to confirm it.
- __init__(flags=<UnitFlag: 0>, uptime=0, boot_count=None, reboot_count=0, encoder_health=0, decoder_health=0, network=UnitNetConfig(ip='0.0.0.0', netmask='0.0.0.0', gateway='0.0.0.0', dns1='0.0.0.0', dns2='0.0.0.0'), fan_rpm=None, fan_duty=0, status=0, net_revert_s=0, temperatures=(), status_message='', power_save=())¶
- Parameters:
- Return type:
None
- class mx_remote.UnitNetConfig[source]¶
Bases:
objectAn IP configuration: the addresses a unit uses, or is told to use.
- property addresses: tuple[str, str, str, str, str]¶
The five addresses, in the order the wire carries them.
- class mx_remote.proto.Constants.UnitFlag[source]¶
Bases:
IntFlagThe flags of a unit’s status report.
- REBOOT_REQUIRED = 1¶
A changed setting takes effect after a reboot.
- VIDEO_PROCESSOR_UPGRADE = 2¶
A newer video processor image is available.
- DHCP = 4¶
The IP configuration comes from DHCP.
- NET_PENDING = 8¶
The IP configuration was changed through the mesh, and is reverted unless the mesh controller confirms it in time.
- FAN_QUIET = 16¶
The fan runs in quiet mode.
- EXTERNAL_PSU = 32¶
Powered by an external supply rather than PoE.
- VIDEO_PROCESSOR_CONFIGURED = 64¶
The video processor runs with its IP configured. Without it the encoder and decoder health carry nothing.
- ENCODER_ACTIVE = 128¶
The encoder is enabled.
- DECODER_ACTIVE = 256¶
The decoder is enabled.
- AUTO_DISABLE = 512¶
The decoder disables itself without a display.
- AUTO_DISABLE_ACTIVE = 1024¶
The decoder disabled itself without a display.
- OFF_NO_SIGNAL = 2048¶
The HDMI output switches off without a signal.
- OFF_NO_SIGNAL_ACTIVE = 4096¶
The HDMI output switched off without a signal.
- POWER_CHECK = 8192¶
Display power is checked before the decoder is enabled.
- BOOT_COUNT = 16384¶
The boot count is reported.
- FAN_SPEED = 32768¶
The fan speed is reported.
- __new__(value)¶
- class mx_remote.proto.Constants.UnitCommandKind[source]¶
Bases:
IntEnumWhat a unit command asks of its unit.
- CLEAR_STATUS = 0¶
Clear the current system status.
- VIDEO_PROCESSOR_UPGRADE = 1¶
Upgrade the video processor to the latest image.
- NET_CONFIG = 2¶
Change the IP configuration.
- NET_CONFIRM = 3¶
Keep a pending IP configuration.
- __new__(value)¶
- class mx_remote.proto.Constants.UnitCommandFlag[source]¶
Bases:
IntFlagThe flags of a unit command.
- FORCE = 1¶
flash the image even if it is running already.
- Type:
With VIDEO_PROCESSOR_UPGRADE
- DHCP = 2¶
use DHCP, ignoring the addresses.
- Type:
With NET_CONFIG
- __new__(value)¶
- mx_remote.proto.Constants.UNIT_MAX_TEMPERATURES = 6¶
The most temperature sensors a unit reports.
- class mx_remote.proto.Constants.UnitPowerSave[source]¶
Bases:
IntFlagWhat a unit offers at one power save level.
- SUPPORTED = 1¶
The unit can power down to this level.
- INPUT_WAKE = 2¶
A signal on the HDMI input wakes the unit.
- OUTPUT_WAKE = 4¶
The display powering on wakes the unit, and the unit can power it on.
- __new__(value)¶
- mx_remote.proto.Constants.UNIT_POWER_SAVE_LEVELS = 4¶
The power save levels a unit reports what it offers at, from OneIPPowerSaveLevel.REDUCED up.
OneIP session descriptions¶
What an output plays from a session description, and how it is timed.
- class mx_remote.OneIPSinkSdp[source]¶
Bases:
objectWhat a OneIP output plays from a session description, as it last reported it. The stream’s fields are zero while it plays none.
- flags: OneIPSdpFlag = 0¶
The report’s flags.
- encoding: OneIPSdpEncoding | int = 0¶
The sample encoding; a raw int for one this library does not name.
- clock_mode: OneIPSdpClockMode | int = 0¶
What the video processor times the stream by, behind OneIPSdpFlag.CLOCK.
- clock_state: OneIPSdpClockState | int = 0¶
How far the video processor has got with its timing, behind OneIPSdpFlag.CLOCK.
- __init__(flags=<OneIPSdpFlag: 0>, screen=0, encoding=OneIPSdpEncoding.NONE, channels=0, payload_type=0, media_clock=OneIPSdpMediaClock.NONE, ref_clock=OneIPSdpRefClock.NONE, clock_mode=OneIPSdpClockMode.ARRIVAL, clock_state=OneIPSdpClockState.IDLE, port=0, rate_hz=0, media_clock_offset=0, group='0.0.0.0', name='', layout='')¶
- Parameters:
flags (OneIPSdpFlag)
screen (int)
encoding (OneIPSdpEncoding | int)
channels (int)
payload_type (int)
media_clock (OneIPSdpMediaClock | int)
ref_clock (OneIPSdpRefClock | int)
clock_mode (OneIPSdpClockMode | int)
clock_state (OneIPSdpClockState | int)
port (int)
rate_hz (int)
media_clock_offset (int)
group (str)
name (str)
layout (str)
- Return type:
None
- class mx_remote.proto.Constants.OneIPSdpFlag[source]¶
Bases:
IntFlagThe flags of a OneIP output’s session description report.
- ACTIVE = 1¶
The output plays a stream from a description.
- AUDIO_ONLY = 2¶
And nothing else, as no video is routed to it.
- CLOCK = 4¶
The clock mode and state hold the video processor’s answer.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPSdpEncoding[source]¶
Bases:
IntEnumThe sample encoding of a stream a OneIP output plays from a description.
- L16 = 1¶
16-bit linear PCM.
- L24 = 2¶
24-bit linear PCM.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPSdpMediaClock[source]¶
Bases:
IntEnumWhere a described stream’s media clock comes from.
- DIRECT = 1¶
Direct, at an offset from the reference clock.
- SENDER = 2¶
The sender’s.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPSdpRefClock[source]¶
Bases:
IntEnumThe reference clock a described stream names.
- LOCAL_MAC = 3¶
The sender’s local MAC.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPSdpClockMode[source]¶
Bases:
IntEnumWhat a OneIP output’s video processor times a described stream by.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPSdpClockState[source]¶
Bases:
IntEnumHow far a OneIP output’s video processor has got with a described stream’s timing.
- SERVO = 1¶
Running its servo.
- UNTIMED = 5¶
Playing untimed.
- UNSUPPORTED = 6¶
The timing is not supported.
- __new__(value)¶
- mx_remote.proto.Constants.ONEIP_SDP_MAX = 2048¶
The longest session description a OneIP output takes, in bytes.
OneIP stream encryption¶
How a source unit encrypts its streams, as it reports it.
- class mx_remote.OneIPPrivacy[source]¶
Bases:
objectHow a OneIP source unit’s streams are encrypted, as it last reported it. A unit reports this whenever it changes, at least once a minute, and when asked. A unit that is in no mesh sends in the clear.
- anc: OneIPPrivacyStream¶
The ancillary data stream.
- __init__(video, audio, anc)¶
- Parameters:
video (OneIPPrivacyStream)
audio (OneIPPrivacyStream)
anc (OneIPPrivacyStream)
- Return type:
None
- class mx_remote.OneIPPrivacyStream[source]¶
Bases:
objectHow one of a OneIP source unit’s streams is encrypted, as the unit reports it: the values of the stream’s
a=privacyanda=extmapsession description attributes.A receiver needs these to decrypt the stream. The key itself never travels: every unit of a mesh holds the same one. This library holds no key and decrypts nothing.
- on: bool = False¶
Whether the stream is encrypted. Without it the stream goes out in the clear, and the fields below mean nothing.
- key_generator: bytes = b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'¶
The key generator, 16 bytes.
- key_id: bytes = b'\x00\x00\x00\x00\x00\x00\x00\x00'¶
Names the mesh’s key, 8 bytes. A receiver holding another drops the stream.
- __init__(group='0.0.0.0', port=0, version=0, on=False, full_id=0, short_id=0, iv=b'\x00\x00\x00\x00\x00\x00\x00\x00', key_generator=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', key_id=b'\x00\x00\x00\x00\x00\x00\x00\x00', key_version=0)¶
OneIP test card¶
A sink’s test pattern, tone and lip-sync flash, and the ranges it accepts.
- class mx_remote.OneIPTestcard[source]¶
Bases:
objectThe test card a OneIP sink draws on its output, as it last reported it.
A sink reports it only when asked, with request_oneip_testcard() or in answer to a change. The counters run free and wrap.
- flags: OneIPTestcardFlag = 0¶
What the sink reports about its test card.
- pattern: OneIPTestPattern | int = 0¶
The pattern; a raw int for a pattern this library does not name.
- tone: OneIPTestTone = OneIPTestTone(mode=<OneIPToneMode.OFF: 0>, freq=0, level=0, channels=0, rate=0)¶
The tone.
- sync: OneIPTestSync = OneIPTestSync(period=0, lead=0, offset=0, beep_ms=0)¶
The lip-sync flash.
- __init__(flags=<OneIPTestcardFlag: 0>, pattern=OneIPTestPattern.OFF, colour=0, tone=OneIPTestTone(mode=<OneIPToneMode.OFF: 0>, freq=0, level=0, channels=0, rate=0), sync=OneIPTestSync(period=0, lead=0, offset=0, beep_ms=0), frames=0, periods=0, marks=0)¶
- Parameters:
flags (OneIPTestcardFlag)
pattern (OneIPTestPattern | int)
colour (int)
tone (OneIPTestTone)
sync (OneIPTestSync)
frames (int)
periods (int)
marks (int)
- Return type:
None
- class mx_remote.OneIPTestTone[source]¶
Bases:
objectA OneIP sink’s test tone.
- mode: OneIPToneMode | int = 0¶
What plays; a raw int for a mode this library does not name.
- class mx_remote.OneIPTestSync[source]¶
Bases:
objectA OneIP sink’s lip-sync flash: a pattern frame is marked every
period, the frameleadafter a mark flashes white, and a BEEP tone startsoffsetsample periods after it.The offset is a calibration: nothing measures the sink’s own delay between a picture and a sample reaching the HDMI link, and a display adds its own.
- class mx_remote.proto.Constants.OneIPTestPattern[source]¶
Bases:
IntEnumThe test pattern a OneIP sink draws on its output.
- OFF = 0¶
No pattern.
- BARS = 1¶
Colour bars.
- FLAT = 2¶
One flat colour, the one the test card carries.
- RAMP = 3¶
A ramp.
- GRID = 4¶
A grid.
- STRIP = 5¶
A strip.
- CARD = 6¶
A test card.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPToneMode[source]¶
Bases:
IntEnumThe test tone a OneIP sink plays on its output.
- OFF = 0¶
No tone.
- CONTINUOUS = 1¶
A continuous tone.
- IDENT = 2¶
A channel ident.
- LINEUP = 3¶
A line-up tone, which needs two channels or more.
- BEEP = 4¶
A beep on each lip-sync mark.
- __new__(value)¶
- class mx_remote.proto.Constants.OneIPTestcardFlag[source]¶
Bases:
IntFlagWhat a OneIP sink reports about its test card.
- SUPPORTED = 1¶
The sink can draw the test card.
- SHOWING = 2¶
The output shows the pattern.
- PLAYING = 4¶
The tone plays on the output.
- PATTERN_PENDING = 8¶
A pattern change has yet to reach the video processor.
- TONE_PENDING = 16¶
A tone change has yet to reach the video processor.
- SYNC_PENDING = 32¶
A lip-sync change has yet to reach the video processor.
- __new__(value)¶
- mx_remote.proto.Constants.ONEIP_TONE_FREQ_MIN = 20¶
The lowest test tone frequency, in Hz.
- mx_remote.proto.Constants.ONEIP_TONE_FREQ_MAX = 20000¶
The highest test tone frequency, in Hz.
- mx_remote.proto.Constants.ONEIP_TONE_LEVEL_MIN = -60¶
The quietest test tone level, in dBFS; the loudest is 0.
- mx_remote.proto.Constants.ONEIP_TONE_CHANNELS_MAX = 8¶
The most channels a test tone plays on.
- mx_remote.proto.Constants.ONEIP_TONE_RATES = (44100, 48000, 96000)¶
The sample rates a test tone plays at, in Hz.
- mx_remote.proto.Constants.ONEIP_SYNC_OFFSET_MAX = 16777215¶
The largest lip-sync beep offset, in sample periods.
- mx_remote.proto.Constants.ONEIP_SYNC_BEEP_MS_MIN = 1¶
The shortest lip-sync beep, in milliseconds.
- mx_remote.proto.Constants.ONEIP_SYNC_BEEP_MS_MAX = 10000¶
The longest lip-sync beep, in milliseconds.
Mesh time¶
The time zone and clock a mesh controller announces.
- class mx_remote.TimeZone[source]¶
Bases:
objectThe time zone a device announces for its mesh.
The mesh controller announces it with every periodic broadcast, and each device of the mesh keeps its clock and its power save windows by it. An empty zone and rule mean the controller has none, and the devices keep UTC.
Names from before OneIP¶
Releases up to 5.11 used the firmware’s internal names in the public API: V2IP
for OneIP and FPGA for the video processor. Each old name maps to the new one
by spelling alone - V2IP becomes OneIP (ONEIP in a constant, oneip in
a member), and Fpga or FPGA becomes VideoProcessor or VIDEO_PROCESSOR:
device.v2ip_settings is device.oneip_settings, V2IPFpgaFeature is
OneIPVideoProcessorFeature, FirmwareType.FPGA is
FirmwareType.VIDEO_PROCESSOR.
The old names still resolve. A module-level name or a class member raises a
DeprecationWarning naming its replacement; an enum member and an
AudioFeatures bit constant are plain aliases, since those cannot warn. The old
names are left out of from mx_remote import * and out of the type stubs, so a
type checker reports them, and they will be removed in a future major release.
One rename has no alias: a OneIP device’s temperatures dict reports the video
processor’s sensor under 'Video Processor', where it used 'FPGA'.