The power of running apps locally with pixlet and Home Assistant

image
image

I really hope we get a powerful Home Assistant integration soon.

The closed source Sonos and Spotify Now Playing apps are not very good. The Spotify one only shows the first played song, and the Sonos one doesn’t work with a lot of sources.

Apps running on the Tidbyt servers require a long and slow approval process for merging changes (I hear improvements are coming, but it’s not very good at the moment).

I’m using code submitted by others to improve on the Flight Tracker app, and I have also added a bunch of tail logos that were missing originally (I do plan to submit a commit to the Tidbyt app that includes them, but I had to familiarize myself with the process beforehand)

The Home Assistant Now Playing app was built by Drudge, and it works very well with any source played on HA.

Where HA becomes very useful here is in the ability to turn off/on the apps based on any sensor in my HA setup. For example, the Flight Tracker app uses a paid API that has 10,000 hits per month, but if you go over, you get charged for every additional hit. To get around this, I use a presence sensor in the room the Tidbyt is in to start/stop the app. This means that when I am not in the room, the Tidbyt does not display the Flight Tracker, but more importantly, it doesn’t use up API calls.

The Now Playing app would work on the Tidbyt servers if your HA is reachable over the public internet, but without a way for HA to talk to it, you can’t do things like notify the app when a track changes, or when the music is paused/stopped.

I’m using scripts and services on an LXC Debian container, where HA can SSH and run remote commands to star/stop the Flight Tracker service, trigger the generation of a new screen when the track changes, and remove the screen when music is paused. pixlet has these abilities built in, and they work pretty well.

5 Likes

The presence sensor to solve potential API issues is a genius move!! I love to see this kind of stuff and any home assistant involvement.

I hope we get a proper HA integration at some point. What I’m doing requires running apps locally and using HA to run pixlet commands via SSH on the container running the apps. Basically HA is in charge and pixlet is used as a way to turn the apps on or off on my Tidbyt, and to send data to them like with the Now Playing integration I’m using which works all the time, unlike the official Sonos or Spotify ones. Using HA also makes it service independent, so no matter what my speaker (Sonos, or any other media.player) is playing, my Now Playing app gets the correc data

As soon as I can get this installed on MacOS I want to start on some HA. I’d love to see Hue come to the party, or dial displays of nest or even camera streaming. Maybe make it talk to sterling. After a nap, I will test these out!