# atem-connection-nodered

> This package provides an interface between BlackMagic ATEM switchers and NodeRed

Latest version **0.2.1** (published 2023-02-14) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install atem-connection-nodered
pnpm add atem-connection-nodered
yarn add atem-connection-nodered
bun add atem-connection-nodered
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2023-02-14 |
| First published | 2023-02-12 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 63.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Hayden Donald |
| Maintainers | haydendonald |
| Keywords | node-red, blackmagic, black, magic, ATEM |

## Links

- npm: https://www.npmjs.com/package/atem-connection-nodered
- Repository: https://github.com/haydendonald/atem-connection-nodered
- Homepage: https://github.com/haydendonald/atem-connection-nodered#readme
- Issues: https://github.com/haydendonald/atem-connection-nodered/issues
- npm.io page: https://npm.io/package/atem-connection-nodered

## Dependencies (1)

- [atem-connection](https://npm.io/package/atem-connection.md) ^3.1.3

## Recent versions

- 0.2.1 (latest) — 2023-02-14
- 0.2.0 — 2023-02-14
- 0.1.9 — 2023-02-14
- 0.1.8 — 2023-02-14
- 0.1.7 — 2023-02-13
- 0.1.6 — 2023-02-13
- 0.1.5 — 2023-02-13
- 0.1.4 — 2023-02-13
- 0.1.3 — 2023-02-13
- 0.1.2 — 2023-02-13
- 0.1.1 — 2023-02-13
- 0.1.0 — 2023-02-13
- 0.0.9 — 2023-02-13
- 0.0.8 — 2023-02-13
- 0.0.7 — 2023-02-13
- … 6 more at https://npm.io/package/atem-connection-nodered/versions

## README

# ATEM Connection for NodeRed
This package provides an interface between [BlackMagic ATEM](Blackmagic) switchers and NodeRed using the [ATEM Connection](https://github.com/nrkno/sofie-atem-connection) project by [Norsk rikskringkasting (NRK)](https://github.com/nrkno). This project is a continuation of the [BlackMagic ATEM NodeRed](https://github.com/haydendonald/blackmagic-atem-nodered) project as i can no longer support the ATEM side of the project.


# What's Supported?
* Direct control with [ATEM Connection](https://github.com/nrkno/sofie-atem-connection) with topics like stateChanged
* [Getting Status](https://github.com/haydendonald/atem-connection-nodered/blob/main/docs/getters.md)
* [Program Input](https://github.com/haydendonald/atem-connection-nodered/blob/main/docs/mixEffect.md)
* [Preview Input](https://github.com/haydendonald/atem-connection-nodered/blob/main/docs/mixEffect.md)
* [Macros](https://github.com/haydendonald/atem-connection-nodered/blob/main/docs/macro.md)
* [Transitions](https://github.com/haydendonald/atem-connection-nodered/blob/main/docs/mixEffect.md)
* [Fade To Black](https://github.com/haydendonald/atem-connection-nodered/blob/main/docs/mixEffect.md)


# Input messages
Below is a list of messages that can be sent to the node:

## Action
Will call a function to action something on the atem
```javascript
{
    {
        topic: "previewInput", //The function to call
        payload: {
            // The payload to send (see the function for information on this)
        }
    }
}
```

## Direct action
Will call a method directly implemented by [ATEM Connection](https://nrkno.github.io/sofie-atem-connection/classes/Atem.html). Be careful using as this can be problematic, but it is very powerful if used correctly!
```javascript
//Example setting upstream keyer 1 on me 0 on air
//https://nrkno.github.io/sofie-atem-connection/classes/Atem.html#setUpstreamKeyerOnAir
{
    {
        topic: "directAction",
        payload: {
            function: "setUpstreamKeyerOnAir",
            parameters: [true, 0, 1]
        }
    }
}
```

# Output messages
Below is a list of messages that can be sent out by the node:

## Connection State

```javascript
{
    {
        topic: "connection",
        payload: "connected/disconnected"
    }
}
```

## Info / Error / Debug / Command

```javascript
{
    {
        topic: "info/error/debug/command",
        payload: "" //The message
    }
}
```

## State Changed

```javascript
{
    {
        topic: "stateChanged",
        payload: {
            state: {} //The state object
            pathToChange: "" //The path
        }
    }
}
```

## Responses

```javascript
{
    {
        topic: "response",
        success: true/false,
        state: {
            //The ATEM state
        },
        payload: {
            //The response
        }
    }
}
```

## Function Changed Example
This message is what is output when a function is supported by this project and has been translated. See the specific supported functions below.
```javascript
{
    topic: "function",
    payload: {
        function: "previewInput",
        data: {
            ME: {
                //The ME
            }
            input: {
                //The input that was selected
            }
        }, 
        state: {
            // The state object
        }, 
        pathToChange: "video.mixEffects.1.previewInput" // Where the change came from specifically
    }
}
```


# Thanks
[ATEM Connection](https://github.com/nrkno/sofie-atem-connection) project by [Norsk rikskringkasting (NRK)](https://github.com/nrkno) which provides the connection to the ATEM.



# Aims!
Here is a list of things i want to add:
```
autoDownstreamKey
setDownstreamKeyCutSource
setDownstreamKeyFillSource
setDownstreamKeyOnAir

autoTransition
cut
fadeToBlack
setTransitionPosition
setTransitionStyle

macroRun ✅
macroContinue ✅
macroStop ✅

changePreviewInput ✅
changeProgramInput ✅

setAuxSource

setUpstreamKeyerCutSource
setUpstreamKeyerFillSource
setUpstreamKeyerOnAir 


startRecording
startStreaming
stopRecording
stopStreaming
```

---
_Source: https://npm.io/package/atem-connection-nodered · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
