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 #CheerLights 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 #CheerLights. 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 Mastodon 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 MastoBot, 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!