{"id":27601959,"url":"https://github.com/monoxane/nkips","last_synced_at":"2025-06-27T10:35:11.527Z","repository":{"id":52938843,"uuid":"189697985","full_name":"monoxane/nkips","owner":"monoxane","description":"RE'd Ross NK-IPS Router Control","archived":false,"fork":false,"pushed_at":"2022-03-11T09:06:03.000Z","size":59,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"nodejs","last_synced_at":"2025-05-26T23:16:52.436Z","etag":null,"topics":["broadcast","media-production","ross","router","video"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monoxane.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-01T06:19:20.000Z","updated_at":"2023-01-14T23:27:22.000Z","dependencies_parsed_at":"2022-08-26T01:41:50.198Z","dependency_job_id":null,"html_url":"https://github.com/monoxane/nkips","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/monoxane/nkips","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monoxane%2Fnkips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monoxane%2Fnkips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monoxane%2Fnkips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monoxane%2Fnkips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monoxane","download_url":"https://codeload.github.com/monoxane/nkips/tar.gz/refs/heads/nodejs","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monoxane%2Fnkips/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262240096,"owners_count":23280453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["broadcast","media-production","ross","router","video"],"created_at":"2025-04-22T17:50:43.844Z","updated_at":"2025-06-27T10:35:11.504Z","avatar_url":"https://github.com/monoxane.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ross NK Router Control\nThis package provides control, state management, and monitoring of Ross NK router systems via an NK-IPS network gateway, it may also work via an NK-NET gateway but has not been tested to do so.\n\n## Getting Started\nAdd `nkips` with yarn or npm.\n\n```js\nconst NKIPS = require('nkips')\n\nconst router = new NKIPS({\n  host: '10.0.10.2', // IP Address of NK-IPS Gateway\n  address: 254, // TBUS Address of NK-IPS Gateway\n  inputs: 72, // Input count of largest component in the system\n  outputs: 72, // Output count of largest component in the system\n  levels: 1, // How many signal levels your system contains, elaborated on below\n  labels: labels // String of DashBoard Global Labels CSV file\n})\n\nrouter.on('ready', () =\u003e {\n  router.getCrossPoint(67).then(crosspoint =\u003e console.log(crosspoint))\n  router.setLabel('output', 67, { label: 'VREM IP 1', description: 'A VOID TO SEND VIDEO TO'})\n  router.getCrossPoint([67, 68, 69]).then(console.log)\n})\n\nrouter.on('crosspoint', (crosspoint) =\u003e console.log(crosspoint))\n```\n\n## API\n### NKIPS()\n`NKIPS` is the root class of the whole platform, it provides all the methods required to set or get crosspoint states, as well as manage labels and descriptions for inputs and outputs.\n\nThe constructor requires an object with the following signature to initialise the system and connect to the NK-IPS\n```js\n{\n  host: string, // IP Address of NK-IPS Gateway\n  address: int, // TBUS Address of NK-IPS Gateway\n  inputs: int, // Input count of largest component in the system\n  outputs: int, // Output count of largest component in the system\n  levels: int, // How many signal levels your system contains, elaborated on below\n  labels: string // String of DashBoard Global Labels CSV file\n}\n``` \n\n### router.getCrossPoint()\n`router.getCrossPoint` returns a Promise with the state of the requested crosspoint, it takes either a single integer or an array of integers and returns either a CrossPointState class or an array of them for the requested crosspoints.\n\n```js\n  router.getCrossPoint(67).then(crosspoint =\u003e console.log(crosspoint))\n\n  \u003e CrossPointState {\n    id: 67,\n    label: 'VOIDBOX',\n    description: 'A Place to Throw Signals',\n    sources: [\n      {\n        level: 'MD Video',\n        id: 1,\n        label: 'A SOURCE',\n        description: 'Something That Makes Signal'\n      },\n      { level: 'SDI Video', id: undefined },\n      { level: 'AES Audio 1', id: undefined },\n      { level: 'AES Audio 2', id: undefined },\n      { level: 'Analog Video', id: undefined },\n      { level: 'Analog Audio 1', id: undefined },\n      { level: 'Analog Audio 2', id: undefined },\n      { level: 'Machine Control', id: undefined }\n    ]\n}\n```\n\n### router.setCrossPoint()\n`router.setCrossPoint` allows you to set the state of a crosspoint in the router system on any valid level. The way levels are handled is a bit interesting so currently you have to set each level seperately, plans to implement multilevel routing using either a levelMask or array of levels is underway.\n\nValid signal levels can be read from `router.levels`, due to some internal shenanigans relating to TBUS masks, these must be reference with an integer version of the levelMask for this level which can be obtained with `router.levelToInt[levelName]`\n\nThis method currently returns nothing due to the way state is handled, you should listen for a crosspoint event to determine if the route has been made.\n\n```js\n  router.setCrossPoint({\n    level: router.levelToInt['MD Video'],\n    destination: 67, \n    source: 2\n  })\n```\n\n### router.setLabel()\n`router.setLabel` allows you to update the label for an input or output, either the label or description can be left null or undefined to retain the current value.\n\n```js\n  router.setLabel(\n    'output', // 'output' or 'input'\n    67, // ID of IO\n    {\n      label: 'TEST', // Label to set\n      description: 'A VOID TO SEND SIGNALS' // Description to set\n    }\n  )\n```\n\n### router.labels.toLBL()\nThis method allows you to dump the LabelStore to a DashBoard compliant CSV for saving as an .lbl file.\n\n```js\n  router.labels.toLBL().then(labels =\u003e console.log(labels))\n```\n\n## Events\n### router.on('crosspoint')\nThe `crosspoint` event is emitted whenever a crosspoint is changed on the remote NK-IPS (and in effect, anywhere in the router system), this includes routes made via this package, via DashBoard softpanels, or via TBUS/ethernet RCPs. The event is emitted with a CrossPointState class for the crosspoint that has changed.\n\n```js\n  router.on('crosspoint', (crosspoint) =\u003e console.log(crosspoint))\n\n  \u003e CrossPointState {\n    id: 67,\n    label: 'VOIDBOX',\n    description: 'A Place to Throw Signals',\n    sources: [\n      {\n        level: 'MD Video',\n        id: 2,\n        label: 'A DIFFERENT SOURCE',\n        description: 'Something That Makes Signal From A Different Perspective'\n      },\n      { level: 'SDI Video', id: undefined },\n      { level: 'AES Audio 1', id: undefined },\n      { level: 'AES Audio 2', id: undefined },\n      { level: 'Analog Video', id: undefined },\n      { level: 'Analog Audio 1', id: undefined },\n      { level: 'Analog Audio 2', id: undefined },\n      { level: 'Machine Control', id: undefined }\n    ]\n```\n\n## Notices\n\nThis code was entirely produced with black box reverse engineering of the NK-IPS' TBUS over IP protocol. Some features may not work as intended and others may produce unexpected results, it has been tested in production environments and seems to be stable but as with all blackbox revese engineering it is liable to sudden breakage.\n\nThe Ross NK-IPS/TBUS Protocol itself has no public license and is thus assumed to be Copyright Ross Video Ltd of Canada. All code I have written for this package is licensed under the GNU GPL v3 License, a full copy of which is available in `license.md` or on [the GNU Project's website](https://www.gnu.org/licenses/gpl-3.0.en.html)\n\nRoss, if you don't like this, please contact me first, thanks.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonoxane%2Fnkips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonoxane%2Fnkips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonoxane%2Fnkips/lists"}