Hi All,

I’m to the point with my setup I’d like to start integrating audio. I know I’ll be tweaking ad-infintum, but I’d like to get started with some BT speakers and ESPs I have.

I had screwed around a bit with it previously, with little luck, but I was very early on. I’d like to dig in this weekend, but want to double check an understanding:

If I flash an ESP as a BT proxy, I should be able to add it to HA (via ESPHome?), then pair a BT speaker with it, which HA will now recognize and be able to pipe audio to?

  1. How does pairing the speaker work? When I put the speaker in discovery mode will HA show it as a device I can add?

  2. Do I need an integration to act as a manager/mixer for my various speakers?

As a bonus, if there is an integration that allows me to sync up the various speakers (if it’s not done automatically), that would be amazing. I’d be thrilled just with audio, but my house happens to have a bathroom vent with integrated BT speaker. It would be cool to have that synced with the living room audio when I have people over the game or similar.

  • SwingingTheLamp@piefed.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    I’m not an expert, so anybody feel free to correct me, but this should be pretty simple. Configure and flash the ESP devices as BT proxies using ESPHome, and all of the configuration to hook it into Home Assistant will be taken care of automatically. The device will show up as a Bluetooth adapter in HA, so then just pair the speakers. To sync various speakers, install the Sendspin Bluetooth Bridge to add Sendspin player capability to those speakers. Then, install Music Assistant to create groups of Sendspin players (a.k.a. speakers). At that point, you’re all set to play media from Music Assistant to the synced speaker group.

    The hitch is then playing audio from an external source (like a television) on that group. There’s a Music Assistant plugin that’ll stream any devices that are a Sendspin Source, so hook the audio output to an ESP32 with an audio input, and that’ll stream to MA, which will play it on all of the speakers.

    It may not have an elegant UI, but I think it should work.

    • Ravi@feddit.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      Thanks for the write-up. Just tried it myself, but couldn’t connect any speakers. This is what I tried:

      rpi pico w (1) with esphome

      1. Flashed bt proxy on a rpi pico w and integrated it into ha
      2. Opened the Sendspin Bluetooth Bridge, but couldn’t start a scan, because only onboard sticks are allowed

      direct BT adapter

      1. Plugged a TP Link UB400 into my server via extension cable and routed it through the proxmox into HA. Adapter gets recognised.
      2. Activated pairing on the speakers
      3. In the Sendspin Bluetooth Bridge: added the bt adapter and scanned,speakers right beside the adapter, show all not only audio. Not a single device found (there should be plenty).

      Any idea what I’m doing wrong? Could find any information regarding the Sendspin Bluetooth Bridge and Bluetooth proxies online.

      • batmaniam@lemmy.worldOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        18 hours ago

        I don’t know if I can help, as I’m having different issues, I’m not clear how to get Sendspin bluetooth bridge running.

        I flashed an ESP32-C as a proxy, and verified it’s working as I got all sorts of notifications to adds for various devices that had BT next to other connective options and I was using the other one.

        I did read somewhere that BT proxy may not be able to pick up audio devices, but I can’t seem to find that now and it didn’t seem that definitive.

        You wouldn’t happen to have any tips on how I’d go about setting it up on Unraid would you? Unraid was a great way to get started, but the downside is it leaves you unfamiliar with how to do docker composes, and there’s not one in their app portal for sendspin bt-bridge.

        • Ravi@feddit.org
          link
          fedilink
          English
          arrow-up
          1
          ·
          17 hours ago

          Sadly I don’t have any experience with Unraid. But I’m familiar with docker and docker compose.

          You have a few options on how to install Sendspin Bt Bridge.

          1. As I did directly in GA. Open the marketplace (or hacs if you haven’t updated). Search for Sendspin Bluetooth Bridge, hit install and done. If your HA is running on the Unraid, I’d probably go with this.

          2. Via docker or docker compose. Depending on what is available on Unraid you can either run a container directly or start it with docker compose. I found a Unraid docker compose plugin, but can’t test it.

          If you can run generic docker containers (with or without compose) you can follow the official documentation.

          If you can’t, maybe it’s possible to start a generic linux virtual machine, install docker on it and start the docker container from within.

          • batmaniam@lemmy.worldOP
            link
            fedilink
            English
            arrow-up
            2
            ·
            13 hours ago

            Ok so I feel dumb. I did manage to get that running via market place (From within HA like you said), but I’m not clear on how to configure. I’m not clear on what the “host” is and figured I needed another process running (like with matter), which is why I was asking about doing it via docker/unraid. Is the host Music Assistant? Home Assistant? I tried pointing it at music assistant (IP and port) but it rejected the token.

            • Ravi@feddit.org
              link
              fedilink
              English
              arrow-up
              2
              ·
              12 hours ago

              Don’t worry, the setup seems rather complicated. Especially since bt doesn’t work as we are used to from pcs and phones. You’re almost as far as I am.

              1. Go into Music Assistant
              2. Open settings -> Users and click on the three dots beside your name
              3. Manage Access tokens, create a long lived one and copy it
              4. Open the bridge addon
              5. Insert your token in the MA config there and try to connect
              6. If it doesn’t work, try changing the port to 8095 (this was my default) you may also get the right port from the MA config

              After that you are exactly where I stand

              • batmaniam@lemmy.worldOP
                link
                fedilink
                English
                arrow-up
                1
                ·
                11 hours ago

                Thank you! It looks like the documentation is lagging behind a few updates. I followed those steps, but I am getting a “token rejected - make sure it was just minted and not revoked”.

                • I confirmed that I made the token and it is unique (I named it Spinbridge)
                • I tried port 8095 (also the port default for MA for me).
                • Interestingly, I also tried 8080 and got the same result

                May I ask what you put into the “host” field? Is it just the IP address for the server (that has HA and MA on it in my case)? Do you include the port number even though it asks for it next? This is the part that lead me to believe it was a separate service. Thanks for the help, if I can “catch up” maybe I can help crack the bluetooth adapter issue, as my BT proxy is defnitley doing something.

                • Ravi@feddit.org
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  3 hours ago

                  Yeah, I also found some snippets with yaml config in the docs, which seem to have a config UI now.

                  My host is set to “auto”. If this doesn’t work, I’d try the IP of your HA server or localhost or 127.0.0.1 and see if anything works.

    • batmaniam@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 days ago

      You are AWESOME.

      Even if it doesn’t play out just like that, getting some confirmation on gameplan and the sendspin tip off is awesome.

      I’m planning on doing a write up when I’m done for anyone else curious. Everyone’s been so helpful in this community!

  • susieq0044@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    4 days ago

    Actually, I live in Switzerland and this reminds of my brother in law. He had a subwoofer, Alexa, aQA, brimsolvr and a full tuner with wrangle tootsies, all connected through Citrix tunneling and boon-vpn to the internet. One day he calls me? Keeps hearing voices, day and night, even if the system is off. Chinese, apparently, I recorded a couple of fragments: 他们又在做爱吗?打开摄像头。我们需要他银行账户的密码

    • batmaniam@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      4 days ago

      Well if he bought it from China that makes sense. All audio equipment works with a choir of gremlins that sing whatever you want to listen to on command. If the system was from China it makes sense they’d be Chinese. They were just talking quietly with each other on their off time.