Getting Home Assistant to work with a Tidbyt and its apps

The Tidbyt is a multi LED screen that comes in a nice wood enclosure and supports a bunch of open source apps, as well as an API run by the company that makes it. There are many ways to do the same thing with your own hardware, and this is not everyone’s preferred screen, but if you have one, I have some interesting tricks for Home Assistant users.

TL;DR link to my Github

The API that Tidbyt runs uses an app called pixlet. It’s a binary that runs on Windows, Max and Linux. I’ve been using the latter to run apps locally, and I wanted to share some of those here.

Anyone can build a Tidbyt app, but it has to be able to collect data from the internet and getting an app published is a bit of a hassle and slow.

Since I didn’t want to deal with that, I got pixlet up and running and been modifying the existing .star apps (Starlark is the language used to build them) and running them on an LXC Debian container in a Proxmox host.

I have a Now Playing app that will show what my Sonos speaker is playing. It pulls title, artist and album cover and displays it on the Tidbyt:

This will work with any media_player in Home Assistant. If HA shows media info, this script will show it on your Tidbyt. Someone smarter than me built the app, I just made it run on my own server and use HA automations to send it data.

There’s a Flights Nearby app that uses a paid FlightRadar API to pull nearby flight information. There is a free version of the API that has very limited calls, and even the paid ones have a monthly limit and there are overages if you use more. So, with Home Assistant, I turn this app on or off depending on my Office presence sensor.

Another app I liked was a Solar Stats/Generation one that is part of the Tidbyt Community, but it was made to work with a specific Solar provider website. With some tweaking, I got it to pull the data from Home Assistant. I use an Enphase Integration (and recently this newer method) on my HA, so I simplified the app to collect HA entity data. All it needs is a Production/Generation sensor and a Consumption one. It then calculates energy pulled from the grid.

The original app has multiple screens and ability to collect battery data and other information, but I didn’t spend the time to make that work with HA since I don’t have a battery. It should be pretty easy to do.

I recently discovered a new project that runs a lot of these apps in a more complex dev environment than what I use, and need to give that a shot. It’s called Pixbyt. The dev of that project has some interesting apps built. None of theirs are made to work with HA, but it should be easy enough to use that as a base.

My implementation relies on bash scripts and systemd services and uses ssh keys to allow Home Assistant to issue commands that control the behavior of the apps via pixlet.

I’ve been trying to document it all on my Github here, including links to the original code that I used.

2 Likes

Very interesting. Is the reason for not publishing “Now playing” app in Tidbyt store the requirement to run that specific middleware service?
Maybe there’s a simpler way, like adding HA IP address or specific unique token in Tidbyt app configuration. And have configuration instructions for proxy, to translate internet requests to local HA or something?

I’m not sure.

I know that the approval process on the Tidbyt store is tedious and the person that built the app is working on custom firmware that isn’t tied to the Tidbyt servers where they run it, so I’m guessing that’s why they haven’t tried publishing it on the Tidbyt store.

The store already has Spotify and Sonos apps. The Spotify app didn’t work well last time I tried it, and the Sonos one was intermittent at best.

I don’t know if there’s a way to push an update to Tidbyt to let it know that the song changed, so you’d have to use polling which could be done via a public Home Assistant URL. Since this is not something most users have set up, I think that most people trying to add that app to their Tidbyt would fail.

A proper integration should exist where Home Assistant and Tidbyt can talk to each other and we can do more complex pushes to Tidbyt.

Since this is working just fine for me, I haven’t bothered looking into trying to publish it, but I did try to submit a commit to the Flight Tracker that got stuck in limbo for weeks and I just gave up. They’re supposed to be changing the way the apps get approved and pushed, but haven’t been keeping up with the latest news.

We are working on this, target early 2024. Thoughts on how it should work would be greatly appreciated! Especially from a technical standpoint.

2 Likes

I think being able to push a webp image directly to the tidbyt from Home Assistant would be the most efficient, and a way to manage the existing apps and their rotation. The HA side would need to be able to generate the webp image before sending out to the Tidbyt.

If Home Assistant had the same abilities the app does when it comes to turning apps on/off, pinning, etc, would be very helpful.

Most of what I’m doing right now is turning apps on or off, but a lot of the heavy lifting is done on my container to collect data from Home Assistant. If I could generate the webp image from HA and then just have it inserted into the rotation of the Tidbyt, I wouldn’t need the extra container.

It’s tricky because I would like it to do a lot, but there are going to be limitations. I wish I was more technical to provide better feedback. I’m sure there are others who can chime in with more helpful information.

Do you have a roadmap?

I’ve recently bought a Ulanzi Clock and flashed this software on it:
Awtrix Light (GitHub)

The way it works is incredibly simple and working perfectly. The documentation could be a blueprint for an integration of Tidbyt into HomeAssistant.
I would love to add a Tidbyt if I can fully control what it shows and when through MQTT/HomeAssistant.