{
    "key": "ws2812b",
    "kind": "actuator",
    "model": {
        "aliases": [
            "ws2812b"
        ],
        "device_class": "light"
    },
    "driver": {
        "runtime": {
            "init": {
                "args": {
                    "n": "{pixel_count}",
                    "pin": "board.D{din_pin}",
                    "auto_write": false
                },
                "class": "neopixel.NeoPixel"
            },
            "apt_packages": [],
            "pip_packages": [
                "rpi-ws281x",
                "adafruit-circuitpython-neopixel"
            ],
            "python_module": "drivers.ws2812b"
        },
        "targets": [
            "raspberrypi"
        ],
        "verified": {
            "by": null,
            "os": null,
            "date": null,
            "board": null,
            "reviewed_by": null,
            "evidence_url": null
        },
        "interface": "timed-serial",
        "connection": {
            "pins": [
                {
                    "role": "din",
                    "notes": "Single wire data input with strict timing.",
                    "required": true
                }
            ],
            "supply_voltage": "5V",
            "level_shift_required": null
        },
        "constraints": {
            "warmup_seconds": null,
            "read_timeout_seconds": null,
            "min_read_interval_seconds": null
        },
        "failure_modes": [
            "Timing is too tight for software bit-banging. On a Raspberry Pi it requires DMA driven PWM or SPI, and the PWM route conflicts with on-board audio.",
            "The rpi-ws281x path requires root, which is a real constraint on a service that should not otherwise be privileged.",
            "A 5V strip may not recognise a 3.3V data line. Long runs commonly need a level shifter on the first pixel.",
            "Current scales with pixel count and brightness. A strip of any length must be powered from its own supply, injected at both ends for long runs, and cannot be fed from a board rail."
        ]
    },
    "source": "platform-seed",
    "status": "draft",
    "platform": {
        "name": "WS2812B RGB LED Strip",
        "states": [
            {
                "label": "Set Color",
                "command": "SET_COLOR",
                "payload": "{\"color\": \"#FF0000\"}",
                "parameter": {
                    "name": "colour",
                    "format": "hex-rgb",
                    "pattern": "^#?[0-9A-Fa-f]{6}$",
                    "required": true,
                    "data_type": "string"
                },
                "sort_order": 1,
                "description": "Set LED color. Payload: RGB hex value"
            },
            {
                "label": "Set Brightness",
                "command": "SET_BRIGHTNESS",
                "payload": "{\"brightness\": 128}",
                "parameter": {
                    "name": "brightness",
                    "required": true,
                    "data_type": "integer",
                    "range_max": 100,
                    "range_min": 0,
                    "unit_symbol": "%"
                },
                "sort_order": 2,
                "description": "Set LED brightness. Payload: 0-255"
            },
            {
                "label": "On",
                "command": "ON",
                "payload": "ON",
                "parameter": null,
                "sort_order": 3,
                "description": "Turn all LEDs on at current color and brightness"
            },
            {
                "label": "Off",
                "command": "OFF",
                "payload": "OFF",
                "parameter": null,
                "sort_order": 4,
                "description": "Turn all LEDs off"
            },
            {
                "label": "Set Effect",
                "command": "EFFECT",
                "payload": "{\"effect\": \"rainbow\"}",
                "parameter": {
                    "name": "effect",
                    "values": [
                        "solid",
                        "blink",
                        "breathe",
                        "chase",
                        "rainbow"
                    ],
                    "required": true,
                    "data_type": "enum"
                },
                "sort_order": 5,
                "description": "Set a lighting effect. Payload: effect name"
            }
        ],
        "protocol": "gpio",
        "description": "Addressable RGB LED strip. Each LED individually controllable via single data wire. 5V. Used for lighting and visual indicators.",
        "manufacturer": "Worldsemi",
        "model_number": "WS2812B",
        "actuator_type": "led",
        "datasheet_url": null,
        "command_topic_suffix": "command/led",
        "response_topic_suffix": "response/led"
    },
    "revision": 1
}