Multiroom via bluetooth in a smart home

Today, my multimedia server, which I use to play music, stopped responding. I made a multiroom system that allows you to play music on different speakers in different rooms. Initially, I planned to do this by analogy with Wi-Fi speakers, that is, not to transmit a signal via Bluetooth or wire, but simply have some kind of Wi-Fi device that can directly connect either to audio streaming or directly to some online stations or servers.

At first I tried to do this on a Raspberry, there is an audio output on it, this is a mini jack, and in principle, of course, they say that the sound is not very good and it is really quite bad, but if you listen to not very high-quality acoustics and do not turn the volume to the maximum on this output, then in principle there is not much interference and it is quite possible use it. I made it so that I just have a player running on this Raspberry, I use a player called MPD, this is an audio server that is installed on a MiniPD and then this server can either play the stream or transmit this information to some other devices, for example, output in this case to a minijack.

From this output, I had a small JBL speaker connected to the speaker, it worked in always-on mode and it was through Aux that the signal was transmitted to the speaker, that is, I did not use a Bluetooth connection because the speaker has such an input. I used it for a while, in principle, everything worked pretty well for me, the JBL speaker itself does not sound strong enough, and because of this, it was possible not to turn off the connection itself and the speaker itself, and at night, for example, it does not interfere.

But you can't put each speaker in another room and run wires from this server and Aux into it, in fact, there's only one other option, I tried it, it used an HDMI output, there's a special splitter that can divide sound into video and stereo audio, in principle, it's also an interesting solution, a lot of noise is obtained, and of course I didn't use it because I need to turn it off all the time, every night, it's inconvenient.

I used it to make voice alerts in the first place, but of course I listened to music the second time.

Further, when I was developing, I chose another option, it was to buy an amplifier, also with an AUX input, this amplifier supported Bluetooth and, accordingly, could be connected by wire, the solution was not bad, the amplifier itself was loud enough, connected large speakers and they work without much load, that is, there is no overload, the power supply can be used any one, that is, it is practically from 5 volts to 19 Volts or even more, but it is recommended to use some kind of powerful power supply, I use a 19 volt power supply from an old laptop., in principle, it can normally play very loudly on large speakers, and the amplifier itself does not actually heat up, and it does not even have any passive radiators for cooling.

But there was a problem with such an amplifier, even if the AUX port is not connected, there are still noises, there are leads to this input, and the amplifier is constantly making noise on the speakers, so I had to turn off this amplifier at night, of course it didn't suit me, I then made such a connection, I connect to this amplifier by default Bluetooth, there is such a possibility, for example, Raspberry or I am currently using another server, I made this multimedia server based on the Orange mini-PC, it has built-in Bluetooth and, accordingly, it can be made so that this server can connect to a Bluetooth speaker, there is a way to automatically switch different Bluetooth devices, that is, it is not necessary to do it manually, and I do it this way when I press a certain button, for example, or give a certain command, a certain Bluetooth amplifier turns on, to which the server starts transmitting music, but the original teacher I used had an AUX input. and because of this, of course, there was a lot of interference, even when I connected via Bluetooth, everything was fine during Bluetooth operation, but as soon as I disconnected from the amplifier, there was interference on the speakers again, therefore, I bought another amplifier, it turned out to be even cheaper and more compact, it is made on the same chip for sound amplification, in principle, the power parameters are almost the same, but it only works via Bluetooth, it does not have a separate analog input, and of course it turned out to be a big plus that this amplifier is basically not bad and it connects to the media server very quickly and, accordingly, when broadcasting, it does not have any interference at all, because the first signal will have to be completely digital via Bluetooth, and even when Bluetooth is turned off or nothing is being broadcast, there is no noise at all. Now my speakers are constantly on and it absolutely does not interfere with sleep at night and in general they are not even audible at all.

I didn't like this topic, I bought a few more amplifiers, the cost is very low, only 300 rubles, but it can pump very large speakers, it all depends on the power supply, I have made it so that in one room I even have two such amplifiers, they are connected for two different pairs of speakers and in general they are powered directly from a single power supply, which is quite enough for them, because they work alternately. In another room, I have the same amplifier set up, it's connected to a small power supply, it's generally a 5 volt unit, and that's enough for him too, I used simpler speakers there, but of course I use less volume, but in general it doesn't affect anything, it doesn't affect the sound quality at all.

The broadcasting range itself is basically not bad, I have about 5 meters to the speaker, to the amplifier itself, from the server, the server is not in a shielded case, just in a plastic one, and the built-in Bluetooth adapter is used, in principle, even in such conditions it catches quite well and very rarely interference occurs. Interference more often occurs from the fact that, for example, a Wi-Fi router is used at full power, and then, of course, it starts interfering at 2.4 Ghz in parallel, they used to stand closer to me and they interfered a lot and sometimes the music disappeared, but now they are a little scattered around the room and because of this, in principle, no special problems Not anymore.

I also tried connecting to Yandex speakers, they also have Bluetooth mode, and initially when I tried to connect, I even found out that the speaker can work in Bluetooth mode, it is not necessary to translate it by voice, the server could connect to it itself and even simultaneously broadcast music via Bluetooth and the speaker could still play music itself. both the sound and the voice assistant also worked without any problems, but with some kind of regular update, Yandex broke this function and of course now it doesn't work, even when you tell the speakers to turn on Bluetooth, even in this mode, the server sees this speaker, but it cannot connect to it, an error is issued and now this function does not work, but it would certainly be interesting to use Yandex speakers too for broadcasting from your server.

I have made it so that his music is saved on the smart home server, there is a folder with files, but I also use a connection to external Internet radio stations, and I also listen to music from there, but I made it so that the multimedia server itself does not connect directly, I raised a separate streaming audio server, which, if necessary, connects either to one radio station. the other one can either scroll through music from a local disk on the server and thus , for example , when switching to different rooms , the music continues to play and I can , for example , either script, when I go to the balcony, for example, and I have a speaker there, I can either run the script or it starts automatically, after that music starts playing on my balcony, if I leave there, another script is triggered and the music switches, for example, to the bedroom or to another room.

I tried to transmit to several amplifiers at the same time, but the technology itself does not allow it to be done very smoothly, that is, in principle, everything is connected and everything works, but there is apparently a problem with broadcasting and sometimes music is interrupted on one or the other speaker when it is broadcast on both at once.

And I also made the control so that if, for example, I say to a Yandex speaker, turn on such and such a channel, let's say turn on chilhouse or turn on chillout or turn on music, then it automatically starts this server and starts broadcasting from it to a certain speaker in a certain room.

Automation in a smart home should be useful and create additional comfort, but sometimes everything goes wrong… The reasons for this, and how to configure everything, see on my channel.

You may also watch

Article By Alex

If you have any ideas on how to improve automation, make it more reliable, fast and useful, then you can leave a comment below. I will try to implement the proposals and tell you in the following videos.