https://github.com/knifa/led-matrix-control-api
HTTP JSON API for sending control messages to led-matrix-zmq-server.
https://github.com/knifa/led-matrix-control-api
Last synced: 6 months ago
JSON representation
HTTP JSON API for sending control messages to led-matrix-zmq-server.
- Host: GitHub
- URL: https://github.com/knifa/led-matrix-control-api
- Owner: Knifa
- License: gpl-3.0
- Created: 2024-11-17T18:57:53.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-11-17T19:00:21.000Z (7 months ago)
- Last Synced: 2024-11-17T20:17:29.281Z (7 months ago)
- Language: Python
- Size: 42 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# led-matrix-zmq-control-api
A simple HTTP JSON API for sending control messages to [led-matrix-zmq-server](https://github.com/knifa/led-matrix-zmq-server).
Zeroconf is used to publish the API endpoint as a service so it can be discovered by e.g. Home Assistant.
## Usage
See [lmz/settings.py](lmz/settings.py) for possible environment variables.
```bash
uv sync
uv run python -m lmz
```### POST `/brightness`
Set the brightness of the display (0-100%)
```bash
curl \
-X POST \
-H "Content-Type: application/json" \
-d '{"brightness": 50}' \
http://localhost:4200/brightness
```### POST `/temperature`
Set the color temperature of the display (2000-6500K).
```bash
curl \
-X POST \
-H "Content-Type: application/json" \
-d '{"temperature": 2500}' \
http://localhost:4200/temperature
```## Zeroconf
The API is published as a Zeroconf service under the type `_lmz-control-api._tcp.local.`.