Plex Status Light

by thegdoubleodees in Circuits > Arduino

1424 Views, 2 Favorites, 0 Comments

Plex Status Light

PXL_20210725_211405987.jpg

Hello, my plex server is a part of my home lab so I really enjoy quickly being able to see if something is being streamed. This status light is perfect for that. The code is janky, im not very well versed in anything C.

How it works

  1. ESP8266 Connects to WiFi on startup(lights will blink during this process)
    • Red Light when unable to connect to WiFi
  2. Every 5 seconds a call will be made to the plex server(specifically the sessions call)
    • Blue light will connect if no users are streaming
    • Green light will connect if users are streaming
    • Red light if the sessions call fails.

Supplies

  • ESP8266
  • WS2812B LED
  • Female to Female Jumper Wires
  • Soldering Iron
  • Hot Glue Gun

Setup NODEMCU ESP8266 to Work With Arduino IDE

Connect LED to ESP8266

PXL_20210726_175904565.jpg
PXL_20210726_175840756.jpg
PXL_20210726_175854538.jpg

Wires Image:

  • Here you can see the jumper wires I used
    • Female side connects to ESP8266
    • Exposed wire side connects to led pads

LED Image

  • Important to solder the wires to the left of the arrow.

ESP8266 Image

  • Take note of which wires are connect to which pins.
  • 3v3 will connect to 5v on the LED.
  • GND will connect to GND on the LED.
  • D3 will connect to DI on the LED(Any data pin will work on the ESP8266.

Get the Sessions Call

Screenshot 2021-07-26 130321.png
  1. Open up the network tab in dev tools.
  2. Navigate to your plex server url.
  3. Look for the sessions call (in the image i used the search)
  4. Click the sessions call, if you see what I have in the uploaded image that is the correct call.
  5. Right click this call and copy -> copy link address

Set Up the Code

Screenshot 2021-07-26 132616.png
Screenshot 2021-07-26 132527.png
Screenshot 2021-07-26 132506.png

Here's the code

Things to edit

  1. Line 7 -> Number of LED's
  2. Line 11 -> Data Pin #
  3. Line 15 -> Enter your SSID
  4. Line 16 -> Enter your WiFi Password
  5. Line 61 -> Enter the copied session call url from the previous step
  6. Load into ESP8266

Display

I had a block that I previously made when messing with epoxy resin. So I paired that with a block of wood and solders + hot glued everything together.