Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!

Toby Jaffey's Lyuba Library Brings Espressif ESP32 Devices to Mastodon and the Wider Fediverse

An open source, community-focused alternative to services like Twitter, Mastodon has a lot to offer — to humans and machines alike.

Developer Toby Jaffey has launched a library that brings microcontrollers to the "Fediverse," offering Espressif ESP32 users the chance to build devices capable of posting to the Mastodon social network: Lyuba.

"Lyuba [is a] tooting library for ESP32," the project's official Mastodon account announced this week. "Make stuff toot like it's 2014! By Toby Jaffey."

Mastodon, and the wider Fediverse, has been gaining interest of late thanks to a controversial takeover of micro-blogging service Twitter. Mastodon, as one of the best-known examples of ActivityPub-driven social networking services, which can federate with each other to form the "Fediverse", has exploded with new users — and now, thanks to Jaffey's work, the Internet of Things (IoT) can get in on the fun.

Having physical devices post to Twitter is a common way of providing alerts or continuous monitoring, and the Lyuba library works in the same way — but posts to Mastodon, where messages are jokingly referred to as "toots," via ActivityPub. As a federated service, anyone can run a Mastodon server — and, as you'd expect, Lyuba allows the user to post to any server on which the user has created an account.

At the time of writing, Lyuba allows for posting to Mastodon and compatible ActivityPub servers, but does not support receiving messages. A device running Lyuba is authenticated with the server then a token stored in the ESP32's flash memory for future use — with Jaffey warning that "Lyuba should be considered insecure [as] no certificate checks are performed and your Mastodon password is baked into your firmware."

Those who want to give the library a go can find the source code on the Ringtail Software GitHub repository, under the permissive MIT license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles