> Work In Progress <
Still documenting the repo
Notification sign for Kitboga status on Twitch.
[ ] save access_token
to EEPROM memory
Project uses an ESP32 to call the TwitchTV Helix API to check status of Kitboga's stream. The result is displayed on a 3D-printed sign with addressible RGBs and FastLED library.
NOTE: The STLs are a small remix of a great design by makkuro thing:749887.
When my fav streamer Kitboga (https://www.twitch.tv/kitboga) comes up live I get notified with all the LEDs lighting up in the stream's colour.
When he's offline, only 1 LED over i illuminates.
Also error states are displayed.
= Power ON
= Unauthorized/Expired keys
= Auth Issue
= Internal Server Error
= WiFi Disconnected
- 🤬 ALL red = other unknown request failure (including response
-1
)
- ESP32
- WS2811 addressible RGBs
- 3D-printed letters (printed separately)
- resistor, capacitor, power connector, wires
- access to Twich Helix API https://dev.twitch.tv/docs/api/
- HTTPClient https://www.arduino.cc/reference/en/libraries/httpclient/
- Arduino JSON https://www.arduino.cc/reference/en/libraries/arduino_json/
- FastLED https://www.arduino.cc/reference/en/libraries/fastled/
- capacitor C1 fixes Timed out waiting for packet header
-
Create a Twitch developer account to obtain access keys https://dev.twitch.tv/docs/api/
-
In Arduino IDE, fill
clientID
&clientSecret
accordingly. -
To obtain access token you can use Postman (see Twich Helix API OAuth client credentials flow) or bellow step:
- Uncomment line
Serial.printf("Access Token: %s\n", access_token);
which is in function validate()
. This prints auth token in Serial Monitor. Upload the code to the μC.
- Open serial monitor and grab the auth token. Paste it under variable
access_token
and re-upload the code.
- The auth token lasts for around 60 days and will be renewed automatically.
Erros are shown in the Serial Monitor for debugging. Further lines from the code can be uncommented to print important variables.
- nothing special here, regular 0.2mm nozzle and low infil 15%
The Twich API requires HTTPS requests. However, I only managed to make this work with HTTP via HTTPClient. This, once in a while, causes the ESP32 to fail to call the API - generates http response code -1
. A power cycle or reboot of the ESP seems to mostly fix it.. this is horrible and annoying so if you want to help and develop proper HTTPS calls (maybe with WiFiClientSecure lib) then plz get involved <3