Skip to content

Commit 03aa9db

Browse files
authored
Merge pull request #2 from MysteryCode/libupdate
update library
2 parents cf54d5d + 6a24f75 commit 03aa9db

File tree

16 files changed

+259
-252
lines changed

16 files changed

+259
-252
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
**/*.js
22
extra
33
node_modules/**
4+
/tsconfig.json

.github/workflows/codestyle.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Code Style
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77
pull_request:
88

99
permissions:
@@ -14,19 +14,19 @@ jobs:
1414
name: TS Prettier
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
18-
- name: Set up node.js
19-
uses: actions/setup-node@v3
20-
with:
21-
node-version: "18"
22-
cache: "npm"
23-
- run: npm install
24-
- name: Run prettier
25-
run: |
26-
shopt -s globstar
27-
npx prettier -w ts/**/*.ts
28-
- run: echo "::add-matcher::.github/diff.json"
29-
- name: Show diff
30-
run: |
31-
git checkout -- package-lock.json
32-
git diff --exit-code
17+
- uses: actions/checkout@v4
18+
- name: Set up node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: "18"
22+
cache: "npm"
23+
- run: npm install
24+
- name: Run prettier
25+
run: |
26+
shopt -s globstar
27+
npx prettier -w ts/**/*.ts
28+
- run: echo "::add-matcher::.github/diff.json"
29+
- name: Show diff
30+
run: |
31+
git checkout -- package-lock.json
32+
git diff --exit-code

.github/workflows/javascript.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: JavaScript
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77
pull_request:
88

99
permissions:
@@ -16,17 +16,17 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
steps:
19-
- name: Set up node.js
20-
uses: actions/setup-node@v3
21-
with:
22-
node-version: "18"
23-
- uses: actions/checkout@v4
24-
- run: echo "::add-matcher::.github/javascript-syntax.json"
25-
- name: Remove files to be ignored
26-
run: |
27-
true
28-
- run: |
29-
! find src/ -type f -name '*.js' -exec node -c '{}' \; 2>&1 \
30-
|awk 'BEGIN {m=0} /(.js):[0-9]+$/ {m=1; printf "%s - ",$0} m==1 && /^SyntaxError/ { m=0; print }' \
31-
|sed "s@$(pwd)@.@" \
32-
|grep '^'
19+
- name: Set up node.js
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: "18"
23+
- uses: actions/checkout@v4
24+
- run: echo "::add-matcher::.github/javascript-syntax.json"
25+
- name: Remove files to be ignored
26+
run: |
27+
true
28+
- run: |
29+
! find src/ -type f -name '*.js' -exec node -c '{}' \; 2>&1 \
30+
|awk 'BEGIN {m=0} /(.js):[0-9]+$/ {m=1; printf "%s - ",$0} m==1 && /^SyntaxError/ { m=0; print }' \
31+
|sed "s@$(pwd)@.@" \
32+
|grep '^'

.github/workflows/pull_request.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name: Pull Requests
33
on:
44
pull_request:
55
types:
6-
- opened
7-
- edited
8-
- reopened
9-
- synchronize
10-
- ready_for_review
11-
- review_requested
6+
- opened
7+
- edited
8+
- reopened
9+
- synchronize
10+
- ready_for_review
11+
- review_requested
1212

1313
permissions:
1414
contents: read
@@ -23,18 +23,18 @@ jobs:
2323
uses: gsactions/commit-message-checker@8c8c0d18ba9b1fcfed6e7385fd2bf357dfc8dccb
2424
with:
2525
pattern: '^(?!Update\s+\S*$).*$'
26-
error: 'Please use a meaningful commit message.'
27-
excludeDescription: 'true'
28-
excludeTitle: 'true'
29-
checkAllCommitMessages: 'true'
26+
error: "Please use a meaningful commit message."
27+
excludeDescription: "true"
28+
excludeTitle: "true"
29+
checkAllCommitMessages: "true"
3030
accessToken: ${{ secrets.GITHUB_TOKEN }}
3131
- name: Check for unsquashed `fixup!` commits.
3232
if: ${{ ! github.event.pull_request.draft }}
3333
uses: gsactions/commit-message-checker@8c8c0d18ba9b1fcfed6e7385fd2bf357dfc8dccb
3434
with:
3535
pattern: '^(?!fixup!(\s|$))'
36-
error: 'A `fixup!` commit was found.'
37-
excludeDescription: 'true'
38-
excludeTitle: 'true'
39-
checkAllCommitMessages: 'true'
36+
error: "A `fixup!` commit was found."
37+
excludeDescription: "true"
38+
excludeTitle: "true"
39+
checkAllCommitMessages: "true"
4040
accessToken: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/typescript.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: TypeScript
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77
pull_request:
88

99
permissions:
@@ -16,48 +16,48 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
steps:
19-
- uses: actions/checkout@v4
20-
- name: Set up node.js
21-
uses: actions/setup-node@v3
22-
with:
23-
node-version: "18"
24-
cache: "npm"
25-
- run: npm install
26-
- run: |
27-
npx tsc --noEmit
19+
- uses: actions/checkout@v4
20+
- name: Set up node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: "18"
24+
cache: "npm"
25+
- run: npm install
26+
- run: |
27+
npx tsc --noEmit
2828
eslint:
2929
name: "eslint"
3030
runs-on: ubuntu-latest
3131
strategy:
3232
fail-fast: false
3333
steps:
34-
- uses: actions/checkout@v4
35-
- name: Set up node.js
36-
uses: actions/setup-node@v3
37-
with:
38-
node-version: "18"
39-
cache: "npm"
40-
- run: npm install
41-
- run: npx eslint .
34+
- uses: actions/checkout@v4
35+
- name: Set up node.js
36+
uses: actions/setup-node@v3
37+
with:
38+
node-version: "18"
39+
cache: "npm"
40+
- run: npm install
41+
- run: npx eslint .
4242
javascript_sync:
4343
name: "Check for outdated JavaScript"
4444
needs: tsc
4545
runs-on: ubuntu-latest
4646
strategy:
4747
fail-fast: false
4848
steps:
49-
- uses: actions/checkout@v4
50-
- name: Set up node.js
51-
uses: actions/setup-node@v3
52-
with:
53-
node-version: "18"
54-
cache: "npm"
55-
- run: npm install
56-
- run: rm -R src/**/*.js
57-
- run: |
58-
npx tsc
59-
- run: echo "::add-matcher::.github/diff.json"
60-
- name: Show diff
61-
run: |
62-
git checkout -- package-lock.json
63-
git diff --exit-code
49+
- uses: actions/checkout@v4
50+
- name: Set up node.js
51+
uses: actions/setup-node@v3
52+
with:
53+
node-version: "18"
54+
cache: "npm"
55+
- run: npm install
56+
- run: rm -R src/**/*.js
57+
- run: |
58+
npx tsc
59+
- run: echo "::add-matcher::.github/diff.json"
60+
- name: Show diff
61+
run: |
62+
git checkout -- package-lock.json
63+
git diff --exit-code

README.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# sACN for Node-RED
2+
23
Simple Implementation of [sACN](https://artisticlicenceintegration.com/technology-brief/technology-resource/sacn-and-art-net/) (Streaming ACN) for [Node-RED](https://nodered.org).
34

45
## Requirements
6+
57
Required version of Node-RED: v3.1.6
68

79
This package uses [`sacn`](https://www.npmjs.com/package/sacn) as library to interact by sACN.
810

911
## Installation
12+
1013
See the list below for the
1114
npm package names, or [search npm](https://www.npmjs.org/search?q=node-red-sacn).
1215
To install - either use the manage palette option in the editor, or change to your Node-RED user directory.
@@ -17,38 +20,45 @@ To install - either use the manage palette option in the editor, or change to yo
1720
Copyright MysteryCode and other contributors under [GNU GENERAL PUBLIC LICENSE Version 3](LICENSE).
1821

1922
## Node Usage
23+
2024
### sACN in
25+
2126
This node can be used to read one or multiple universes send by sACN.
2227

2328
#### Parameters:
24-
| Paremeter | Description | Possible Values | Default Value |
25-
|-------------|-------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------|---------------|
26-
| ip-address | IP-Address of the network-interface that should be used for reading from sACN. | `\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\` (_any valid ip-address_) | _empty_ |
27-
| mode | Defines whether the node returns the values of every read sACN package (direct mode), or merged values using HTP or LTP. | `direct`, `htp`, `ltp` | `htp` |
28-
| universe | The universe that is meant to be observed. | `\d+` (`1` to `63999`) | `1` |
29-
| port | The network port which should be used for reading sACN. | `\d+` | `5568` |
29+
30+
| Paremeter | Description | Possible Values | Default Value |
31+
| ---------- | ------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- | ------------- |
32+
| ip-address | IP-Address of the network-interface that should be used for reading from sACN. | `\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\` (_any valid ip-address_) | _empty_ |
33+
| mode | Defines whether the node returns the values of every read sACN package (direct mode), or merged values using HTP or LTP. | `direct`, `htp`, `ltp` | `htp` |
34+
| universe | The universe that is meant to be observed. | `\d+` (`1` to `63999`) | `1` |
35+
| port | The network port which should be used for reading sACN. | `\d+` | `5568` |
3036

3137
#### Output for direct-mode:
32-
| Property | Description |
33-
|------------|------------------------------------------------------------------------------------------------------------------------------------------|
38+
39+
| Property | Description |
40+
| ---------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
3441
| `sequence` | sACN packets are given a packet sequence number so that the receiver can keep the sequence of packets from a given sender. (`1` to `255`) |
35-
| `source` | IP-Address of the sender. |
36-
| `priority` | Priority of the sender. (`1` to `200`) |
37-
| `universe` | Id of the universe the package is addressed to. |
38-
| `payload` | array containing the dmx values as **percentage** by dmx channel. DMX-Channel `1` starts at key `1`, not `0`. (`Array<number, number>`) |
42+
| `source` | IP-Address of the sender. |
43+
| `priority` | Priority of the sender. (`1` to `200`) |
44+
| `universe` | Id of the universe the package is addressed to. |
45+
| `payload` | array containing the dmx values as **percentage** by dmx channel. DMX-Channel `1` starts at key `1`, not `0`. (`Array<number, number>`) |
3946

4047
#### Output for merging-modes (HTP or LTP):
41-
| Property | Description |
42-
|------------|------------------------------------------------------------------------------------------------------------------------------------------|
43-
| `universe` | Id of the universe the package is addressed to. |
44-
| `payload` | array containing the dmx values as **percentage** by dmx channel. DMX-Channel `1` starts at key `1`, not `0`. (`Array<number, number>`) |
48+
49+
| Property | Description |
50+
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------- |
51+
| `universe` | Id of the universe the package is addressed to. |
52+
| `payload` | array containing the dmx values as **percentage** by dmx channel. DMX-Channel `1` starts at key `1`, not `0`. (`Array<number, number>`) |
4553

4654
### sACN out
55+
4756
This node can be used to send one universe using sACN.
4857

4958
#### Parameters:
59+
5060
| Paremeter | Description | Possible Values | Default Value |
51-
|------------|---------------------------------------------------------------------------|----------------------------------------------------------------|---------------|
61+
| ---------- | ------------------------------------------------------------------------- | -------------------------------------------------------------- | ------------- |
5262
| ip-address | IP-Address of the network-interface that should be used for sending sACN. | `\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\` (_any valid ip-address_) | _empty_ |
5363
| speed | Defines the frequency for sending sACN-packages | `once (0Hz)`, `24Hz`, `27Hz`, `30Hz`, `40Hz`, `44Hz` | `0Hz` |
5464
| universe | The universe that is meant to be observed. | `\d+` (`1` to `63999`) | `1` |
@@ -57,6 +67,7 @@ This node can be used to send one universe using sACN.
5767
| priority | The name for the sACN-sender that should be displayed within the network. | _any string below 50 characters_ | `Node-RED` |
5868

5969
#### Expected input:
60-
| Property | Description |
61-
|------------|------------------------------------------------------------------------------------------------------------------------------------------|
62-
| `payload` | array containing the dmx values as **percentage** by dmx channel. DMX-Channel `1` starts at key `1`, not `0`. (`Array<number, number>`) |
70+
71+
| Property | Description |
72+
| --------- | --------------------------------------------------------------------------------------------------------------------------------------- |
73+
| `payload` | array containing the dmx values as **percentage** by dmx channel. DMX-Channel `1` starts at key `1`, not `0`. (`Array<number, number>`) |

package-lock.json

Lines changed: 8 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
},
88
"license": "GPL-3.0-only",
99
"dependencies": {
10-
"sacn": "file:../sACN"
10+
"sacn": "^4.6.0"
1111
},
1212
"devDependencies": {
1313
"@typescript-eslint/eslint-plugin": "^8.12.2",

0 commit comments

Comments
 (0)