Skip to content

LED notification server for displaying Plex and Android Notifications on LED Matrix Displays.

License

Notifications You must be signed in to change notification settings

kunaldeo/led-notification-server

Repository files navigation

Introduction

Welcome to the alpha release of LED Notification Server. This software allows you to show notifications on LED matrix panels.

Pull Requests welcome

Current Features

  • Display Android notifications
  • Display Plex On Screen Display on playback
    • Movie Information including Director, Rating and File format
    • TV information like season, episode name etc.
  • Output resolution of 128x128 using 4 64x64 Matrix panel

Planned Features

  • Support for iOS Notifications
  • Dynamic rendering for other resolutions: Help Needed
  • Support for higher resolutions

How it Looks

Display1 notification2

Hardware Requirements

If you do not want to buy the hardware you can also use TERMINAL output of noisebridge server

4 64x64 LED module is not mandatory, it is just that I have designed the output to 128x128, one can easily add support for smaller resolutions as well with just one or two panels

  • 64x64 P3 or P2.5 LED Matrix Display Module 4 Pieces. Can be purchased from AliExpress, Adafruit, Sparkfun

  • 5v Power Supply for LED Display Matrix, 20 Amps is recommended AliExpress

  • Raspberry Pi 3 Model B+, other Pi Models may work as well, Official Page

Software Requirements

This is just for reference. Installation steps will cover the installation of most of the components

If you are not using Plex you can ignore all plex related instructions

Architecture Diagram

LED Matrix Notification Center

  1. Plex Server or Android device push payload to Webhook Server on LED Matrix Notfication Server
  2. LED Matrix Notification Server parses the notification, generates an image and push it to Noisbridge LED Display Server via UDP
  3. Noisebirdge Server pushes the image to LED Matrix Display which is connected to the GPIO of rasperry pi

Installation Steps

Setting Up Noisebridge LED Display Server on PI

A. Wiring the LED Matrix

  1. Wire the first LED Panel using the instructions at rpi-rgb-led-matrix Github project. Follow the instruction for 64x64 panel.

  2. Chain the other three LED Panels using the following pattern

    // can be arranged in this U-shape
    //    [<][<] }----- Raspberry Pi connector
    //    [>][>]
    

matrix1

matrix2

B. Setting up Noisebridge LED DIsplay Server

Following instructions/commands are for Rasperry PI

  1. Install Raspian Lite, Instructables Guide

  2. Install development tools on the PI

    sudo apt-get install build-essential
    
    
  3. Checkout Noisebridge Server (FlaschenTaschen)

    $ git clone --recursive https://github.com/hzeller/flaschen-taschen.git
    $ cd flaschen-taschen
  4. Compile the server

    $ cd server
    $ make FT_BACKEND=rgb-matrix
    
  5. Create /etc/systemd/system/led.service with the following contents

    [Unit]
    Description=Led Service
    
    [Service]
    User=root
    Group=root
    Restart=always
    RestartSec=30
    ExecStart=/home/pi/flaschen-taschen/server/ft-server --led-rows=64 --led-cols=64 --led-chain=4 --led-pixel-mapper="U-mapper" --led-slowdown-gpio=2 --led-brightness=25
    
    [Install]
    WantedBy=multi-user.target
    

Verify all the paths 6. Enable and start the service

```
$ sudo systemctl daemon-reload
$ sudo systemctl enable led
$ sudo systemctl start led
```
  1. Notedown the IP address of the PI.

C. Setting up LED Notification Server

  1. Clone this repository

    $ git clone https://github.com/kunaldeo/led-notification-server
    
  2. Create a python virtualenv and install the dependencies

    $ sudo python3 -m pip install virtualenv # Optional step, if you have virtualenv skip it
    $ cd led-notification-server
    $ python3 -m virtualenv -p /usr/bin/python3 venv
    $ source venv/bin/activate
    $ pip install -r requirements.txt
    
  3. Edit the values for the following variables in plexobject/settings.py. Mandatory items are bold.

    • ALLOWED_HOSTS: Set it to the IP address where the repo has been cloned
    • ICON_CACHE_DIR: Path where the notification icons will be cached
    • PLEX_TOKEN = Plex auth token. See Finding Plex authentication token.
    • PLEX_OUTPUT_IMAGE_PATH = Generated image location for Plex notification
    • PLEX_OUTPUT_SCRIPT_PATH = Script responsible for pushing plex image
    • SCREEN_CLEAR_COMMAND = Command for clearing the screen
    • IMAGE_BACKGROUND = Backgorund of the notfication image
    • FONT_NAME = Font path
    • FONT_SIZE = Font size
    • NOTIFICATION_OUTPUT_IMAGE_PATH = Android notification image path
    • NOTIFICATION_OUTPUT_SCRIPT_PATH = Script responsible for pushing Andorid notfication image
  4. Edit the run scripts

    • For Plex Notifcations, edit PLEX_OUTPUT_SCRIPT_PATH file. Substitute the values under < >.
    #!/bin/bash
    cat <PLEX_OUTPUT_IMAGE_PATH> | stdbuf -o64k pnmscale -xysize 128 128 | socat -b64000 STDIO UDP-SENDTO:<Pi IP Address>:1337
    echo "Image Displayed.."
    
    • For Android Notifcations, edit NOTIFICATION_OUTPUT_SCRIPT_PATH file. Substitute the values under < >.
    #!/bin/bash
    cat <NOTIFICATION_OUTPUT_IMAGE_PATH> | stdbuf -o64k pnmscale -xysize 128 128 | socat -b64000 STDIO UDP-SENDTO:<Pi IP Address>:1337
    echo "Image Displayed.."
    
  5. Run the server. Note the IP address of the server.

    $ screen -S notification
    $ python manage.py runserver 0.0.0.0:8000
    

D. Configuring Android Notifications

  1. Open notfiy app
  2. Go to Devices section and click +>Add Manually. Fill in the IP address and the port(8000).
  3. In the main screen select the apps from which you want the notifications to be sent

notifyapp

E. Configuring Plex Server

  1. Open to Plex Server
  2. Go to Settings>Webhooks>Add Webhook
  3. Enter the server address in the following format
http://192.168.1.4:8000/khook/

plexwebhook

About

LED notification server for displaying Plex and Android Notifications on LED Matrix Displays.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published