Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

EtherPi (SNMP → LEDs + Sync + Display + Temps)

What it does

  • Maps VLANs & link speeds from a UniFi switch (SNMP) to addressable LEDs
  • Optional SPI display with rotating pages (overview, links, temps, sync)
  • UDP multicast to sync VLAN colors across multiple Pis
  • NEW: BMP280 sensor + Pi CPU temperature shown in UI and on display

Hardware

  • Raspberry Pi (any model with SPI + I2C; Pi 3/4/5 recommended)
  • LED strip: WS2811 / WS2812 / WS2812B / SK6812 (RGB or RGBW)
  • Small display (optional): SSD1351 OLED (128×128) or ST7789 LCD (e.g. 240×240)
  • BMP280 temperature sensor (I2C; typical addr 0x76 or 0x77)
  • Proper 5V power for LEDs; common ground with the Pi

Pin connections

LEDs (WS281x)

  • Data → GPIO18 (physical pin 12) — default
  • GND → any Pi GND (pins 6/9/14/20/25/30/34/39)
  • 5V → external 5V supply (do not power long strips from Pi 5V)
  • Share GND between Pi and LED PSU

Display (SPI0 default)

  • VCC → 3.3V (pin 1 or 17)
  • GND → GND
  • SCK/SCL → GPIO11 (pin 23)
  • MOSI/DIN → GPIO10 (pin 19)
  • CS/CE0 → GPIO8 (pin 24)
  • DC/RS → GPIO24 (pin 18)
  • RST → GPIO25 (pin 22)
  • (ST7789) BL/LED → 3.3V (or map to a GPIO if you want control)

BMP280 (I2C)

  • VCC → 3.3V
  • GND → GND
  • SDA → GPIO2 (SDA1) (pin 3)
  • SCL → GPIO3 (SCL1) (pin 5)
  • Default address 0x76 (some boards use 0x77)

Software install

git clone https://github.com/Lukeskaiwalker/etherlight-pi
cd etherlight-pi
./install.sh

To keep onboard audio enabled:

DISABLE_AUDIO=0 ./install.sh

The script:

  • Installs OS deps (Python, build tools, SNMP, I2C tools, scons)
  • Enables SPI (display) and I2C (BMP280)
  • Creates a .venv and installs Python deps (Flask, PySNMP, rpi-ws281x, luma, smbus2, bmp280)
  • Installs a systemd service that uses the venv and starts the app
  • Disables onboard audio by default (set DISABLE_AUDIO=0 to keep audio); reboot recommended after changes

Open: http://<pi-ip>:8080/


Update

From the UI

  • Go to Setup → Service.
  • Check for updates (requires internet on the Pi).
  • Update via Git to pull the latest release and restart the service.
  • Offline update: download a release .zip/.tar.gz from GitHub on another machine, then upload it on the Service card.
  • Updates keep your local settings in config.local.json.

Manual

cd ~/etherlight-pi
git pull
./install.sh

If you move the repo, rerun the install so the systemd service points at the new path.

Versioning

Releases use YYYY.MM.N (year, month, increment). Example: 2026.01.1. Use scripts/bump_version.py to increment the month counter and update VERSION.


Configuration

  • Edit config.local.json (auto-created on first run, preserved across updates).
  • config.json is the template shipped with the repo.
    • device.switch_host / device.snmp.community
    • device.ports.count if auto-detect differs
    • led.* for type/order/pin/brightness
    • display.enabled and model/size
    • sensors.bmp280.enabled, bus, address (0x76 or 0x77)
  • If device.name is empty or EtherPi, it auto-sets to EtherPi-XXXX (based on MAC).

UI

  • Temperatures card shows: CPU and BMP280 in °C (live).
  • Live Ports table: ifName, VLAN, speed, link state.
  • VLAN → Color editor.
  • Detect switch button fills model + port count.

Troubleshooting

  • LED mmap()/PWM error: rerun DISABLE_AUDIO=1 ./install.sh (or ./fix-ws281x-root-audiooff.sh) and reboot; ensure GND shared.
  • No BMP280 reading: enable I2C, check wiring & address (0x76 vs 0x77). Use i2cdetect -y 1 to confirm presence.
  • BMP280 auto-disabled: if no sensor is detected at boot it is turned off in config; re-enable in Setup → Sensors after wiring.
  • Display blank: confirm SPI enabled; ensure spidev is installed in the venv (rerun ./install.sh); check driver/size in config.local.json and wiring.

Service

journalctl -u etherlight.service -f
sudo systemctl restart etherlight.service

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages