项目作者: ptrre

项目描述 :
WS2811 leds driver with REST API
高级语言: Python
项目地址: git://github.com/ptrre/ws2811-rest.git
创建时间: 2020-12-13T12:08:20Z
项目社区:https://github.com/ptrre/ws2811-rest

开源协议:Other

下载


RPI WS2811 REST API

WS2811 leds driver with REST API based on Flask.

RPi WS281x Python: https://github.com/rpi-ws281x/rpi-ws281x-python

Installation

  1. Install requirement packages

    1. $ sudo apt update
    2. $ sudo apt install python3-venv
  2. Clone the repo

    1. $ git clone https://github.com/ptrre/ws2811-rest
  3. Run setup.sh script

    1. $ cd ws2811-rest
    2. $ chmod +x setup.sh
    3. $ ./setup.sh

API

[IP_ADDRESS]:8080/enable/n

  1. n = 0 -> turn off leds
  2. n = 1 -> turn on leds

[IP_ADDRESS]:8080/scene/id

  1. Activate scene number id.

[IP_ADDRESS]:8080/state/get

  1. Return the active scene and leds state.
  2. `

[IP_ADDRESS]:8080/scenes/get

  1. Return parameters of all scenes.