bfb2290634e3c5d71884063d4ea015631059cd78
Matrix64 LED Display
Display Home Assistant and Netdata data on a 64x64 LED matrix controlled by a Raspberry Pi.
Features
- Weather Display: Current weather icon and outdoor temperature
- Interior Climate: Temperature and humidity from BTH01-3132 sensor
- HDD Temperatures: From Netdata server
- Automatic Brightness: Adjusts based on ambient light sensor
Project Structure
matrix64/
├── matrix.py # Main entry point
├── config.py # Environment configuration
├── weather_icons.py # Weather icon drawing functions
├── home_assistant.py # Home Assistant API client
├── netdata.py # Netdata API client
├── matrix64.service # Systemd service file
├── install.sh # Installation script
├── update.sh # Auto-update script
├── requirements.txt # Python dependencies
├── .env.example # Configuration template
└── .env # Your configuration (gitignored)
Installation on Raspberry Pi
Quick Install
# Download and run the install script
curl -sSL https://gitlab.kingstudio.es/jocaru/matrix64/-/raw/main/install.sh | sudo bash
Manual Install
# Clone the repository
sudo git clone https://gitlab.kingstudio.es/jocaru/matrix64 /opt/matrix64
cd /opt/matrix64
# Install dependencies
sudo pip3 install -r requirements.txt
# Create your configuration
sudo cp .env.example .env
sudo nano .env # Edit with your values
# Install and enable the service
sudo cp matrix64.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable matrix64
sudo systemctl start matrix64
Configuration
Edit /opt/matrix64/.env with your values:
# Home Assistant
HA_TOKEN=your_long_lived_access_token
HASS_URL=https://your-hass-instance.com
# Entity IDs
BRIGHTNESS_ENTITY_ID=sensor.your_brightness_sensor
WEATHER_ENTITY_ID=weather.forecast_home
INTERIOR_TEMP_ENTITY_ID=sensor.bth01_3132_temperature
INTERIOR_HUMIDITY_ENTITY_ID=sensor.bth01_3132_humidity
# Netdata
NETDATA_URL=http://your-netdata-server:19999
Service Management
# Start/stop/restart
sudo systemctl start matrix64
sudo systemctl stop matrix64
sudo systemctl restart matrix64
# Check status
sudo systemctl status matrix64
# View logs
sudo journalctl -u matrix64 -f
Auto-Updates
The install script sets up a cron job that:
- Checks for updates every 5 minutes
- Pulls changes if available
- Restarts the service automatically
To disable auto-updates:
crontab -e # Remove the matrix64 line
Manual Execution
The script requires samplebase.py from the rpi-rgb-led-matrix library:
cd /opt/matrix64
export PYTHONPATH=/home/pi/rpi-rgb-led-matrix/bindings/python/samples
sudo python3 matrix.py --led-rows=64 --led-cols=64
Description
Languages
Python
94.2%
Shell
5.8%