Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hyperdeck-connection

nrkno21kMIT2.0.1TypeScript support: included

Typescript Node.js library for connecting with a BlackmagicDesign's HyperDeck devices.

blackmagic, bmd, hyperdeck, video, typescript, javascript, open, source

readme

Sofie HyperDeck Connection Library

CircleCI codecov

This is the HyperDeck Connection library of the Sofie TV Automation System, used for connecting to Blackmagic Design's HyperDeck devices.

General Sofie System Information


Technology Highlights

  • Typescript
  • Yarn
  • Jeststandard-version
  • codecov

Installation

For usage by library consumers installation is as easy as:

yarn add hyperdeck-connection

For library developers installation steps are as following:

git clone https://github.com/nrkno/tv-automation-hyperdeck-connection
yarn
yarn build

If you want to make a contribution, feel free to open a PR.

Usage

const { Hyperdeck, Commands } = require('hyperdeck-connection')
const myHyperdeck = new Hyperdeck()

myHyperdeck.connect('192.168.168.100')

myHyperdeck.on('connected', (info) => {
    console.log(info)
    // ConnectionInfoResponse {
    //  protocolVersion: 1.6,
    //  model:
    // }

    myHyperdeck.sendCommand(new Commands.RecordCommand('some_filename')).then(() => {
        console.log('recording')
    })

    myHyperdeck.sendCommand(new Commands.TransportInfoCommand()).then((transportInfo) => {
        console.log(transportInfo)
    })
})

myHyperdeck.on('notify.slot', function (err, state) {
    console.log(state) // catch the slot state change.
})
myHyperdeck.on('notify.transport', function (err, state) {
    console.log(state) // catch the transport state change.
})
myHyperdeck.on('error', (err) => {
    console.log('Hyperdeck error', err)
})

Events

  • connected This event will be fired once we have connected with the hyperdeck.

  • disconnected Whenever the connection is lost. connected may be fired against shortly after if the connection is restored

Test

This module will run tests by jest.

$ yarn unit

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.

changelog

Changelog

All notable changes to this project will be documented in this file. See Convential Commits for commit guidelines.

2.0.1 (Mon Mar 11 2024)

Fixes

  • don't return videoFormat: null for async transport updates (#32) de59cab

2.0.0 (Mon Jan 29 2024)

Breaking changes

Features

  • ! remove incorrect SlotId enum 930702d

Fixes

  • don't reject without an error c8d9d31
  • parse slotId correctly in notify.transport messages #12 07905d7
  • account for how fractional frame rates are expressed in the timecode e6f77be
  • account for how drop-frame content is expressed in the timecode 90858ff
  • interlaced frame counting 9455421
  • parse all clip info from the "disk list" command into separate fields 8d2dcb9

Features

  • add missing video formats eae2185
  • add inputVideoFormat to TransportInfoState af392d0
  • make event types be strongly defined 93e7573
  • make sendCommand response Promise be typed fb7a34b

1.0.0 (2022-11-21)

Breaking Changes

Features

0.5.0 (2022-04-29)

⚠ BREAKING CHANGES

  • drop node10 support + switch to github actions

Features

  • add clips count command [publish] (6d15db3)
  • configuration async handler [publish] (e12dfc4)
  • update for protocol v1.11 (firmware V7) (b25eae5)
  • update for protocol v1.11 (firmware V7) (680b3ea)

Bug Fixes

  • 508 transport info may use active slot for slot id (a3a5ce5)
  • add 3g formats (b4c9a37)
  • always destroy the socket at the end of disconnect() (87348bf)
  • always use destroy instead of end (212192a)
  • avoid emitting errors after disconnect has been called (43c7769)
  • build errors after formatting (6bd24a2)
  • missing export for config async handler (dbd6697)
  • missing response code (2601917)
  • suppress errors when connection is inactive (b7e540d)
  • throw error for missing promise (5edd810)
  • Updated URLs to match the renamed repo (6644ac8)
  • Updated URLs to match the renamed repo (046c9b0)

  • drop node10 support + switch to github actions (1e9ffb3)

0.4.4 (2020-10-29)

Features

  • ci: prereleases flow & optional audit skip [skip ci] (37b48a4)
  • ci: prereleases flow & optional audit skip [skip ci] (37b48a4)

0.4.3 (2020-01-10)

0.4.2 (2019-12-23)

Bug Fixes

  • FormatCommand response has a colon on newer firmware versions (5aa9071)

0.4.1 (2019-12-11)

Features

  • update ci to run for node 8,10,12 (9ae081a)

Bug Fixes

0.4.0 (2019-10-08)

Bug Fixes

  • Configuration Command (ab5bf19)
  • Device Info carries slot count and not unique id (0a8a09e)
  • export shuttle command (ed33dc5)

Features

0.3.0 (2019-09-02)

Features

  • quit command before closing connection (ece4982)

0.2.0 (2019-08-06)

Features

  • SlotInfo: add optional slot id (a73084b)
  • disk formatting commands (6fd124c)
  • slot select command (c70c509)

0.1.5 (2019-04-25)

Bug Fixes

  • ping timeouts should trigger reconnect (1e4a810)

0.1.4 (2019-03-04)

Bug Fixes

  • audit fix for vulnerabilities (a739543)
  • remove cpx dependencey. Not used, causes errors (8b3c5e5)

0.1.3 (2019-01-25)

Bug Fixes

  • reconnect logic on close event rather than end (2688ac1)

0.1.2 (2018-10-18)

Bug Fixes

  • Reconnection not working properly (6a40896)

0.1.1 (2018-10-18)

Bug Fixes

  • no change, just to trigger deploy (4755900)

0.1.0 (2018-10-16)

Bug Fixes

  • some typos. Adds some tests for hyperdeck class (01b4634)
  • Tidying and fixes for integrating with tsr (58b7d94)
  • transport info changes properties are nowoptional (83815ab)

Features

  • Add some more simple commands and refactor deserialization (ec6e4b1)
  • connection retry logic. test for ping timeout (b1f395d)
  • Initial working connection (e5e264c)
  • Parse transport info and async transport changes (2bfbd1e)
  • refactor the async handlers to be chosen more dynamically (0605108)
  • Remove promise from command, and create it when command is queued instead (6577549)
  • send pings to detect timeouts (7d4dd3f)
  • slot info command (af7c0ce)
  • Tidy up remaining todos (7cea4ad)