CheerLights: Let’s Glow Together

Not long ago, I read about a cute IoT project, CheerLights. It’s a network of RGB lights that all change colour together, coordinated by a Twitter bot. The idea is that we all rig up RGB lights of some description, then when someone pings the Twitter bot they all change in sync; just a nice little community togetherness thing. It’s adorable and I love it.

Being a Fedizen, I felt left out of the fun, so I built a bot to bridge the two networks. The Twitter bot watches for mentions and the hashtag, and there are already Twitter bots for eg. an Alexa skill. DIY seems to be sort of the point.

The Fedi side of the equation is @CheerLights@botsin.space. This bot listens for @-mentions and for the hashtag . When a Toot has the hashtag or account name, and a colour, then it will be posted to the birdsite by @CheerlightsF.

Usually, the toot will be posted in its entirety and tagged with the Fedi account it comes from, unless the toot was a direct message, then we just tweet the colour and “a Fediverse user”.

This was in part a prototype to investigate the streaming API. It’s actually pretty simple! Connect a web socket to the endpoint you need, pass your api token on the query string (because IIUC, headers are a bit broken in (some? implementations of) WebSockets), and the events will start to flow. This will be pretty easy to build out in , but I’m glad I did a bare prototype first.

So come out and join the fun! Send a toot, change a light, take a moment enjoy being part of something small and silly and fun!

Author: Eddie Roosenmaallen

By day I'm the Release Manager at Distributive; I help build the Distributed Compute Protocol at https://dcp.cloud. In my off time I explore Linux, JavaScript and the web, and I try to share some of my knowledge and some of my humour online.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.