Home

Awesome

Sofie MOS-Connection

Tests codecov Quality Gate Status

This is the MOS-Connection library of the Sofie TV Automation System, used for connecting to a MOS device using the MOS Protocol.

General Sofie System Information


Getting Started

Installation

npm install @mos-connection/connector
or
yarn add @mos-connection/connector

Usage

See more examples in the examples folder!

import { MosConnection } from '@mos-connection/connector'

let mos = new MosConnection(new ConnectionConfig({
	mosID: 'my.mos.application',
	acceptsConnections: true,
	profiles: {
		'0': true,
        '1': true,
        '2': true,
        '4': true
	},
	openRelay: true
	debug: false
}))
mos.onConnection((device: MosDevice) => { // called whenever there is a new connection to a mos-device
	if (device.hasConnection) { // true if we can send messages to the mos-server
	    device.getMachineInfo().then((lm) => {
			console.log('Machineinfo', lm)
		})
	}
	// Setup callbacks to pipe data:
	device.onRequestMachineInfo(() => {})
	device.onCreateRunningOrder((ro) => {})
	device.onDeleteRunningOrder((RunningOrderID: MosString128) => {})
	device.onReadyToAir(() => {})
	// ...
})

Quick-MOS

"Quick-MOS" is a simple MOS application that can be used to test the MOS-connection library.

It reads data-files from disk and pretends to be an NRCS, so you can connect other MOS-clients to it.

See Quick-MOS for more information.

MOS Support

The MOS-Connection library currently supports the MOS Protocol version 2.8.5.

Supported MOS Profiles

ProfileStatus
Profile 0Implemented
Profile 1Implemented
Profile 2Implemented
Profile 3Implemented
Profile 4Implemented
Profile 5Not implemented (yet)
Profile 6Not implemented (yet)
Profile 7Not implemented (yet)

Pull Requests for the remaining profiles would be happily accepted!

Packages

MOS-Connection consists of 3 packages:

There is also a helper application quickMos designed to be a minimal mock MOS server for testing client applications.


The NRK logo is a registered trademark of Norsk rikskringkasting AS. The license does not grant any right to use, in any way, any trademarks, service marks or logos of Norsk rikskringkasting AS.