mirror of
https://github.com/jwetzell/showbridge-docs.git
synced 2026-07-26 08:58:42 +00:00
format
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: 'npm'
|
||||
directory: '/'
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: 'weekly'
|
||||
- package-ecosystem: 'github-actions'
|
||||
directory: '/'
|
||||
interval: "weekly"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: 'weekly'
|
||||
interval: "weekly"
|
||||
|
||||
@@ -13,9 +13,9 @@ jobs:
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: 'package-lock.json'
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "npm"
|
||||
cache-dependency-path: "package-lock.json"
|
||||
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
|
||||
@@ -13,9 +13,9 @@ jobs:
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: 'package-lock.json'
|
||||
node-version-file: ".nvmrc"
|
||||
cache: "npm"
|
||||
cache-dependency-path: "package-lock.json"
|
||||
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
|
||||
+83
-43
@@ -21,15 +21,15 @@ export default defineConfig({
|
||||
sidebar: [
|
||||
{
|
||||
label: "showbridge",
|
||||
items:[{ autogenerate: { directory: "/showbridge" } }],
|
||||
items: [{ autogenerate: { directory: "/showbridge" } }],
|
||||
},
|
||||
{
|
||||
label: "Run",
|
||||
items:[{ autogenerate: { directory: "run" } }],
|
||||
items: [{ autogenerate: { directory: "run" } }],
|
||||
},
|
||||
{
|
||||
label: "Concepts",
|
||||
items:[{ autogenerate: { directory: "concepts" } }],
|
||||
items: [{ autogenerate: { directory: "concepts" } }],
|
||||
},
|
||||
{
|
||||
label: "Modules",
|
||||
@@ -37,27 +37,27 @@ export default defineConfig({
|
||||
{
|
||||
label: "Database",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/db" } }],
|
||||
items: [{ autogenerate: { directory: "modules/db" } }],
|
||||
},
|
||||
{
|
||||
label: "HTTP",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/http" } }],
|
||||
items: [{ autogenerate: { directory: "modules/http" } }],
|
||||
},
|
||||
{
|
||||
label: "MIDI",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/midi" } }],
|
||||
items: [{ autogenerate: { directory: "modules/midi" } }],
|
||||
},
|
||||
{
|
||||
label: "MQTT",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/mqtt" } }],
|
||||
items: [{ autogenerate: { directory: "modules/mqtt" } }],
|
||||
},
|
||||
{
|
||||
label: "NATS",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/nats" } }],
|
||||
items: [{ autogenerate: { directory: "modules/nats" } }],
|
||||
},
|
||||
{
|
||||
label: "Network",
|
||||
@@ -66,34 +66,34 @@ export default defineConfig({
|
||||
{
|
||||
label: "TCP",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/net/tcp" } }],
|
||||
items: [{ autogenerate: { directory: "modules/net/tcp" } }],
|
||||
},
|
||||
{
|
||||
label: "UDP",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/net/udp" } }],
|
||||
items: [{ autogenerate: { directory: "modules/net/udp" } }],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "PosiStageNet",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/psn" } }],
|
||||
items: [{ autogenerate: { directory: "modules/psn" } }],
|
||||
},
|
||||
{
|
||||
label: "Redis",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/redis" } }],
|
||||
items: [{ autogenerate: { directory: "modules/redis" } }],
|
||||
},
|
||||
{
|
||||
label: "Time",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/time" } }],
|
||||
items: [{ autogenerate: { directory: "modules/time" } }],
|
||||
},
|
||||
{
|
||||
label: "Serial",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/serial" } }],
|
||||
items: [{ autogenerate: { directory: "modules/serial" } }],
|
||||
},
|
||||
{
|
||||
label: "SIP",
|
||||
@@ -102,19 +102,19 @@ export default defineConfig({
|
||||
{
|
||||
label: "Call",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/sip/call" } }],
|
||||
items: [{ autogenerate: { directory: "modules/sip/call" } }],
|
||||
},
|
||||
{
|
||||
label: "DTMF",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/sip/dtmf" } }],
|
||||
items: [{ autogenerate: { directory: "modules/sip/dtmf" } }],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "WebSocket",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "modules/websocket" } }],
|
||||
items: [{ autogenerate: { directory: "modules/websocket" } }],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -124,32 +124,32 @@ export default defineConfig({
|
||||
{
|
||||
label: "ArtNet",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/artnet" } }],
|
||||
items: [{ autogenerate: { directory: "processors/artnet" } }],
|
||||
},
|
||||
{
|
||||
label: "Database",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/db" } }],
|
||||
items: [{ autogenerate: { directory: "processors/db" } }],
|
||||
},
|
||||
{
|
||||
label: "Debug",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/debug" } }],
|
||||
items: [{ autogenerate: { directory: "processors/debug" } }],
|
||||
},
|
||||
{
|
||||
label: "Filter",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/filter" } }],
|
||||
items: [{ autogenerate: { directory: "processors/filter" } }],
|
||||
},
|
||||
{
|
||||
label: "Float",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/float" } }],
|
||||
items: [{ autogenerate: { directory: "processors/float" } }],
|
||||
},
|
||||
{
|
||||
label: "FreeD",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/free-d" } }],
|
||||
items: [{ autogenerate: { directory: "processors/free-d" } }],
|
||||
},
|
||||
{
|
||||
label: "HTTP",
|
||||
@@ -158,29 +158,33 @@ export default defineConfig({
|
||||
{
|
||||
label: "Request",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/http/request" } }],
|
||||
items: [
|
||||
{ autogenerate: { directory: "processors/http/request" } },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Response",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/http/response" } }],
|
||||
items: [
|
||||
{ autogenerate: { directory: "processors/http/response" } },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Int",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/int" } }],
|
||||
items: [{ autogenerate: { directory: "processors/int" } }],
|
||||
},
|
||||
{
|
||||
label: "JSON",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/json" } }],
|
||||
items: [{ autogenerate: { directory: "processors/json" } }],
|
||||
},
|
||||
{
|
||||
label: "Key/Value",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/kv" } }],
|
||||
items: [{ autogenerate: { directory: "processors/kv" } }],
|
||||
},
|
||||
{
|
||||
label: "MIDI",
|
||||
@@ -189,27 +193,45 @@ export default defineConfig({
|
||||
{
|
||||
label: "Message",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/midi/message" } }],
|
||||
items: [
|
||||
{ autogenerate: { directory: "processors/midi/message" } },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Note On",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/midi/note_on" } }],
|
||||
items: [
|
||||
{ autogenerate: { directory: "processors/midi/note_on" } },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Note Off",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/midi/note_off" } }],
|
||||
items: [
|
||||
{ autogenerate: { directory: "processors/midi/note_off" } },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Control Change",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/midi/control_change" } }],
|
||||
items: [
|
||||
{
|
||||
autogenerate: {
|
||||
directory: "processors/midi/control_change",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Program Change",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/midi/program_change" } }],
|
||||
items: [
|
||||
{
|
||||
autogenerate: {
|
||||
directory: "processors/midi/program_change",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -220,7 +242,9 @@ export default defineConfig({
|
||||
{
|
||||
label: "Message",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/mqtt/message" } }],
|
||||
items: [
|
||||
{ autogenerate: { directory: "processors/mqtt/message" } },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -231,7 +255,9 @@ export default defineConfig({
|
||||
{
|
||||
label: "Message",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/nats/message" } }],
|
||||
items: [
|
||||
{ autogenerate: { directory: "processors/nats/message" } },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -242,19 +268,21 @@ export default defineConfig({
|
||||
{
|
||||
label: "Message",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/osc/message" } }],
|
||||
items: [
|
||||
{ autogenerate: { directory: "processors/osc/message" } },
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Router",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/router" } }],
|
||||
items: [{ autogenerate: { directory: "processors/router" } }],
|
||||
},
|
||||
{
|
||||
label: "Script",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/script" } }],
|
||||
items: [{ autogenerate: { directory: "processors/script" } }],
|
||||
},
|
||||
{
|
||||
label: "SIP",
|
||||
@@ -267,12 +295,24 @@ export default defineConfig({
|
||||
{
|
||||
label: "Audio",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/sip/response/audio" } }],
|
||||
items: [
|
||||
{
|
||||
autogenerate: {
|
||||
directory: "processors/sip/response/audio",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "DTMF",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/sip/response/dtmf" } }],
|
||||
items: [
|
||||
{
|
||||
autogenerate: {
|
||||
directory: "processors/sip/response/dtmf",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -281,18 +321,18 @@ export default defineConfig({
|
||||
{
|
||||
label: "String",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/string" } }],
|
||||
items: [{ autogenerate: { directory: "processors/string" } }],
|
||||
},
|
||||
{
|
||||
label: "Time",
|
||||
collapsed: true,
|
||||
items:[{ autogenerate: { directory: "processors/time" } }],
|
||||
items: [{ autogenerate: { directory: "processors/time" } }],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "Examples",
|
||||
items:[{ autogenerate: { directory: "examples" } }],
|
||||
items: [{ autogenerate: { directory: "examples" } }],
|
||||
},
|
||||
],
|
||||
}),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { defineCollection } from 'astro:content';
|
||||
import { docsLoader } from '@astrojs/starlight/loaders';
|
||||
import { docsSchema } from '@astrojs/starlight/schema';
|
||||
import { defineCollection } from "astro:content";
|
||||
import { docsLoader } from "@astrojs/starlight/loaders";
|
||||
import { docsSchema } from "@astrojs/starlight/schema";
|
||||
|
||||
export const collections = {
|
||||
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
---
|
||||
title: Config
|
||||
sidebar:
|
||||
order: 1
|
||||
order: 1
|
||||
---
|
||||
The showbridge router's config is entirely controlled by a YAML/JSON config file. This file must be made by hand for now. I do provide some starter/example configs to look at to get a general idea of what one entails.
|
||||
|
||||
The showbridge router's config is entirely controlled by a YAML/JSON config file. This file must be made by hand for now. I do provide some starter/example configs to look at to get a general idea of what one entails.
|
||||
|
||||
Resources
|
||||
- good idea to start with [config.yaml](https://github.com/jwetzell/showbridge-go/blob/main/config.yaml)
|
||||
|
||||
- good idea to start with [config.yaml](https://github.com/jwetzell/showbridge-go/blob/main/config.yaml)
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
---
|
||||
title: Modules
|
||||
sidebar:
|
||||
order: 2
|
||||
order: 2
|
||||
---
|
||||
|
||||
Modules are anything that can produce input and/or handle output. They are configured in the `modules` property of the [router config file](/concepts/config).
|
||||
|
||||
## YAML Definition
|
||||
|
||||
A module YAML block has the following properties
|
||||
|
||||
- **id**: user assigned unique identifier that will be used to reference a module instance in a [route](/concepts/routes)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
---
|
||||
title: Payload
|
||||
sidebar:
|
||||
order: 5
|
||||
order: 5
|
||||
---
|
||||
|
||||
[Processors](/concepts/Processors) operator on a "wrapped" version of the message produces by the module. This wrapped version is available to all processors and is defined as follows:
|
||||
|
||||
- **Payload**: the actual message produced by the module (or the result of the previous [processor](/concepts/processors) in the [route](/concepts/routes)).
|
||||
- **Source**: the id of the module that produced the original payload.
|
||||
- **Sender**: the network address of the module that produced the message (if applicable not all modules will have a sender address).
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
---
|
||||
title: Processors
|
||||
sidebar:
|
||||
order: 4
|
||||
order: 4
|
||||
---
|
||||
|
||||
Processors are anything that create or manipulate messages. They are configured in the `processors` property of an individual [route](/concepts/routes). Processors have the ability to change the type of the message flowing through the system so a byte array can come into a `osc.message.decode` processor and a OSC message type will come out of the processor.
|
||||
|
||||
## YAML Definition
|
||||
|
||||
A processor YAML block has the following properties
|
||||
|
||||
- **type**: the processor type
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
---
|
||||
title: Routes
|
||||
sidebar:
|
||||
order: 3
|
||||
order: 3
|
||||
---
|
||||
|
||||
Routes take the messages coming from a module and push them through a list of [processors](/concepts/processors). Having no processors is valid but serves no real purpose and is basically a no-op.
|
||||
Routes take the messages coming from a module and push them through a list of [processors](/concepts/processors). Having no processors is valid but serves no real purpose and is basically a no-op.
|
||||
|
||||
## YAML Definition
|
||||
|
||||
- **input**: the id of the [module](/concepts/modules) that will provide messages to this route
|
||||
- **processors**: (optional) array of [processors](/concepts/processors) that will be called in order and the result of the previous will be fed to the next processor.
|
||||
- an error in a processor step will result in the individual route being terminated
|
||||
- an error in a processor step will result in the individual route being terminated
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
title: SIP > OSC
|
||||
sidebar:
|
||||
order: 2
|
||||
order: 2
|
||||
---
|
||||
|
||||
import { Code } from '@astrojs/starlight/components';
|
||||
import { Code } from "@astrojs/starlight/components";
|
||||
|
||||
This config starts an SIP server listening on port `5060`. Any incoming call will result in a OSC message being sent to `127.0.0.1:53000` with the address set to [fire a QLab cue](https://qlab.app/docs/v5/scripting/osc-dictionary-v5/#/cue/{cue_number}/go) with the dialed number as the cue number. This was tested with a cheap SIP gateway like [this one](https://www.grandstream.com/products/gateways-and-atas/analog-telephone-adaptors/product/ht802).
|
||||
|
||||
@@ -32,6 +32,6 @@ routes:
|
||||
- type: router.output
|
||||
params:
|
||||
module: udp
|
||||
`
|
||||
`;
|
||||
|
||||
<Code code={example} title="config.yaml" lang="yaml"/>
|
||||
<Code code={example} title="config.yaml" lang="yaml" />
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
---
|
||||
title: HTTP > OSC
|
||||
sidebar:
|
||||
order: 1
|
||||
order: 1
|
||||
---
|
||||
|
||||
import { Code } from '@astrojs/starlight/components';
|
||||
import { Code } from "@astrojs/starlight/components";
|
||||
|
||||
This config starts an HTTP server listening on port `3000`. Any HTTP request coming into that server will result in a OSC message being sent to `127.0.0.1:8000` with the address set to the path from the incoming HTTP message.
|
||||
|
||||
|
||||
export const example = `
|
||||
api:
|
||||
enabled: true
|
||||
@@ -33,6 +32,6 @@ routes:
|
||||
- type: router.output # output to the udp module
|
||||
params:
|
||||
module: udp
|
||||
`
|
||||
`;
|
||||
|
||||
<Code code={example} title="config.yaml" lang="yaml"/>
|
||||
<Code code={example} title="config.yaml" lang="yaml" />
|
||||
|
||||
@@ -4,8 +4,8 @@ sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
Welcome to the showbridge docs, this is an ever changing store of information related to [showbridge](https://github.com/jwetzell/showbridge-go).
|
||||
Welcome to the showbridge docs, this is an ever changing store of information related to [showbridge](https://github.com/jwetzell/showbridge-go).
|
||||
|
||||
If you find something that doesn't make sense or needs more documentation/clarification please open an issue on the [docs repo](https://github.com/jwetzell/showbridge-docs/issues).
|
||||
If you find something that doesn't make sense or needs more documentation/clarification please open an issue on the [docs repo](https://github.com/jwetzell/showbridge-docs/issues).
|
||||
|
||||
For issues related to the actual application please open them on the [showbridge repo](https://github.com/jwetzell/showbridge-go)
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
---
|
||||
title: SQLite
|
||||
sidebar:
|
||||
order: 1
|
||||
order: 1
|
||||
---
|
||||
The `db.sqlite` module can open/create SQLite databases
|
||||
|
||||
The `db.sqlite` module can open/create SQLite databases
|
||||
|
||||
- **type**: `db.sqlite`
|
||||
- **params**:
|
||||
- **dsn**: the data source name, this can be a file path or the special `:memory:` name for an in-memory DB
|
||||
- **dsn**: the data source name, this can be a file path or the special `:memory:` name for an in-memory DB
|
||||
|
||||
## Cap
|
||||
|
||||
### Example snippet
|
||||
|
||||
Opens an in-memory SQLite database
|
||||
|
||||
```yaml
|
||||
- id: db
|
||||
type: db.sqlite
|
||||
params:
|
||||
dsn: ":memory:"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
---
|
||||
title: HTTP Server
|
||||
sidebar:
|
||||
label: Server
|
||||
order: 2
|
||||
label: Server
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `http.server` module emits a message for every HTTP request that is made to the server.
|
||||
|
||||
- **type**: `http.server`
|
||||
- **params**:
|
||||
- **port**: TCP port to listen for HTTP requests on
|
||||
- **port**: TCP port to listen for HTTP requests on
|
||||
|
||||
### Example
|
||||
|
||||
Start an HTTP server listening on port 3000
|
||||
|
||||
```yaml
|
||||
- id: httpServer
|
||||
type: http.server
|
||||
params:
|
||||
port: 3000
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,27 +1,30 @@
|
||||
---
|
||||
title: MIDI Input
|
||||
sidebar:
|
||||
label: Input
|
||||
order: 1
|
||||
label: Input
|
||||
order: 1
|
||||
---
|
||||
|
||||
import { Aside } from '@astrojs/starlight/components';
|
||||
import { Aside } from "@astrojs/starlight/components";
|
||||
|
||||
<Aside type="caution">
|
||||
This module is not currently included in the docker builds of [showbridge](https://hub.docker.com/r/jwetzell/showbridge)
|
||||
This module is not currently included in the docker builds of
|
||||
[showbridge](https://hub.docker.com/r/jwetzell/showbridge)
|
||||
</Aside>
|
||||
|
||||
The `midi.input` module connects to a midi device (or virtual device) and emits MIDI messages that come in on that port. This module does not support output.
|
||||
|
||||
- **type**: `midi.input`
|
||||
- **params**:
|
||||
- **port**: name of the MIDI port to connect to
|
||||
- **port**: name of the MIDI port to connect to
|
||||
|
||||
### Example
|
||||
|
||||
Open a MIDI connection to `Logic Pro Virtual Out`.
|
||||
|
||||
```yaml
|
||||
- id: midiInput
|
||||
type: midi.input
|
||||
params:
|
||||
port: "Logic Pro Virtual Out"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
---
|
||||
title: MIDI Output
|
||||
sidebar:
|
||||
label: Output
|
||||
order: 2
|
||||
label: Output
|
||||
order: 2
|
||||
---
|
||||
import { Aside } from '@astrojs/starlight/components';
|
||||
|
||||
import { Aside } from "@astrojs/starlight/components";
|
||||
|
||||
<Aside type="caution">
|
||||
This module is not currently included in the docker builds of [showbridge](https://hub.docker.com/r/jwetzell/showbridge)
|
||||
This module is not currently included in the docker builds of
|
||||
[showbridge](https://hub.docker.com/r/jwetzell/showbridge)
|
||||
</Aside>
|
||||
|
||||
The `midi.output` module connects to a midi device (or virtual device) and allows sending MIDI messages out to that device. This module does not produce any messages and so using it as an `input` to a [route](/concepts/routes) would be pointless.
|
||||
|
||||
- **type**: `midi.output`
|
||||
- **params**:
|
||||
- **port**: name of the MIDI port to connect to
|
||||
- **port**: name of the MIDI port to connect to
|
||||
|
||||
### Example
|
||||
|
||||
Open a MIDI connection to `Logic Pro Virtual In`.
|
||||
|
||||
```yaml
|
||||
- id: midiOutput
|
||||
type: midi.output
|
||||
params:
|
||||
port: "Logic Pro Virtual In"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
---
|
||||
title: MQTT Client
|
||||
sidebar:
|
||||
label: Client
|
||||
order: 1
|
||||
label: Client
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `mqtt.client` module connects to a MQTT broker and emits a message messages based on the subscribed topic it receives from the port. This module is also capable of publishing MQTT messages to the connected broker.
|
||||
|
||||
- **type**: `mqtt.client`
|
||||
- **params**:
|
||||
- **broker**: connection string for the mqtt broker (`mqtt://test.mosquitto.org:1833`)
|
||||
- **topic** mqtt topic to subscribe to
|
||||
- **clientId** client ID for this connection to the broker
|
||||
- **broker**: connection string for the mqtt broker (`mqtt://test.mosquitto.org:1833`)
|
||||
- **topic** mqtt topic to subscribe to
|
||||
- **clientId** client ID for this connection to the broker
|
||||
|
||||
### Example
|
||||
|
||||
Open a mqtt connection to `test.mosquitto.org` subscribing to the `showbridge` topic.
|
||||
|
||||
```yaml
|
||||
- id: mqttClient
|
||||
type: mqtt.client
|
||||
@@ -22,4 +24,4 @@ Open a mqtt connection to `test.mosquitto.org` subscribing to the `showbridge` t
|
||||
broker: "mqtt://test.mosquitto.org:1833"
|
||||
topic: showbridge
|
||||
clientId: showbridge
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
---
|
||||
title: NATS Client
|
||||
sidebar:
|
||||
label: Client
|
||||
order: 1
|
||||
label: Client
|
||||
order: 1
|
||||
---
|
||||
|
||||
This module connects to a [NATS](https://nats.io/) server and subscribes to a subject.
|
||||
|
||||
- **type**: `nats.client`
|
||||
- **params**:
|
||||
- **url**: the URL of the NATS server to connect to (e.g. `nats://localhost:4222`)
|
||||
- **subject**: the subject to subscribe to
|
||||
- **url**: the URL of the NATS server to connect to (e.g. `nats://localhost:4222`)
|
||||
- **subject**: the subject to subscribe to
|
||||
|
||||
### Example
|
||||
Connect to a local NATS server and subscribe to the `events` subject
|
||||
|
||||
Connect to a local NATS server and subscribe to the `events` subject
|
||||
|
||||
```yaml
|
||||
- id: natsClient
|
||||
type: nats.client
|
||||
params:
|
||||
url: nats://localhost:4222
|
||||
subject: events
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,21 +1,25 @@
|
||||
---
|
||||
title: NATS Server
|
||||
sidebar:
|
||||
label: Server
|
||||
order: 2
|
||||
label: Server
|
||||
order: 2
|
||||
---
|
||||
|
||||
This module starts a NATS server that listens for incoming connections.
|
||||
|
||||
- **type**: `nats.server`
|
||||
- **params**:
|
||||
- **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0`
|
||||
- **port**: (optional) the port to listen on defaults to `4222`
|
||||
- **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0`
|
||||
- **port**: (optional) the port to listen on defaults to `4222`
|
||||
|
||||
### Example
|
||||
|
||||
Start a local NATS server listening on port 5555
|
||||
|
||||
```yaml
|
||||
- id: httpServer
|
||||
type: http.server
|
||||
params:
|
||||
ip: 127.0.0.1
|
||||
port: 5555
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
---
|
||||
title: TCP Client
|
||||
sidebar:
|
||||
label: Client
|
||||
order: 1
|
||||
label: Client
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `net.tcp.client` module connects to TCP server and emits messages based on the data it receives from the server that it connects to. Messages are determined by "framing" techniques as TCP is a stream based protocol. The module will attempt to reconnect anytime the connection is closed.
|
||||
|
||||
- **type**: `net.tcp.client`
|
||||
- **params**:
|
||||
- **host**: IP or FQDN to connect to
|
||||
- **port**: TCP port to connect to
|
||||
- **framing**: how to chunk the TCP stream into "messages"
|
||||
- LF `\n`
|
||||
- CR `\r`
|
||||
- CRLF `\r\n`
|
||||
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
|
||||
- RAW (no framing is done bytes are sent out as they are received)
|
||||
|
||||
- **host**: IP or FQDN to connect to
|
||||
- **port**: TCP port to connect to
|
||||
- **framing**: how to chunk the TCP stream into "messages"
|
||||
- LF `\n`
|
||||
- CR `\r`
|
||||
- CRLF `\r\n`
|
||||
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
|
||||
- RAW (no framing is done bytes are sent out as they are received)
|
||||
|
||||
### Example
|
||||
|
||||
Open a TCP connection to `127.0.0.1` port 8888, any incoming data will be split on line-feed (`\n`)
|
||||
|
||||
```yaml
|
||||
- id: tcpClient
|
||||
type: net.tcp.client
|
||||
@@ -27,4 +29,4 @@ Open a TCP connection to `127.0.0.1` port 8888, any incoming data will be split
|
||||
host: 127.0.0.1
|
||||
port: 8888
|
||||
framing: LF
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
---
|
||||
title: TCP Server
|
||||
sidebar:
|
||||
label: Server
|
||||
order: 2
|
||||
label: Server
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `net.tcp.server` module emits a message messages based on the data it receives from clients that connect to it. Messages are determined by "framing" techniques as TCP is a stream based protocol.
|
||||
|
||||
- **type**: `net.tcp.server`
|
||||
- **params**:
|
||||
- **ip**: (optional) IP address to bind the TCP server to, if left out it will listen on all interfaces
|
||||
- **port**: TCP port to listen on
|
||||
- **framing**: how to chunk of the incoming TCP stream into "messages"
|
||||
- LF `\n`
|
||||
- CR `\r`
|
||||
- CRLF `\r\n`
|
||||
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
|
||||
- RAW (no framing is done bytes are sent out as they are received)
|
||||
|
||||
- **ip**: (optional) IP address to bind the TCP server to, if left out it will listen on all interfaces
|
||||
- **port**: TCP port to listen on
|
||||
- **framing**: how to chunk of the incoming TCP stream into "messages"
|
||||
- LF `\n`
|
||||
- CR `\r`
|
||||
- CRLF `\r\n`
|
||||
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
|
||||
- RAW (no framing is done bytes are sent out as they are received)
|
||||
|
||||
### Example
|
||||
|
||||
Start a TCP server listening on port 8888, incoming data will be split on line-feed (`\n`)
|
||||
|
||||
```yaml
|
||||
- id: tcpServer
|
||||
type: net.tcp.server
|
||||
@@ -27,4 +29,4 @@ Start a TCP server listening on port 8888, incoming data will be split on line-f
|
||||
ip: 127.0.0.1
|
||||
port: 8888
|
||||
framing: LF
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
---
|
||||
title: UDP Client
|
||||
sidebar:
|
||||
label: Client
|
||||
order: 1
|
||||
label: Client
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `net.udp.client` module sends messages to a the configured `host` and `port`. This module does not produce any messages and so using it as an `input` to a [route](/concepts/routes) would be pointless.
|
||||
|
||||
- **type**: `net.udp.client`
|
||||
- **params**:
|
||||
- **host**: IP or FQDN to send message to
|
||||
- **port**: UDP port to send messages to
|
||||
- **host**: IP or FQDN to send message to
|
||||
- **port**: UDP port to send messages to
|
||||
|
||||
### Example
|
||||
|
||||
setup up a UDP client that will send UDP packets to `127.0.0.1` on port 8888
|
||||
|
||||
```yaml
|
||||
- id: udpClient
|
||||
type: net.udp.client
|
||||
params:
|
||||
host: 127.0.0.1
|
||||
port: 8888
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
---
|
||||
title: UDP Multicast
|
||||
sidebar:
|
||||
label: Multicast
|
||||
order: 3
|
||||
label: Multicast
|
||||
order: 3
|
||||
---
|
||||
|
||||
- **type**: `net.udp.multicast`
|
||||
- **params**:
|
||||
- **ip**: the multicast IP address to listen to
|
||||
- **port**: the port to listen on
|
||||
- **ip**: the multicast IP address to listen to
|
||||
- **port**: the port to listen on
|
||||
|
||||
### Example
|
||||
|
||||
Listen to the mDNS multicast address on port 5353
|
||||
|
||||
```yaml
|
||||
- id: mdnsListener
|
||||
type: net.udp.multicast
|
||||
params:
|
||||
ip: 224.0.0.251
|
||||
port: 5353
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
---
|
||||
title: UDP Server
|
||||
sidebar:
|
||||
label: Server
|
||||
order: 2
|
||||
label: Server
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `net.udp.server` module emits a message for every incoming UDP datagram.
|
||||
|
||||
- **type**: `net.udp.server`
|
||||
- **params**:
|
||||
- **ip**: (optional) IP address to bind the UDP server to, if left out it will listen on all interfaces
|
||||
- **port**: UDP port to listen on
|
||||
- **bufferSize**: (optional) Size of the read buffer for incoming UDP datagrams, defaults to `2048`
|
||||
- **ip**: (optional) IP address to bind the UDP server to, if left out it will listen on all interfaces
|
||||
- **port**: UDP port to listen on
|
||||
- **bufferSize**: (optional) Size of the read buffer for incoming UDP datagrams, defaults to `2048`
|
||||
|
||||
### Example
|
||||
|
||||
Start a UDP server listening on port 8888 and only on `127.0.0.1`
|
||||
|
||||
```yaml
|
||||
- id: udpServer
|
||||
type: net.udp.server
|
||||
params:
|
||||
ip: 127.0.0.1
|
||||
port: 8888
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: PSN Client
|
||||
sidebar:
|
||||
label: Client
|
||||
order: 1
|
||||
label: Client
|
||||
order: 1
|
||||
---
|
||||
|
||||
- **type**: `psn.client`
|
||||
@@ -10,7 +10,8 @@ sidebar:
|
||||
This module listens on the [PosiStageNet](http://posistage.net/) multicast address and emits tracker states anytime a new PSN message is received.
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- id: psnClient
|
||||
type: psn.client
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
---
|
||||
title: Redis Client
|
||||
sidebar:
|
||||
label: Client
|
||||
order: 1
|
||||
label: Client
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `redis.client` module connects to a Redis server. This module does not produce any messages and so using it as an `input` to a [route](/concepts/routes) would be pointless.
|
||||
|
||||
- **type**: `redis.client`
|
||||
- **params**:
|
||||
- **host**: the Redis server host
|
||||
- **port**: the Redis server port
|
||||
- **host**: the Redis server host
|
||||
- **port**: the Redis server port
|
||||
|
||||
### Example
|
||||
|
||||
Connect to a Redis server running on `localhost` at port `6379`.
|
||||
|
||||
```yaml
|
||||
- id: redisClient
|
||||
type: redis.client
|
||||
params:
|
||||
host: "localhost"
|
||||
port: 6379
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,31 +1,34 @@
|
||||
---
|
||||
title: Serial Client
|
||||
sidebar:
|
||||
label: Client
|
||||
order: 1
|
||||
label: Client
|
||||
order: 1
|
||||
---
|
||||
|
||||
import { Aside } from '@astrojs/starlight/components';
|
||||
import { Aside } from "@astrojs/starlight/components";
|
||||
|
||||
<Aside type="caution">
|
||||
This module is not currently included in the docker builds of [showbridge](https://hub.docker.com/r/jwetzell/showbridge)
|
||||
This module is not currently included in the docker builds of
|
||||
[showbridge](https://hub.docker.com/r/jwetzell/showbridge)
|
||||
</Aside>
|
||||
|
||||
The `serial.client` module connects to a serial device and emits a message messages based on the data it receives from the port. Messages are determined by "framing" techniques as serial is a stream based protocol.
|
||||
|
||||
- **type**: `serial.client`
|
||||
- **params**:
|
||||
- **port**: serial port to connect to i.e `/dev/ttyS0`
|
||||
- **baudRate** baud rate to use when connecting to serial port
|
||||
- **framing**: how to chunk the serial stream into "messages"
|
||||
- LF `\n`
|
||||
- CR `\r`
|
||||
- CRLF `\r\n`
|
||||
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
|
||||
- RAW (no framing is done bytes are sent out as they are received)
|
||||
- **port**: serial port to connect to i.e `/dev/ttyS0`
|
||||
- **baudRate** baud rate to use when connecting to serial port
|
||||
- **framing**: how to chunk the serial stream into "messages"
|
||||
- LF `\n`
|
||||
- CR `\r`
|
||||
- CRLF `\r\n`
|
||||
- [SLIP](https://en.wikipedia.org/wiki/Serial_Line_Internet_Protocol)
|
||||
- RAW (no framing is done bytes are sent out as they are received)
|
||||
|
||||
### Example
|
||||
|
||||
Open a serial connection to `/dev/ttyS0` with a buad rate of `115200`, any incoming data will be split on line-feed (`\n`)
|
||||
|
||||
```yaml
|
||||
- id: serialClient
|
||||
type: serial.client
|
||||
@@ -33,4 +36,4 @@ Open a serial connection to `/dev/ttyS0` with a buad rate of `115200`, any incom
|
||||
port: "/dev/ttyS0"
|
||||
baudRate: 115200
|
||||
framing: LF
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
---
|
||||
title: SIP Call Server
|
||||
sidebar:
|
||||
label: Server
|
||||
order: 1
|
||||
label: Server
|
||||
order: 1
|
||||
---
|
||||
This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections and emits call events when a new call is received. This can be used with cheap SIP gateway devices to connect an analog phone line and do interesting things like [firing QLab cues with phone calls](/examples/dial-a-cue).
|
||||
|
||||
This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections and emits call events when a new call is received. This can be used with cheap SIP gateway devices to connect an analog phone line and do interesting things like [firing QLab cues with phone calls](/examples/dial-a-cue).
|
||||
|
||||
- **type**: `sip.call.server`
|
||||
- **params**:
|
||||
- **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0`
|
||||
- **port**: (optional) the port to listen on defaults to `5060`
|
||||
- **transport**: (optional) the transport protocol to use (e.g. `udp`, `tcp`, `ws`) defaults to `udp`
|
||||
- **userAgent**: (optional) the User-Agent string to use in SIP responses defaults to `showbridge`
|
||||
- **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0`
|
||||
- **port**: (optional) the port to listen on defaults to `5060`
|
||||
- **transport**: (optional) the transport protocol to use (e.g. `udp`, `tcp`, `ws`) defaults to `udp`
|
||||
- **userAgent**: (optional) the User-Agent string to use in SIP responses defaults to `showbridge`
|
||||
|
||||
### Example
|
||||
|
||||
Start a UDP SIP server listening on port 5060
|
||||
|
||||
```yaml
|
||||
- id: sipCallServer
|
||||
type: sip.call.server
|
||||
@@ -21,4 +25,4 @@ Start a UDP SIP server listening on port 5060
|
||||
ip: 127.0.0.1
|
||||
port: 5060
|
||||
transport: udp
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
---
|
||||
title: SIP DTMF Server
|
||||
sidebar:
|
||||
label: Server
|
||||
order: 1
|
||||
label: Server
|
||||
order: 1
|
||||
---
|
||||
|
||||
This module starts a [SIP](https://en.wikipedia.org/wiki/Session_Initiation_Protocol) server that listens for incoming connections. When a call is received this module will emit events based on the touch tones (DTMF) received during the call. The event is sent out whenever the use presses the separator key defined in the params.
|
||||
|
||||
- **type**: `sip.dtmf.server`
|
||||
- **params**:
|
||||
- **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0`
|
||||
- **port**: (optional) the port to listen on defaults to `5060`
|
||||
- **transport**: (optional) the transport protocol to use (e.g. `udp`, `tcp`, `ws`) defaults to `udp`
|
||||
- **userAgent**: (optional) the User-Agent string to use in SIP responses defaults to `showbridge`
|
||||
- **separator**: the DTMF separator key to know when to emit events
|
||||
- **ip**: (optional) the IP address to bind the server to defaults to `0.0.0.0`
|
||||
- **port**: (optional) the port to listen on defaults to `5060`
|
||||
- **transport**: (optional) the transport protocol to use (e.g. `udp`, `tcp`, `ws`) defaults to `udp`
|
||||
- **userAgent**: (optional) the User-Agent string to use in SIP responses defaults to `showbridge`
|
||||
- **separator**: the DTMF separator key to know when to emit events
|
||||
|
||||
### Example
|
||||
|
||||
Start a UDP SIP server listening on port 5060 that will emit events whenever the user presses the `#` key on their phone during a call
|
||||
|
||||
```yaml
|
||||
- id: sipDTMFServer
|
||||
type: sip.dtmf.server
|
||||
@@ -23,5 +26,5 @@ Start a UDP SIP server listening on port 5060 that will emit events whenever the
|
||||
ip: 127.0.0.1
|
||||
port: 5060
|
||||
transport: udp
|
||||
separator: '#'
|
||||
```
|
||||
separator: "#"
|
||||
```
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
---
|
||||
title: Interval
|
||||
sidebar:
|
||||
order: 2
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `time.interval` module emits a message at a specified duration. Sending any message to this module will reset the interval timer.
|
||||
|
||||
- **type**: `time.interval`
|
||||
- **params**:
|
||||
- **duration**: time in milliseconds between messsages
|
||||
- **duration**: time in milliseconds between messsages
|
||||
|
||||
### Example snippet
|
||||
|
||||
Emits a message every 3 seconds
|
||||
|
||||
```yaml
|
||||
- id: every3Secs
|
||||
type: time.interval
|
||||
params:
|
||||
duration: 3000
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
---
|
||||
title: Timer
|
||||
sidebar:
|
||||
order: 1
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `time.timer` module emits only one message after a specified duration. Sending any message to this module will reset the timer.
|
||||
|
||||
- **type**: `time.timer`
|
||||
- **params**:
|
||||
- **duration**: time in milliseconds to wait before emitting message
|
||||
- **duration**: time in milliseconds to wait before emitting message
|
||||
|
||||
### Example snippet
|
||||
|
||||
Emits a message 5 seconds after the module is initialized
|
||||
|
||||
```yaml
|
||||
- id: 5secs
|
||||
type: time.timer
|
||||
params:
|
||||
duration: 5000
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
---
|
||||
title: WebSocket Client
|
||||
sidebar:
|
||||
label: Client
|
||||
order: 1
|
||||
label: Client
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `websocket.client` module opens a websocket connection to the specified URL. This module supports both text and binary websocket messages.
|
||||
|
||||
- **type**: `websocket.client`
|
||||
- **params**:
|
||||
- **url**: the full url to connect to (`wss://echo.websocket.org`)
|
||||
- **url**: the full url to connect to (`wss://echo.websocket.org`)
|
||||
|
||||
### Example
|
||||
|
||||
Connect to the example WS server at `echo.websocket.org`.
|
||||
|
||||
```yaml
|
||||
- id: websocket
|
||||
type: websocket.client
|
||||
params:
|
||||
url: "wss://echo.websocket.org"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: Decode ArtNet Packet
|
||||
sidebar:
|
||||
label: Decode
|
||||
order: 1
|
||||
label: Decode
|
||||
order: 1
|
||||
---
|
||||
|
||||
- **type**: `artnet.packet.decode`
|
||||
@@ -10,6 +10,7 @@ sidebar:
|
||||
This processor will decode incoming bytes into an ArtNet packet. This processor will return an error if the message being processed is not an array of bytes.
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: artnet.packet.decode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
---
|
||||
title: Encode ArtNet Packet
|
||||
sidebar:
|
||||
label: Encode
|
||||
order: 2
|
||||
label: Encode
|
||||
order: 2
|
||||
---
|
||||
|
||||
- **type**: `artnet.packet.encode`
|
||||
This processor will encode an ArtNet packet into an array of bytes. This processor will return an error if the message being processed is not an ArtNet packet.
|
||||
This processor will encode an ArtNet packet into an array of bytes. This processor will return an error if the message being processed is not an ArtNet packet.
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: artnet.packet.encode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
---
|
||||
title: Database Query
|
||||
sidebar:
|
||||
label: Query
|
||||
order: 1
|
||||
label: Query
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `db.query` processor will issue a query to the specified module and return the result to the next processor in line.
|
||||
|
||||
- **type**: `db.query`
|
||||
- **params**:
|
||||
- **module**: the id of the [module](/concepts/modules) to issue query to.
|
||||
- **query**: the query to execute.
|
||||
- **module**: the id of the [module](/concepts/modules) to issue query to.
|
||||
- **query**: the query to execute.
|
||||
|
||||
### Example
|
||||
|
||||
Issue a `SELECT` statement to a module with id `sqlite`.
|
||||
|
||||
```yaml
|
||||
- type: db.query
|
||||
params:
|
||||
module: sqlite
|
||||
query: "SELECT * from users;"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
---
|
||||
title: Debug Log
|
||||
sidebar:
|
||||
label: Log
|
||||
order: 1
|
||||
label: Log
|
||||
order: 1
|
||||
---
|
||||
|
||||
- **type**: `debug.log`
|
||||
This processor will log information about the message being processed to the console. This processor does not modify the message in any way and will pass the message through to the next processor in the chain.
|
||||
This processor will log information about the message being processed to the console. This processor does not modify the message in any way and will pass the message through to the next processor in the chain.
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: debug.log
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
---
|
||||
title: Filter On Change
|
||||
sidebar:
|
||||
label: On Change
|
||||
order: 3
|
||||
label: On Change
|
||||
order: 3
|
||||
---
|
||||
|
||||
This processor will only pass messages through if the value of the message has changed since the last time a message was processed. This processor is useful for filtering out duplicate messages that may be emitted by a module or processor.
|
||||
|
||||
- **type**: `filter.change`
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: filter.change
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
---
|
||||
title: Expr Filter
|
||||
sidebar:
|
||||
label: Expr
|
||||
order: 2
|
||||
label: Expr
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `filter.expr` processor evaluates an [Expr expression](https://expr-lang.org/playground). If the expression evaluates to true then the payload is sent through. This processor will return an error if the expression fails to evaluate.
|
||||
|
||||
- **type**: `filter.expr`
|
||||
- **params**:
|
||||
- **expression**: [Expr expression](https://expr-lang.org/playground) to evaluate. The expression has access to the [wrapped payload](/concepts/payload).
|
||||
- **expression**: [Expr expression](https://expr-lang.org/playground) to evaluate. The expression has access to the [wrapped payload](/concepts/payload).
|
||||
|
||||
### Example
|
||||
|
||||
Match a payload great than or equal to 0
|
||||
|
||||
```yaml
|
||||
- type: filter.expr
|
||||
params:
|
||||
pattern: "Payload >= 0"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
---
|
||||
title: Regex Filter
|
||||
sidebar:
|
||||
label: Regex
|
||||
order: 1
|
||||
label: Regex
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `filter.regex` processor matches incoming string payload against a regular expression. If there is a match then the payload is sent through. This processor will return an error if the message being processed is not a string.
|
||||
|
||||
- **type**: `filter.regex`
|
||||
- **params**:
|
||||
- **pattern**: regex pattern to match against the incoming string
|
||||
- **pattern**: regex pattern to match against the incoming string
|
||||
|
||||
### Example
|
||||
|
||||
Match strings starting with `hello`
|
||||
|
||||
```yaml
|
||||
- type: filter.regex
|
||||
params:
|
||||
pattern: "^hello.*"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
---
|
||||
title: Parse Float
|
||||
sidebar:
|
||||
label: Parse
|
||||
order: 1
|
||||
label: Parse
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `float.parse` processor takes a string and parses it as a float with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into a float.
|
||||
|
||||
- **type**: `float.parse`
|
||||
- **params**:
|
||||
- **bitSize**: (optional) the bit size of the float to parse, defaults to 64
|
||||
- **bitSize**: (optional) the bit size of the float to parse, defaults to 64
|
||||
|
||||
### Example
|
||||
|
||||
This would parse the string payload as a 32 bit float and set the payload to that value.
|
||||
|
||||
```yaml
|
||||
- type: float.parse
|
||||
params:
|
||||
bitSize: 32
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
---
|
||||
title: Create Random Float
|
||||
sidebar:
|
||||
label: Random
|
||||
order: 2
|
||||
label: Random
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `float.random` processor will set the payload to a random float between the specified `min` and `max` value.
|
||||
|
||||
- **type**: `float.random`
|
||||
- **params**:
|
||||
- **bitSize**: (optional) the bit size of the float to generate, defaults to 32
|
||||
- **min**: the minimum value for the random float (inclusive).
|
||||
- **max**: the maximum value for the random float (exclusive).
|
||||
- **bitSize**: (optional) the bit size of the float to generate, defaults to 32
|
||||
- **min**: the minimum value for the random float (inclusive).
|
||||
- **max**: the maximum value for the random float (exclusive).
|
||||
|
||||
### Example
|
||||
|
||||
This would generate a random 64-bit float between 1.1 and 1.5 and set the payload to that value.
|
||||
|
||||
```yaml
|
||||
- type: float.random
|
||||
params:
|
||||
bitSize: 64
|
||||
min: 1.0
|
||||
max: 1.5
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,26 +1,26 @@
|
||||
---
|
||||
title: Create FreeD
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a new FreeD message with the specified parameters.
|
||||
|
||||
- **type**: `free.d.create`
|
||||
- **params**:
|
||||
- **id**: the ID to set for the FreeD message
|
||||
- **pan**: the pan value to set for the FreeD message
|
||||
- **tilt**: the tilt value to set for the FreeD message
|
||||
- **roll**: the roll value to set for the FreeD message
|
||||
- **posX**: the X position value to set for the FreeD message
|
||||
- **posY**: the Y position value to set for the FreeD message
|
||||
- **posZ**: the Z position value to set for the FreeD message
|
||||
- **zoom**: the zoom value to set for the FreeD message
|
||||
- **focus**: the focus value to set for the FreeD message
|
||||
|
||||
- **id**: the ID to set for the FreeD message
|
||||
- **pan**: the pan value to set for the FreeD message
|
||||
- **tilt**: the tilt value to set for the FreeD message
|
||||
- **roll**: the roll value to set for the FreeD message
|
||||
- **posX**: the X position value to set for the FreeD message
|
||||
- **posY**: the Y position value to set for the FreeD message
|
||||
- **posZ**: the Z position value to set for the FreeD message
|
||||
- **zoom**: the zoom value to set for the FreeD message
|
||||
- **focus**: the focus value to set for the FreeD message
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: free.d.create
|
||||
params:
|
||||
@@ -33,4 +33,4 @@ This processor will create a new FreeD message with the specified parameters.
|
||||
posZ: "15"
|
||||
zoom: "2"
|
||||
focus: "1"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: Decode FreeD
|
||||
sidebar:
|
||||
label: Decode
|
||||
order: 3
|
||||
label: Decode
|
||||
order: 3
|
||||
---
|
||||
|
||||
This processor will decode incoming bytes into a FreeD message. This processor will return an error if the message being processed is not an array of bytes.
|
||||
@@ -10,6 +10,7 @@ This processor will decode incoming bytes into a FreeD message. This processor w
|
||||
- **type**: `free.d.decode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: free.d.decode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: Encode FreeD
|
||||
sidebar:
|
||||
label: Encode
|
||||
order: 2
|
||||
label: Encode
|
||||
order: 2
|
||||
---
|
||||
|
||||
This processor will encode a FreeD message into an array of bytes. This processor will return an error if the message being processed is not a FreeD message.
|
||||
@@ -10,6 +10,7 @@ This processor will encode a FreeD message into an array of bytes. This processo
|
||||
- **type**: `free.d.encode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: free.d.encode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
---
|
||||
title: Make HTTP Request
|
||||
sidebar:
|
||||
label: Make Request
|
||||
order: 1
|
||||
label: Make Request
|
||||
order: 1
|
||||
---
|
||||
|
||||
This process will make an HTTP request to the specified URL using the specified method. The response will be passed through to the next processor in the chain. This processor will return an error if the request fails for any reason (e.g. network error, invalid URL, etc.).
|
||||
|
||||
- **type**: `http.request.do`
|
||||
- **params**:
|
||||
- **method**: the HTTP method to use for the request (e.g. `GET`, `POST`, `PUT`, etc.)
|
||||
- **url**: the URL to send the request to
|
||||
|
||||
- **method**: the HTTP method to use for the request (e.g. `GET`, `POST`, `PUT`, etc.)
|
||||
- **url**: the URL to send the request to
|
||||
|
||||
### Example
|
||||
|
||||
Make a GET request to `https://example.com`
|
||||
|
||||
```yaml
|
||||
- type: http.request.do
|
||||
params:
|
||||
method: GET
|
||||
url: https://example.com
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
---
|
||||
title: Create HTTP Response
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 2
|
||||
label: Create
|
||||
order: 2
|
||||
---
|
||||
|
||||
This processor will create a new HTTP response with the specified status code and body template. The created response will be passed through to the next processor in the chain. If the response is subsequently sent to an HTTP server module using the [router.output](../router/output.md) processor, the status code and body template set by this processor will be used for the response sent to the client. This processor will return an error if there is an issue executing the body template.
|
||||
|
||||
- **type**: `http.response.create`
|
||||
- **params**:
|
||||
- **status**: the HTTP status code to set for the response (e.g. `200`, `404`, etc.)
|
||||
- **body**: the body template to set for the response
|
||||
- **status**: the HTTP status code to set for the response (e.g. `200`, `404`, etc.)
|
||||
- **body**: the body template to set for the response
|
||||
|
||||
### Example
|
||||
|
||||
This would create an HTTP response with a status code of `200` and a body of `OK`
|
||||
|
||||
```yaml
|
||||
- type: http.response.create
|
||||
params:
|
||||
status: 200
|
||||
body: "OK"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
---
|
||||
title: Parse Int
|
||||
sidebar:
|
||||
label: Parse
|
||||
order: 1
|
||||
label: Parse
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `int.parse` processor takes a string and parses it as an integer with the specified `base` and `bitSize`. This processor will return an error if the message being processed is not a string or if the string cannot be parsed into an integer.
|
||||
|
||||
- **type**: `int.parse`
|
||||
- **params**:
|
||||
- **base**: (optional) the base to use for parsing the integer, defaults to 10
|
||||
- **bitSize**: (optional) the bit size of the integer to parse, defaults to 64
|
||||
- **base**: (optional) the base to use for parsing the integer, defaults to 10
|
||||
- **bitSize**: (optional) the bit size of the integer to parse, defaults to 64
|
||||
|
||||
### Example
|
||||
|
||||
This would parse the string payload as a 32 bit, base 10 integer and set the payload to that value.
|
||||
|
||||
```yaml
|
||||
- type: int.parse
|
||||
params:
|
||||
bitSize: 32
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,20 +1,23 @@
|
||||
---
|
||||
title: Create Random Int
|
||||
sidebar:
|
||||
order: 2
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `int.random` processor will set the payload to a random integer between the specified `min` and `max` value.
|
||||
|
||||
- **type**: `int.random`
|
||||
- **params**:
|
||||
- **min**: the minimum value for the random integer (inclusive).
|
||||
- **max**: the maximum value for the random integer (inclusive).
|
||||
- **min**: the minimum value for the random integer (inclusive).
|
||||
- **max**: the maximum value for the random integer (inclusive).
|
||||
|
||||
### Example
|
||||
|
||||
This would generate a random integer between -127 and 127 and set the payload to that value.
|
||||
|
||||
```yaml
|
||||
- type: int.random
|
||||
params:
|
||||
min: -127
|
||||
max: 127
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,21 +1,23 @@
|
||||
---
|
||||
title: Scale Int
|
||||
sidebar:
|
||||
label: Scale
|
||||
order: 3
|
||||
label: Scale
|
||||
order: 3
|
||||
---
|
||||
|
||||
This processor will scale an integer value from one range to another. This processor will return an error if the message being processed is not an integer or if the parameters are not valid (e.g. if `inMin` is greater than or equal to `inMax`, etc.).
|
||||
|
||||
- **type**: `int.scale`
|
||||
- **params**:
|
||||
- **inMin**: the minimum value of the input range
|
||||
- **inMax**: the maximum value of the input range
|
||||
- **outMin**: the minimum value of the output range
|
||||
- **outMax**: the maximum value of the output range
|
||||
- **inMin**: the minimum value of the input range
|
||||
- **inMax**: the maximum value of the input range
|
||||
- **outMin**: the minimum value of the output range
|
||||
- **outMax**: the maximum value of the output range
|
||||
|
||||
### Example
|
||||
|
||||
Scale an integer value from the range 0-255 to the range 0-100
|
||||
|
||||
```yaml
|
||||
- type: int.scale
|
||||
params:
|
||||
@@ -23,4 +25,4 @@ Scale an integer value from the range 0-255 to the range 0-100
|
||||
inMax: 255
|
||||
outMin: 0
|
||||
outMax: 100
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
---
|
||||
title: Decode JSON
|
||||
sidebar:
|
||||
label: Decode
|
||||
order: 2
|
||||
label: Decode
|
||||
order: 2
|
||||
---
|
||||
|
||||
Convert an incoming byte array or raw string into a JSON object. This processor will return an error if the message being processed is not an array of bytes or a raw string, or if the bytes/string cannot be parsed as JSON.
|
||||
|
||||
- **type**: `json.decode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: json.decode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
---
|
||||
title: Encode JSON
|
||||
sidebar:
|
||||
label: Encode
|
||||
order: 1
|
||||
label: Encode
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will encode an incoming object into a JSON byte array. This processor will return an error if the message being processed is not able to be serialized as JSON.
|
||||
|
||||
- **type**: `json.encode`
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: json.encode
|
||||
```
|
||||
|
||||
@@ -1,21 +1,24 @@
|
||||
---
|
||||
title: Get Key/Value
|
||||
sidebar:
|
||||
label: Get
|
||||
order: 1
|
||||
label: Get
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `kv.get` processor gets the value associated with a key from a compatible module. The output payload is the value if the key is found.
|
||||
|
||||
- **type**: `kv.get`
|
||||
- **params**:
|
||||
- **module**: id of the module
|
||||
- **key**: the key to look up
|
||||
- **module**: id of the module
|
||||
- **key**: the key to look up
|
||||
|
||||
### Example
|
||||
|
||||
This will attempt to get the value for the `counter` key from the module with an id of `redis`
|
||||
|
||||
```yaml
|
||||
- type: kv.get
|
||||
params:
|
||||
module: redis
|
||||
key: counter
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
---
|
||||
title: Set Key/Value
|
||||
sidebar:
|
||||
label: Set
|
||||
order: 2
|
||||
label: Set
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `kv.set` processor sets the value associated with a key from a compatible module. The payload is unchanged so whatever is received by this payload is output unless any errors are encountered.
|
||||
|
||||
- **type**: `kv.set`
|
||||
- **params**:
|
||||
- **module**: id of the module
|
||||
- **key**: the key to look up
|
||||
- **value**: the value to set
|
||||
- **module**: id of the module
|
||||
- **key**: the key to look up
|
||||
- **value**: the value to set
|
||||
|
||||
### Example
|
||||
|
||||
This will attempt to set the key `hello` to `world` using the module with an id of `redis`
|
||||
|
||||
```yaml
|
||||
- type: kv.set
|
||||
params:
|
||||
module: redis
|
||||
key: hello
|
||||
value: world
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
---
|
||||
title: Create MIDI Control Change
|
||||
title: Create MIDI Control Change
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a MIDI Control Change message with the specified channel, control number, and control value.
|
||||
|
||||
- **type**: `midi.control_change.create`
|
||||
- **params**:
|
||||
- **channel**: the MIDI channel
|
||||
- **control**: the control number
|
||||
- **value**: the control value
|
||||
- **channel**: the MIDI channel
|
||||
- **control**: the control number
|
||||
- **value**: the control value
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: midi.control_change.create
|
||||
params:
|
||||
channel: "1"
|
||||
control: "64"
|
||||
value: "127"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
title: Decode MIDI Message
|
||||
sidebar:
|
||||
label: Decode
|
||||
order: 3
|
||||
label: Decode
|
||||
order: 3
|
||||
---
|
||||
|
||||
This processor will decode incoming bytes into a MIDI message. This processor will return an error if the message being processed is not an array of bytes.
|
||||
|
||||
- **type**: `midi.message.decode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: midi.message.decode
|
||||
```
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
title: Encode MIDI Message
|
||||
sidebar:
|
||||
label: Encode
|
||||
order: 2
|
||||
label: Encode
|
||||
order: 2
|
||||
---
|
||||
|
||||
This processor will encode a MIDI message into an array of bytes. This processor will return an error if the message being processed is not a MIDI message.
|
||||
|
||||
- **type**: `midi.message.encode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: midi.message.encode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
title: Unpack MIDI Message
|
||||
sidebar:
|
||||
label: Unpack
|
||||
order: 4
|
||||
label: Unpack
|
||||
order: 4
|
||||
---
|
||||
|
||||
This processor will unpack a MIDI message into its individual components. This processor will return an error if the message being processed is not a MIDI message.
|
||||
|
||||
- **type**: `midi.message.unpack`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: midi.message.unpack
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
---
|
||||
title: Create MIDI Note On
|
||||
title: Create MIDI Note On
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a MIDI Note On message with the specified channel, note, and velocity.
|
||||
|
||||
- **type**: `midi.note_on.create`
|
||||
- **params**:
|
||||
- **channel**: the MIDI channel
|
||||
- **note**: the note number
|
||||
- **velocity**: the velocity
|
||||
- **channel**: the MIDI channel
|
||||
- **note**: the note number
|
||||
- **velocity**: the velocity
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: midi.note_on.create
|
||||
params:
|
||||
channel: "1"
|
||||
note: "60"
|
||||
velocity: "127"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,22 +1,24 @@
|
||||
---
|
||||
title: Create MIDI Note Off
|
||||
title: Create MIDI Note Off
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a MIDI Note Off message with the specified channel, note, and velocity.
|
||||
|
||||
- **type**: `midi.note_off.create`
|
||||
- **params**:
|
||||
- **channel**: the MIDI channel
|
||||
- **note**: the note number
|
||||
- **velocity**: the velocity
|
||||
- **channel**: the MIDI channel
|
||||
- **note**: the note number
|
||||
- **velocity**: the velocity
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: midi.note_off.create
|
||||
params:
|
||||
channel: "1"
|
||||
note: "60"
|
||||
velocity: "127"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
---
|
||||
title: Create MIDI Prgoram Change
|
||||
title: Create MIDI Prgoram Change
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a MIDI Program Change message with the specified channel and program number.
|
||||
|
||||
- **type**: `midi.program_change.create`
|
||||
- **params**:
|
||||
- **channel**: the MIDI channel
|
||||
- **program**: the program number
|
||||
- **channel**: the MIDI channel
|
||||
- **program**: the program number
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: midi.program_change.create
|
||||
params:
|
||||
channel: "1"
|
||||
program: "10"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
---
|
||||
title: Create MQTT Message
|
||||
sidebar:
|
||||
order: 1
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create an MQTT message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type.
|
||||
|
||||
- **type**: `mqtt.message.create`
|
||||
- **params**:
|
||||
- **topic**: the topic to publish the message to.
|
||||
- **qos**: the QoS level of the message.
|
||||
- **retained**: whether the message should be retained by the broker.
|
||||
- **payload**: the payload of the message. This can be a string or a byte array.
|
||||
- **topic**: the topic to publish the message to.
|
||||
- **qos**: the QoS level of the message.
|
||||
- **retained**: whether the message should be retained by the broker.
|
||||
- **payload**: the payload of the message. This can be a string or a byte array.
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: mqtt.message.create
|
||||
params:
|
||||
@@ -20,4 +22,4 @@ This processor will create an MQTT message from the provided parameters. This pr
|
||||
qos: 1
|
||||
retained: false
|
||||
payload: "Hello, World!"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
---
|
||||
title: Create NATS Message
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a NATS message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type.
|
||||
|
||||
- **type**: `nats.message.create`
|
||||
- **params**:
|
||||
- **subject**: the subject to publish the message to.
|
||||
- **payload**: the payload of the message.
|
||||
- **subject**: the subject to publish the message to.
|
||||
- **payload**: the payload of the message.
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: nats.message.create
|
||||
params:
|
||||
subject: "events"
|
||||
payload: "Hello, World!"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
---
|
||||
title: Create OSC Message
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create an OSC message from the provided parameters. This processor will return an error if any of the required parameters are missing or if the parameters are of the wrong type. The address parameter is required, while the args and types parameters are optional. However, if args are provided, then types must also be provided and must match the amount of args provided.
|
||||
|
||||
- **type**: `osc.message.create`
|
||||
- **params**:
|
||||
- **address**: the address of the OSC message.
|
||||
- **args**: (optional) array of string templates for each argument.
|
||||
- **types**: (optional) a single string with the of each arg in order. This is required if args are provided.
|
||||
- **address**: the address of the OSC message.
|
||||
- **args**: (optional) array of string templates for each argument.
|
||||
- **types**: (optional) a single string with the of each arg in order. This is required if args are provided.
|
||||
|
||||
### Example
|
||||
|
||||
Create an OSC message with the address `/test/message` and two integer arguments from the payload of the message being processed.
|
||||
|
||||
```yaml
|
||||
@@ -21,4 +23,4 @@ Create an OSC message with the address `/test/message` and two integer arguments
|
||||
address: "/test/message"
|
||||
args: ["{{.Payload[0]}}", "{{.Payload[1]}}"]
|
||||
types: "ii"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
title: Decode OSC Message
|
||||
sidebar:
|
||||
label: Decode
|
||||
order: 3
|
||||
label: Decode
|
||||
order: 3
|
||||
---
|
||||
|
||||
The `osc.message.decode` processor takes a array of bytes and turn it into OSC message if it can be. This processor will return an error if the bytes cannot be parsed as an OSC message
|
||||
|
||||
- **type**: `osc.message.decode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: osc.message.encode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
title: Encode OSC Message
|
||||
sidebar:
|
||||
label: Encode
|
||||
order: 2
|
||||
label: Encode
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `osc.message.encode` processor takes an OSC message and turns it into an array of bytes. This processor will return an error if the OSC message cannot be turned into bytes.
|
||||
|
||||
- **type**: `osc.message.encode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: osc.message.encode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,21 +1,22 @@
|
||||
---
|
||||
title: Output from Router
|
||||
sidebar:
|
||||
label: Output
|
||||
order: 1
|
||||
label: Output
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `router.output` processor takes any payload and outputs to the specified module.
|
||||
|
||||
- **type**: `router.output`
|
||||
- **params**:
|
||||
- **module**: the id of the [module](/concepts/modules) to output to.
|
||||
|
||||
- **module**: the id of the [module](/concepts/modules) to output to.
|
||||
|
||||
### Example
|
||||
|
||||
Output to the `osc-out` module.
|
||||
|
||||
```yaml
|
||||
- type: router.output
|
||||
params:
|
||||
module: osc-out
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
---
|
||||
title: Execute Expr Expression
|
||||
sidebar:
|
||||
label: Expr
|
||||
order: 2
|
||||
label: Expr
|
||||
order: 2
|
||||
---
|
||||
|
||||
The processor will execute the provided Expr expression and return the result as the new payload. This processor will return an error if the expression cannot be executed or if there is an error during execution. The expression will have access to the [wrapped payload](/concepts/payloads).
|
||||
|
||||
- **type**: `script.expr`
|
||||
- **params**:
|
||||
- **expression**: the Expr expressiont to execute.
|
||||
- **expression**: the Expr expressiont to execute.
|
||||
|
||||
### Example
|
||||
|
||||
This example will add 1 to the wrapped payload.
|
||||
|
||||
```yaml
|
||||
- type: script.expr
|
||||
params:
|
||||
expression: "Payload + 1"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: Execute JavaScript
|
||||
sidebar:
|
||||
label: JavaScript
|
||||
order: 1
|
||||
label: JavaScript
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `script.js` processor takes in any payload type and executes a JavaScript function that is able to process the payload. The end value of `payload` will be returned as the output of the processor.
|
||||
@@ -13,13 +13,15 @@ This run your JavaScript program in a [sandboxed environment](https://gitlab.com
|
||||
|
||||
- **type**: `script.js`
|
||||
- **params**:
|
||||
- **program**: The JavaScript program to run. The payload is available as a global variable called `payload`.
|
||||
- **program**: The JavaScript program to run. The payload is available as a global variable called `payload`.
|
||||
|
||||
### Example
|
||||
|
||||
Replace all occurrences of `|` with `,` in the payload
|
||||
|
||||
```yaml
|
||||
- type: script.js
|
||||
params:
|
||||
program: |
|
||||
payload = payload.replaceAll('|',',');
|
||||
```
|
||||
payload = payload.replaceAll('|',',');
|
||||
```
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
---
|
||||
title: Run WASM (Extism) Plugin
|
||||
sidebar:
|
||||
label: WASM
|
||||
order: 3
|
||||
label: WASM
|
||||
order: 3
|
||||
---
|
||||
|
||||
This processor will load and execute a WASM plugin using the [Extism](https://extism.org/) runtime. The processor will execute the specified function in the WASM plugin and return the result as the new payload. This processor will return an error if the plugin cannot be loaded, if the function cannot be executed, or if there is an error during execution. The incoming payload will be passed as the argument to the WASM function. If the plugin is successfully executed, the result of the function will be returned as the new payload.
|
||||
|
||||
- **type**: `script.wasm`
|
||||
- **params**:
|
||||
- **path**: the path to the WASM plugin to load.
|
||||
- **function**: (optional) the function to execute in the WASM plugin defaults to `process`
|
||||
- **enableWasi**: (optional) whether to enable WASI for the plugin defaults to `false`
|
||||
- **path**: the path to the WASM plugin to load.
|
||||
- **function**: (optional) the function to execute in the WASM plugin defaults to `process`
|
||||
- **enableWasi**: (optional) whether to enable WASI for the plugin defaults to `false`
|
||||
|
||||
### Example
|
||||
|
||||
This example will load the plugin at `./test.wasm` and execute the `test` function
|
||||
|
||||
```yaml
|
||||
- type: script.wasm
|
||||
params:
|
||||
path: "./test.wasm"
|
||||
function: "test"
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
---
|
||||
title: Create SIP Audio Response
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a SIP response message with an audio file as the payload. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the audio file included in the response.
|
||||
|
||||
- **type**: `sip.response.audio.create`
|
||||
- **params**:
|
||||
- **preWait**: the amount of time in milliseconds to wait before sending the response
|
||||
- **audioFile**: the path to the audio file to include in the response
|
||||
- **postWait**: the amount of time in milliseconds to wait after sending the response
|
||||
- **preWait**: the amount of time in milliseconds to wait before sending the response
|
||||
- **audioFile**: the path to the audio file to include in the response
|
||||
- **postWait**: the amount of time in milliseconds to wait after sending the response
|
||||
|
||||
### Example
|
||||
|
||||
This example will create a SIP response that will wait 1 second then play `response.wav` then wait another second before completing the response.
|
||||
|
||||
```yaml
|
||||
- type: sip.response.audio.create
|
||||
params:
|
||||
preWait: 1000
|
||||
audioFile: "response.wav"
|
||||
postWait: 1000
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,23 +1,26 @@
|
||||
---
|
||||
title: Create SIP DTMF Response
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 1
|
||||
label: Create
|
||||
order: 1
|
||||
---
|
||||
|
||||
This processor will create a SIP DTMF response from the provided parameters. If this message is output to a SIP module using the [router.output](/processors/router/output) processor, then the SIP module will send the response to the caller and play the DTMF tones specified.
|
||||
|
||||
- **type**: `sip.response.dtmf.create`
|
||||
- **params**:
|
||||
- **preWait**: the amount of time in milliseconds to wait before sending the response
|
||||
- **digits**: the DTMF digits to include in the response
|
||||
- **postWait**: the amount of time in milliseconds to wait after sending the response
|
||||
- **preWait**: the amount of time in milliseconds to wait before sending the response
|
||||
- **digits**: the DTMF digits to include in the response
|
||||
- **postWait**: the amount of time in milliseconds to wait after sending the response
|
||||
|
||||
### Example
|
||||
|
||||
This example will create a SIP response that will wait 1 second then play the DTMF digits "1234" then wait another second before completing the response.
|
||||
|
||||
```yaml
|
||||
- type: sip.response.dtmf.create
|
||||
params:
|
||||
preWait: 1000
|
||||
digits: "1234"
|
||||
postWait: 1000
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
---
|
||||
title: Create String
|
||||
sidebar:
|
||||
label: Create
|
||||
order: 3
|
||||
label: Create
|
||||
order: 3
|
||||
---
|
||||
|
||||
The `string.create` processor creates a string based on the provided template. This processor will return an error if there is an issue executing the template. The template property is just a [Go template](https://pkg.go.dev/text/template) that will be evaluated with the incoming message provided as an environment.
|
||||
|
||||
- **type**: `string.create`
|
||||
- **params**:
|
||||
- **template**: string template that will have the incoming message as the context
|
||||
- **template**: string template that will have the incoming message as the context
|
||||
|
||||
### Example
|
||||
|
||||
This would create a string using the `Address` property of the incoming message like and OSC message
|
||||
|
||||
```yaml
|
||||
- type: string.create
|
||||
params:
|
||||
params:
|
||||
template: "{{.Address}}
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
title: Decode String
|
||||
sidebar:
|
||||
label: Decode
|
||||
order: 1
|
||||
label: Decode
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `string.decode` processor takes a array of bytes and turn it into string. This processor will return an error if the message being processed is not an array of bytes.
|
||||
|
||||
- **type**: `string.decode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: string.decode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
---
|
||||
title: Encode String
|
||||
sidebar:
|
||||
label: Encode
|
||||
order: 2
|
||||
label: Encode
|
||||
order: 2
|
||||
---
|
||||
|
||||
The `string.encode` processor takes a string and turns it into an array of bytes. This processor will return an error if the message being processed is not a string.
|
||||
|
||||
- **type**: `string.encode`
|
||||
|
||||
### Example
|
||||
|
||||
```yaml
|
||||
- type: string.encode
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
---
|
||||
title: Split String
|
||||
sidebar:
|
||||
label: Split
|
||||
order: 5
|
||||
label: Split
|
||||
order: 5
|
||||
---
|
||||
|
||||
The `string.split` processor takes a string and turns it into an array of strings by splitting on `params.separator`. This processor will return an error if the message being processed is not a string.
|
||||
|
||||
- **type**: `string.split`
|
||||
- **params**:
|
||||
- **pattern**: string to split incoming string on
|
||||
- **pattern**: string to split incoming string on
|
||||
|
||||
### Example
|
||||
|
||||
Split incoming string on `,` i.e `"one,two,three"` -> `["one","two","three"]`
|
||||
|
||||
```yaml
|
||||
- type: string.split
|
||||
params:
|
||||
separator: ","
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,19 +1,22 @@
|
||||
---
|
||||
title: Sleep
|
||||
sidebar:
|
||||
label: Sleep
|
||||
order: 1
|
||||
label: Sleep
|
||||
order: 1
|
||||
---
|
||||
|
||||
The `time.sleep` processor will sleep for the specified `duration` in milliseconds before passing the message to the next processor.
|
||||
|
||||
- **type**: `time.sleep`
|
||||
- **params**:
|
||||
- **duration**: the duration to sleep in milliseconds
|
||||
- **duration**: the duration to sleep in milliseconds
|
||||
|
||||
### Example
|
||||
|
||||
This would sleep for 5 seconds before passing the message to the next processor.
|
||||
|
||||
```yaml
|
||||
- type: time.sleep
|
||||
params:
|
||||
duration: 5000
|
||||
```
|
||||
```
|
||||
|
||||
@@ -4,26 +4,28 @@ sidebar:
|
||||
order: 1
|
||||
---
|
||||
|
||||
import { Steps } from '@astrojs/starlight/components';
|
||||
import { Steps } from "@astrojs/starlight/components";
|
||||
|
||||
<Steps>
|
||||
|
||||
1. install
|
||||
- via go: `go install github.com/jwetzell/showbridge-go/cmd/showbridge@latest`
|
||||
|
||||
- via go: `go install github.com/jwetzell/showbridge-go/cmd/showbridge@latest`
|
||||
|
||||
- [binaries](https://github.com/jwetzell/showbridge-go/releases/latest)
|
||||
- <a
|
||||
href="https://github.com/jwetzell/showbridge-go/releases/latest"
|
||||
target="_blank"
|
||||
>
|
||||
binaries
|
||||
</a>
|
||||
|
||||
2. create a config file (see [config](/concepts/config/))
|
||||
|
||||
|
||||
3. run
|
||||
- `showbridge --config config.yaml`
|
||||
|
||||
- `showbridge --config config.yaml`
|
||||
- see below for all flags
|
||||
|
||||
- see below for all flags
|
||||
|
||||
- use the `-h` flag to see other available flags
|
||||
- use the `-h` flag to see other available flags
|
||||
|
||||
</Steps>
|
||||
|
||||
@@ -41,4 +43,4 @@ GLOBAL OPTIONS:
|
||||
--trace enable OpenTelemetry tracing [$SHOWBRIDGE_TRACE]
|
||||
--help, -h show help
|
||||
--version, -v print the version
|
||||
```
|
||||
```
|
||||
|
||||
@@ -4,19 +4,16 @@ sidebar:
|
||||
order: 2
|
||||
---
|
||||
|
||||
import { Steps, Code } from '@astrojs/starlight/components';
|
||||
import { Steps, Code } from "@astrojs/starlight/components";
|
||||
|
||||
<Steps>
|
||||
|
||||
1. create a config file (see [config](/concepts/config/))
|
||||
|
||||
2. run
|
||||
- <Code code="docker run -it -v/path/to/config.yaml:/app/config.yaml jwetzell/showbridge:latest --debug" />
|
||||
|
||||
3. run
|
||||
- see [CLI Usage](/guides/cli-usage) for more detail on flags
|
||||
- see [Docker docs](https://docs.docker.com/) for how to use docker
|
||||
|
||||
- <Code code="docker run -it -v/path/to/config.yaml:/app/config.yaml jwetzell/showbridge:latest --debug"/>
|
||||
|
||||
- see [CLI Usage](/guides/cli-usage) for more detail on flags
|
||||
|
||||
- see [Docker docs](https://docs.docker.com/) for how to use docker
|
||||
|
||||
</Steps>
|
||||
</Steps>
|
||||
|
||||
@@ -4,7 +4,7 @@ sidebar:
|
||||
order: 3
|
||||
---
|
||||
|
||||
import { Steps } from '@astrojs/starlight/components';
|
||||
import { Steps } from "@astrojs/starlight/components";
|
||||
|
||||
<Steps>
|
||||
1. clone repo
|
||||
@@ -12,8 +12,7 @@ import { Steps } from '@astrojs/starlight/components';
|
||||
2. install dependencies: `go mod tidy`
|
||||
|
||||
3. run cli:
|
||||
|
||||
- `go run ./cmd/showbridge --config config.yaml`
|
||||
|
||||
- see [CLI Usage](/guides/cli-usage) for more flags
|
||||
</Steps>
|
||||
</Steps>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
---
|
||||
title: Dictionary
|
||||
sidebar:
|
||||
label: Dictionary
|
||||
order: 2
|
||||
label: Dictionary
|
||||
order: 2
|
||||
---
|
||||
|
||||
- **router**: throughout documentation I will use the term router to refer to a configured/running instance of showbridge
|
||||
- **modules**: modules are configured instances that can produce or consume message like a TCP server or a UDP client
|
||||
- **routes**: routes take messages coming from a module (input), pass the
|
||||
- **processors**: processors process messages, this can be anything such as:
|
||||
- [decoding bytes into a string](/processors/string/decode)
|
||||
- [creating random numbers](/processors/int/random)
|
||||
- [filtering OSC message](/processors/osc/message/filter)
|
||||
- [running custom JavaScript snippets](/processors/script/js)
|
||||
- **processors**: processors process messages, this can be anything such as:
|
||||
- [decoding bytes into a string](/processors/string/decode)
|
||||
- [creating random numbers](/processors/int/random)
|
||||
- [filtering OSC message](/processors/osc/message/filter)
|
||||
- [running custom JavaScript snippets](/processors/script/js)
|
||||
|
||||
import { Aside } from '@astrojs/starlight/components';
|
||||
import { Aside } from "@astrojs/starlight/components";
|
||||
|
||||
<Aside type="note">
|
||||
Router output is also handled by [a processor](/processors/router/output)!
|
||||
</Aside>
|
||||
Router output is also handled by [a processor](/processors/router/output)!
|
||||
</Aside>
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
---
|
||||
title: Overview
|
||||
sidebar:
|
||||
label: Overview
|
||||
order: 1
|
||||
label: Overview
|
||||
order: 1
|
||||
---
|
||||
|
||||
showbridge is a kind of re-imagining of [OSCulator](https://osculator.net/) taken way too far.
|
||||
|
||||
### Included Modules
|
||||
|
||||
- HTTP
|
||||
- server
|
||||
- UDP
|
||||
@@ -28,7 +29,7 @@ showbridge is a kind of re-imagining of [OSCulator](https://osculator.net/) take
|
||||
- call server
|
||||
- [DTMF](https://en.wikipedia.org/wiki/DTMF_signaling) server
|
||||
- MIDI
|
||||
- input (not included in pre-built binaries yet)
|
||||
- output (not included in pre-built binaries yet)
|
||||
- input (not included in pre-built binaries yet)
|
||||
- output (not included in pre-built binaries yet)
|
||||
- Serial
|
||||
- client (not included in pre-built binaries yet)
|
||||
- client (not included in pre-built binaries yet)
|
||||
|
||||
Reference in New Issue
Block a user