For the past few years I’ve been building and maintaining website/blog at www.pragmaticcoding.ca. It has mostly about programming, and more specifically it’s ended up having a lot of content about JavaFX with Kotlin.

Lately, I’ve been spending all of my time building out my own homelab and self-hosting the services that I need. I’ve got a little stack of M910Q’s running in a Proxmox cluster with an HP T740 running OPNSense.

One of my big successes so far has been to replace my Google Home devices streaming music all over the house with a SnapCast network using RaspberryPi Zeros as the streaming clients. I’ve been working on documenting how to do this, and the result is a three part series that explains what SnapCast is, how it works and how to combine it with Mopidy to stream music around the house.

I have to admit that this one got away from me. It was all one article until I noticed that Jekyll was estimating it at oven 1/2 hour to read, which is way, way too long. So it became three parts, which also gives me the opportunity to release it over time, and make sure that each part is nice and clean before I post it live. Part I is an introduction to SnapCast and explains how it works and how to set up a SnapCast server in Proxmox.

If you’re interested, take a read and let me know what you think.

  • SayCyberOnceMore@feddit.uk
    link
    fedilink
    English
    arrow-up
    1
    ·
    15 hours ago

    Thanks for sharing.

    I’ll take a proper read if it later, but how well do your Pi0’s stay on the wifi?

    I have 4 around my home acting as bluetooth trackers for Home Assistant, but they fall off the wifi often (signal strength / noise isn’t the issue)

    It’s only for a few seconds, which is ok for BT tracking, but that would be terrible for audio.

    • HamsterRage@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      5 hours ago

      This was a little problematic at first. Part of my shift over to OPNSense was that I bricked my mesh WiFi when attempting to put it into AP mode. So I had to scramble around to get a WiFi AP. Initially it was upstairs and connected to a swtich that was connected to the homelab in the basement through a Powerline AV. The Pi0’s dropped out a lot.

      My house is too old for Cat5 in the walls, but does have some coax for cable TV. So I got some MoCa adapters and a second WiFi AP and sorted the WiFi out. After that, no WiFi problems with the streaming. I think the Powerline AV was just too unstable for the SnapCast.

      There still are some occasional brief outages, and from what I can see this is caused by buffer overflows or something of that ilk with the SnapCast client software. I’ve adjusted the parameters as much as I can, and it seems pretty stable. I’ll notice a 1 or 2 second outage somewhere in the house every day or so.

      Last week the SnapCast in the bathroom was glitching a lot, so I rebooted it and it’s been stable ever since. The one in the front room, which is literally 6" from the WiFi AP has never glitched at all, and it’s been running for about 3 months now.

      I have a section in one of the articles where I talk about recovering from glitches that halt the Mopidy stream itself. In those cases, the Mopidy service is still running, but stops streaming. Using the REST API you can get it running again, so I wrote a cron job that checks every 3 minutes and restarts the stream if required.

      I just came back from a 3 week vacation and after 2 weeks the Mopidy service itself crashed. I was getting Gotify notifications every 3 minutes from that cron job as it attempted to restart the stream. If since modified the Mopidy service to restart if it crashes, but it could be months before that ever happens.