{"id":20563426,"url":"https://github.com/pilotak/docker-rpi-ws281x-mqtt","last_synced_at":"2025-05-09T17:33:12.242Z","repository":{"id":46134439,"uuid":"228036660","full_name":"pilotak/docker-rpi-ws281x-mqtt","owner":"pilotak","description":"Raspberry Pi Docker for controlling WS281x LEDs via MQTT","archived":true,"fork":false,"pushed_at":"2023-04-21T19:43:00.000Z","size":31,"stargazers_count":7,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T17:54:40.839Z","etag":null,"topics":["docker","homeassistant","mqtt","neopixel","raspberry-pi","raspberry-pi-3","rasperry-pi-4","ws2811","ws2812","ws281x"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pilotak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-14T14:30:12.000Z","updated_at":"2025-01-04T01:16:08.000Z","dependencies_parsed_at":"2022-08-26T16:52:17.495Z","dependency_job_id":null,"html_url":"https://github.com/pilotak/docker-rpi-ws281x-mqtt","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fdocker-rpi-ws281x-mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fdocker-rpi-ws281x-mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fdocker-rpi-ws281x-mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pilotak%2Fdocker-rpi-ws281x-mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pilotak","download_url":"https://codeload.github.com/pilotak/docker-rpi-ws281x-mqtt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253295834,"owners_count":21885707,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","homeassistant","mqtt","neopixel","raspberry-pi","raspberry-pi-3","rasperry-pi-4","ws2811","ws2812","ws281x"],"created_at":"2024-11-16T04:18:38.961Z","updated_at":"2025-05-09T17:33:12.013Z","avatar_url":"https://github.com/pilotak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Control WS281x connected on Raspberry Pi via MQTT\n![Docker Build](https://github.com/pilotak/docker-rpi-ws281x-mqtt/workflows/docker%20build/badge.svg) ![Docker Pulls](https://img.shields.io/docker/pulls/pilotak/rpi-ws281x-mqtt) ![Docker Size](https://img.shields.io/docker/image-size/pilotak/rpi-ws281x-mqtt?color=orange)\n\nThis image is ready to be used in HomeAssistant - supports MQTT discovery, for all other purposes, please see topics used below.\n\nFor supported GPIOs please see [rpi-ws281x-python](https://github.com/rpi-ws281x/rpi-ws281x-python/blob/master/library/README.rst)\n\n## Environmental variables\n| Variable | | Default value | Allowed values |\n| --- | --- | :---:| :---: |\n| `LED_GPIO` | **required** | | |\n| `LED_COUNT` | **required** | | |\n| `LED_CHANNEL` | optional| 0 | |\n| `LED_FREQ_HZ` | optional | 800000| 400000 or 800000 |\n| `LED_DMA_NUM` | optional | 10 | 0-14 |\n| `LED_BRIGHTNESS` | optional | 255 | 1-255 |\n| `LED_INVERT` | optional | 0 | 0 or 1 |\n| `LED_STRIP_TYPE` | optional | GRB | BGR, BRG, GBR, GRB, RBG, RGB |\n| `MQTT_BROKER` | optional | 'localhost' | |\n| `MQTT_USER` | optional | None | |\n| `MQTT_PASSWORD` | optional | None | |\n| `MQTT_PORT` | optional | 1883 | 1-65535 |\n| `MQTT_QOS` | optional | 1 | 0-2 |\n| `MQTT_ID` | optional | 'rpi-ws281x' | |\n| `MQTT_PREFIX`  | optional | 'rpi-ws281x' | |\n| `MQTT_DISCOVERY_PREFIX` | optional | 'homeassistant' | |\n\n\n### `docker-compose.yml`\n```yaml\nversion: \"3.6\"\nservices:\n  mosquitto:\n    container_name: mosquitto\n    restart: always\n    image: eclipse-mosquitto\n    ports:\n      - 1883:1883\n\n  rpi_ws281x:\n    container_name: rpi_ws281x\n    restart: unless-stopped\n    image: pilotak/rpi-ws281x-mqtt\n    privileged: true\n    depends_on:\n      - mosquitto\n    environment:\n      - LED_GPIO=18\n      - LED_COUNT=167\n      - MQTT_BROKER=mosquitto\n      - MQTT_USER=user\n      - MQTT_PASSWORD=123456\n```\n\n## MQTT topics\n### To set color\nSend to topic: `rpi-ws281x/command`\n\n*Note: `color` and `effect` are optional keys, you can send both or just one or none in which case last color selected is used.*\n```json\n{\n    \"state\": \"ON\",\n    \"color\": {\n        \"r\": 0,\n        \"g\": 255,\n        \"b\": 0\n    },\n    \"effect\": \"Knight Rider\"\n}\n```\n\n### To turn off\nSend to topic: `rpi-ws281x/command`\n```json\n{\n    \"state\": \"OFF\"\n}\n```\n\n### Last state\nTopic: `rpi-ws281x/state`\n```json\n{\n    \"state\": \"ON\",\n    \"color\": {\n        \"r\": 255,\n        \"g\": 109,\n        \"b\": 109\n    },\n    \"effect\": \"None\"\n}\n```\n\n### Availability\nTopic: `rpi-ws281x/alive`\n\nResponse: `1` or `0`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilotak%2Fdocker-rpi-ws281x-mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpilotak%2Fdocker-rpi-ws281x-mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpilotak%2Fdocker-rpi-ws281x-mqtt/lists"}