BeoLink (Bang & Olufsen)

I think we fixed that a few weeks ago. Try re-installing from the GitHub archive.

Sorry, I actually thought I had the newest version, but I can see it’s the exact same changes mbolo has done as myself :smiley:

Hi @g.iac

Feature request: :blush:

I’ve noticed that my Beoplay M3 sends a notification every time it recieves a command from my Beoremote One. It would be awesome to have an event similar to what you have done in your mlgw integration (mlgw.MLGW_telegram) so remote commands can be used in automations.

Thanks for the good work!

Br
Jesper

Interesting idea. Thanks for suggesting. Will add it to the backlog.

Hey just so that you know, I made some improvements to the code to avoid random duplicative discovery if the integration is already installed.

1 Like

Hi @g.iac Do you have some examples on how to use the join/leave functionality?

And also +1 for the Beoremote one command catchers. I’m lacking the ability to control my ligths (IHC) as it was possible with Beo4, so that could be an alternative instead of buying a Beoliving inteligence.

1 Like

So, I did implement the remote control catchers.

Just listen to the beoplay_notification events. You need the latest code from the GitHub for this (2021.12.1)

For Join Leave you can use the service call. There was a bug until last week in the code that made it fail. Now it works. Something like this

Thanks. That is totally cool, also with the events.
You just changed my plans for the weekend :smiley:

1 Like

Note that in my experience not all remote buttons are reported by the speaker, so your mileage may vary. let me know how it goes!

Dear @g.iac !
Thanks for this great add-on.
I have an Avant 55 and connected with it a pair of Beolab 20. To play music I use the Avant 55 by selecting “Speaker group” in the B&O app. Is it correct the selection of “Speaker group” is not yet support in HA yet?
For other users in the house the B&O app is a bit difficult. The selection of the correct speaker group is very important, but difficult to find. It’s a bit hidden. Therefore it would be great if it could be integrated into HA.

I have created a few groups, like “TV speakers”, “Dining Beolab 20” and “Living All Speakers” which I would like to select from HA.

Another question about the Avant 55: I can add it as a Speaker (for my BeoLab 20), but I could also add it into HA as a TV. Is this probably the mistake? I don’t see any difference after integrating.

The zeroconf works great, however the product BeoSound Stage is not found automatically. Any idea why not? It’s quite a modern device… I added manually by typing in the IP address (which cannot be fixed somehow by the setting in B&O, but made it static via my router). Is this all correct?

Thanks for your reply.

To get a list of speakergroups:
GET http://192.168.40.8:8080/BeoZone/Zone/Sound/SpeakerGroup

To activate a speakergroup:
PUT http://192.168.40.8:8080/BeoZone/Zone/Sound/SpeakerGroup/Active
Body: { "active": 1 }
Header: Content-Type: application/json

1 Like

The GET is working in the webbrowser:
{“speakerGroup”:{“list”:[{“friendlyName”:“TV”,“id”:0,“digit”:0,“_links”:{“self”:{“href”:“./0”}}},{“friendlyName”:“DINING BEOLAB 20”,“id”:1,“digit”:1,“_capabilities”:{“editable”:[“friendlyName”]},“_links”:{“/relation/modify”:{“href”:“./1”},“self”:{“href”:“./1”}}},{“friendlyName”:“LIVING ALL SPEAKERS”,“id”:2,“digit”:2,“_capabilities”:{“editable”:[“friendlyName”]},“_links”:{“/relation/modify”:{“href”:“./2”},“self”:{“href”:“./2”}}}],“active”:1}}

Do I need to integrate the GET and PUT into HA? Where can I do this? Because this would help to set my default speaker to id 1 when using Beolab 20 (I suppose)?

Sorry, I’m not that profi yet… :wink:

Two things

  1. Is Stage on a different network so that the mdns zeroconf packet doesn’t go through?
  2. how to do PUT from HA here it explains how using the shell_command integration:
    How can I use curl from an automation?
    you can do GET with the scrape integration
    This seems like an interesting use case I might implement it in the future in beoplay. The current integration needs a major refactor though first.
  3. At the moment, no real difference between TV/Speaker / Converter… this is legacy code, I’ll figure out what to do it when we do refactor. Also the integration should know that information based on the type of device, it shouldn’t ask :slight_smile:

You should be able to insert this into your configuration-file (or under your rest_command: if you already have that set up):
https://www.pastiebin.com/61b826e9960d2

This should generate 3 new rest_command.xxxx entities that can activate your speaker group. Remember to change the IP address.

  1. The Stage is on the same network…

It’s pretty weird, I haven’t found something in the settings to give it a fixed IP address. Most of the other B&O product do have the ability. Nevertheless, via MAC address I gave it a static address in the Draytek router.

When doing the integration it’s not found at all. It’s found as a DLNA DMR devices though. Same happens with the B&O Core, it’s also found under DLNA DMR devices (and beoplay. So correct!). But an B&O Avant is not found as a DLNA DMR devices. Not really consistent. I don’t need DLNA DMR devices so I have disabled them. When typing the fixed IP address into your beoplay add-on things are fixed and going well.

  1. I will read this. So, basically you confirm it’s not implemented yet. Also the TV stand I suppose not… the latter is less important, just a gimmick…

  2. ok. Curious what the refactor means… as most things work. The “Speaker group” is in my situation quite relevant as with an automation I would like to switch Speaker group as every time I play different music it’s switching to it’s default (the first in the row, which is TV :sob:. When play music it should always select the Beolab 20).

Also HA should create by default a multiroom: the Core + Avant, as the Avant cannot play TuneIn for instance so all audio sources are streamed from the Core, via the multiroom function it’s going to Avant and the Avant should use the speaker group “Dining Beolab 20” which are connected with WiSa to the Avant.

Pffff, I’ve made it myself complicated :wink:

I think my objective should be achievable, or do you see any obstacle?

Another issue, it’s more asking for the proper approach to follow into HA:

I would like to make and automate a group of speakers, called in B&O app the “multiroom”. What is the best approach to accomplish this? I am reading at beoplay_join_experience: “a source must be playing already for Join to work”.

I’m not sure if this is the solution or right approach for me as I would like to have it created by default (via automation or so?). When people in my house (renters) have their own mobile with Spotify for instance, they can start streaming to the multiroom which has been created by HA (they are in the same network).

Do you recommend to install the mini media player for this or isn’t it necessary?

What would be the right path to follow?

thank @cklit !
I had to remove the dashes, but I have tested it within Developer Tools and I can call the services (and it changes the speaker :grinning:)

:+1: :+1: :+1:

I created an automation, when a media track changes it switches to the BeoLab 20, and it works fine ;-):

id: '1639495396270'
alias: Turn on BeoLab 20
description: When music source is changed, set Avant to BeoLab 20 speaker
trigger:
  - platform: state
    entity_id: media_player.beosound_core
    attribute: media_track
condition: []
action:
  - service: rest_command.bo_speaker_group_dining_beolab20
mode: single
1 Like

Nice that you could do the trick!

Beoplay needs refactor because there is a lot of bad design choices in the code. And i will add access to the functions you mentioned (speaker groups…)

G.

You can actually configure the Avant to use a specific speaker group for each source - the exception to this is for joined / borrowed sources such as your core which will always use the startup speaker group as there is nowhere to configure these sources explicitly, but there is a solution:

The workaround for this limitation would be to create a new speaker group which is a clone of your current startup group and set each of the inbuilt video sources to use this, then modify the startup group to be a replica of your beolab 20 speaker group. Effectively you are then making the beolab 20’s the default, and setting any sources where you want something different to use an alternative speaker group.

Given you have already achieved what you want via HA you might be happy to leave things as they are, but just thought I’d suggest an alternative.

Kind regards,
Martin.

I think I added the device type to marton’s original code (with a default defined so that it didn’t break interaction between different versions of the beoplay-custom-component and ha-beoplay) as I needed a way to handle some of the control differences between the product types.

This was a long time ago, and didn’t get around to pushing the rest of the code I wrote, and can’t seem to find it now anyway.

The device type is certainly not used in your code so I agree it should go.

On a related topic, the newer mozart based products (BeoSound Balance, Level, and Emerge, and the BeoLab 28) have recently received a firmware update to enable beolink multiroom on that platform, but there are a few minor differences to how this works compared to the older Audio Streaming Engine (ASE) products. I don’t currently own any of the mozart products, but I’ll try to borrow one when I have a little more time available to see if there are any changes needed to the beoplay api to support these.