rudyberends / BeoLinkAudioServer.js

Implementation of the Loxone Audio Server using a Beolink backend
0 stars 0 forks source link

Reverse engineering the API #1

Open scottgerring opened 7 months ago

scottgerring commented 7 months ago

Hello! I've been hunting around for a way of bridging external audio players, decently, into Loxone. As far as I can see there is very little action in this space apart from mediaserver4home, which is quite complicated, difficult to get going, and seems to work with the older "music server" interface. Your repo here is the closest i've found to someone getting it going against the newer interface, and running it against my miniserver, it seems like it would work if I had the appropriate bang & olufsen equipment!

So, the questions:

Thanks!

Scott

rudyberends commented 7 months ago

The basic idea came from this package; https://github.com/mjesun/loxberry-music-server-gateway

You might be interested in this. However it emulates an older version of the audioserver (different ui).

There is a fork specifically for lms integration that does emulate the latest audioserver; https://github.com/Gagi2k/loxberry-music-server-gateway/tree/lms-integration.

There are also a couple of demo Loxone setups available on the internet which I used to reverse engineer the protocol.

I wrote this for personal use and I am probably the only user of this code, but it does run extremely well. I don't think you would be able to tell that it is not an original audioserver that is running in the background. It's also very stable.

How well it works for you depends on the options you have to control and monitor your SONOS devices. These B&O devices have the possibility to subscribe to a notification stream. This way you get all the updates from the player. If you have to poll your devices to get updates it would probably be less successful.

scottgerring commented 6 months ago

Hey @rudyberends thanks for taking the time to write back and to publish this! It is supremely helpful. I've started hacking away and hope to have something to show for it soon.

I don't suppose you have any captures of the conversations on the two different HTTP servers handy still?

These B&O devices have the possibility to subscribe to a notification stream. This way you get all the updates from the player. If you have to poll your devices to get updates it would probably be less successful.

The Sonos local API has a mechanism for this; you send a HTTP SUBSCRIBE to the speaker you're interested in, with a Callback header with your own HTTP endpoint in it, and it calls you back with status updates. It certainly works but it is a fairly unique solution to the problem!