Code Monkey home page Code Monkey logo

sofie-hyperdeck-connection's Introduction

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.

sofie-hyperdeck-connection's People

Contributors

astral-arsonist avatar dependabot[bot] avatar hummelstrand avatar jstarpl avatar julusian avatar mint-dewit avatar nytamin avatar peterc89 avatar siljekristensen avatar sphlabs avatar stephan-nordnes-eriksen avatar superflytvab avatar vitupero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sofie-hyperdeck-connection's Issues

Bug / Feature Request : Goto command

  • I'm submitting a ...
    [x] bug report
    [x] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    Hey i currently use the libary : Hyperdeck server connection.
    I am missing the Command Goto(n) which is used to select which clip should be played.
    i tried to add it myself but failed. Please help me

508 response codes use 'active slot' instead of 'slotId'

  • I'm submitting a ...
    [X] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    If a slot change is initiated by the slot select command, the 508 response message that is returned uses the id active slot rather than slotId to identify the slot. Currently only slotId is being matched and passed up the chain.

The transport async handler needs to recognise active slot and pass it up as slotId

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Feature request: add HyperDeck Extreme support

  • I'm submitting a ...
    [ ] bug report
    [x] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary

Add new commands that are new and exclusive to the HD Extreme (e.g. dynamic range).
Support new protocols for existing commands (e.g. format: adds slot and name parameters).

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Feature request: Add configuration async handler

  • I'm submitting a ...
    [ ] bug report
    [X] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    Add configuration async handler

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
    Add an async handler for configuration updates that are sent when notify: configuration is enabled.

511 configuration:↵
audio input: {“embedded”, “XLR”, “RCA”}↵
video input: {“SDI”, “HDMI”, “component”, …}↵
file format: {File format}↵

Bug: fatal crash from unhandled 'error' event

  • I'm submitting a ...
    [X ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    When trying to connect to a Hyperdeck that does not exist at the specified IP address, an unhanded error is thrown, causing a crash.

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)
    Error log:

`events.js:353
throw er; // Unhandled 'error' event
^

Error: connect ETIMEDOUT 192.168.1.163:9993
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
Emitted 'error' event on Hyperdeck instance at:
at Socket. (/Users/stephen/Developer/companion/module-local-dev/companion-module-bmd-hyperdeck/node_modules/hyperdeck-connection/dist/hyperdeck.js:53:45)
at Socket.emit (events.js:376:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
errno: -60,
code: 'ETIMEDOUT',
syscall: 'connect',
address: '192.168.1.163',
port: 9993
}
`

Feature/Bug: remote status & async handler

  • I'm submitting a ...
    [X ] bug report
    [X ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    The RemoteCommand, when used with no arguments, should return a 210 message with the remote info state. Currently this is being returned as an error.

Additionally, please add an async handler for remote status updates (510 code).

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Feature request: add clip count command

  • I'm submitting a ...
    [ ] bug report
    [X ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    A clips get command, when there are no clips on the timeline, will return a failure code (107: timeline empty). In order to guard against this, implement the clips count command so one can test for the presence of clips before issuing clips get

  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.