- Install
uv- To install for all users on Raspberry Pi, a way to do it is:
curl -LsSf https://astral.sh/uv/install.sh | sudo UV_INSTALL_DIR="/usr/local/bin/" sh
- To install for all users on Raspberry Pi, a way to do it is:
- Need Python dev,
sudo apt-get install python3-dev
- (optional) Install Python dependencies:
uv pip install -r pyproject.toml- Note that
sudois used since the script will need to run as root. ??
- Note that
Configuration is managed through environment variables. These can be managed in a .env file if desired.
API_DOMAIN: The location of the Lumiere API, should be something like this (no trailing slash):https://api.lumiere.lightingPIXEL_LENGTH: Number of LEDs that the client is connected to.DMA_CHANNEL: Defaults to10GPIO_CHANNEL: Defaults to18BRIGHTNESS: Brightness of LEDs (0-255); defaults to255.STRIP_TYPE: LED light configuration. Can bergb,grb, etc; defaults torgb.MAX_SPREAD: When displaying pixels, the spread is the amount of repeating of a color. Should be 1 or great; defaults to5.LOG_LEVEL: Sets the minimum log level; defaults to warning.FRAME_RATE: The frame rate for animations, might help with light rendering issues; defaults to 30.GAMMA_CORRECTION: Gamma correction constant; set to 0 to turn off; defaults to 2.3.
Run with uv run lumiere-client/client.py
Note that sudo is necessary to be able to access the GPIO pins. ??
Initial configuartion of the Raspberry Pi.
raspi-config- Enable SSH
- Unsure how to exactly make sure that the PWM pins are actually accessible? Enable SPI? Enable I2C?
- Configure timezone
- Make sure network is available on boot
- Make sure it can connect to the internet.
Install the startup/service script.
- Copy the
init.dscript with something like:sudo cp ./deploy/lumiere-client.init.d /etc/init.d/lumiere-client && sudo chmod +x /etc/init.d/lumiere-client
- Update the script as needed. Mostly this will just be updating the
dirvariable. - Install to be able to be run on startup.
sudo update-rc.d lumiere-client defaults