# Binary Lighting Control Placeholder

This folder reserves the binary lighting-control demo path for Data Network.

Target flow:

- browser or Node control UI publishes binary Art-Net or DMX payloads
- Data Network transports those payloads over canonical binary channels
- an ESP32, Arduino bridge, or Node lighting bridge receives the bytes
- the bridge writes the frame to a fixture or lighting universe

Canonical scenarios:

- `blob-binary`
- future `lighting-binary` scenario if we split lighting from generic binary transport

Proposed demo channels:

- `demo.binary.blob`
- `demo.lighting.artnet`
- `demo.lighting.dmx`

First implementation target:

- Node or browser publisher -> Data Network -> ESP32 or Node bridge -> fixture

Current repo implementation:

- `scripts/artnet-bridge.mjs` subscribes to a DataNet binary channel and forwards
  either raw Art-Net packets or wrapped DMX payloads over UDP to an Art-Net node
- use `demo.lighting.dmx` for raw DMX frame bytes that should be wrapped into
  `ArtDMX`
- use `demo.lighting.artnet` for already-built Art-Net packets that should be
  forwarded unchanged

Quick start:

```bash
pnpm -C scripts demo:lighting:bridge
```

Important environment variables:

- `DATANET_API_KEY`
- `DATANET_CHANNEL`
- `DATANET_BINARY_MODE=dmx|artnet`
- `ARTNET_HOST`
- `ARTNET_PORT`
- `ARTNET_UNIVERSE`
- `ARTNET_NET`
- `ARTNET_SUBNET`

Example DMX bridge:

```bash
DATANET_API_KEY=ak_... \
DATANET_CHANNEL=demo.lighting.dmx \
DATANET_BINARY_MODE=dmx \
ARTNET_HOST=192.168.1.50 \
ARTNET_UNIVERSE=0 \
pnpm -C scripts demo:lighting:bridge
```

Example Art-Net passthrough bridge:

```bash
DATANET_API_KEY=ak_... \
DATANET_CHANNEL=demo.lighting.artnet \
DATANET_BINARY_MODE=artnet \
ARTNET_HOST=192.168.1.50 \
pnpm -C scripts demo:lighting:bridge
```

Why this matters:

- proves the platform is not only for JSON telemetry
- shows remote control and fixture data transport clearly
- supports installation, venue, and lighting-control workflows

Repo signals already in place:

- `binary/dmx` and `binary/artnet` content types exist in the gateway schema
- the gateway includes a binary publish smoke test
- seed data already includes a DMX-style topic example
