Twitch Hype Train Relay Monitor

Andrew Bills built a Raspberry Pi device that activates relays based on Twitch events.

JeremyCook
over 4 years ago

Andrew Bills knows some people who host a weekly Twitch show, and the idea was thrown around that they could have something explode when a “Hype Train” happens. While how serious this potentially dangerous discussion was is perhaps an open question, Bills had a better plan that would give them more options and (hopefully) be safer.

His streaming event system runs on a Raspberry Pi Zero WH, and instead of exploding something, features a series of eight relays that can be connected up to whatever you want. The concept here is lights, motors, an inflatable “wackyman” air pump, or anything else you can imagine be triggered based on different Twitch channel events retrieved via webhooks from the Twitch Helix API.

Setup is accomplished by inputting the Client ID and Secret from the Twitch Developer portal, plus the Channel ID into the device’s config file. When the code is running, it polls Twitch to see what’s going on at configurable intervals.

The monitor is programmed for one relay to show when the stream is online, plus a follow relay, and separate relays for Hype levels 1-5. Each level is valid for up to roughly four minutes and 30 seconds, and if it reaches the next level, this timer is reset. If you'd like to enhance your Twitch streaming with this unit, code is available on GitHub, and a nicely 3D-printed/lasered housing design can be found on Thingiverse.

JeremyCook

Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!

Latest Articles