Skip to main content

Dmx

caution

This service is experimental and may change in the future.

A service that can send DMX512-A packets with limited size. This service is designed to allow tinkering with a few DMX devices, but only allows 235 channels. More about DMX at https://en.wikipedia.org/wiki/DMX512.

import { Dmx } from "@devicescript/core"

const dmx = new Dmx()

Commands

send

Send a DMX packet, up to 236bytes long, including the start code.

dmx.send(channels: Buffer): Promise<void>

Registers

enabled

Determines if the DMX bridge is active.

  • type: Register<boolean> (packing format u8)

  • read and write

import { Dmx } from "@devicescript/core"

const dmx = new Dmx()
// ...
const value = await dmx.enabled.read()
await dmx.enabled.write(value)
  • track incoming values
import { Dmx } from "@devicescript/core"

const dmx = new Dmx()
// ...
dmx.enabled.subscribe(async (value) => {
...
})
note

write and read will block until a server is bound to the client.