Thanks. That is totally cool, also with the events.
You just changed my plans for the weekend
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
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…
Two things
- Is Stage on a different network so that the mdns zeroconf packet doesn’t go through?
- 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 thescrape
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. - 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
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.
- 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.
-
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…
-
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 . 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
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 )
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
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.
Although the differences may seem minor, it’s a completely different API that the new products are using. However, a new HA component is being worked on
Thanks CMDK, that’s really useful to know. I’m currently writing software to repurpose my beosound 5 as a remote control (with similar functionality to the b&o app, or the halo) so it sounds like I’ll need to do some reverse engineering of the mozart api too then…
hey there, that’s great to know. It would be amazing to see if we can combine the components so that users don’t need to select one.
By coincidence, just before you sent this message, I found (albeit via a B&O expert) how I changed the sound settings per source after I had been looking for the solution for ages (pffff). Per “Source” you can just select a default Speaker group. I have done this for TuneIn and Bluetooth (from Core) and it works fine, even the day after… For Spotify, which appears into the source list as well, I was able to set the default Speaker group. However, I haven’t tested after turning off the TV if this setting is still remembered. I supposed so, but I’m hesitating now with your presented solution. Unfortunately, I’m not anymore in my holiday home anymore as it’s rented out.
Indeed you are right that it is better that the basic system (B&O) does what it is supposed to do and then only automate things further if necessary with HA.
By the way…
It sound like, you are a B&O expert as well and this question should be on the B&O forum but though I would like to ask here to you…
The BeoVision Avant is normally presented in grey at the Multiroom function within the B&O app, instead of black. It’s in standby mode and this really happens pretty quick, for instance even when the music is stopped.
Do you know how to wake up this much quicker? It takes now about more than 10 seconds, which is when you have to wait, quit long. And I cannot explain to a renter. Also if the renter touch twice the + within Multiroom, it seems that the join function is disabled again and as a result no multiroom is activated at all…
I have removed all ECO settings. I have enabled quick start timer between 8 am and 11 pm. Wake on WLAN off… no idea to do more…
Why does it loos it’s join ih Multiroom when the playlist for instance has ended?
Any experience? Or should HA comes in here…
thx
A little off topic for this forum, so I’ll mail you directly in response to your other questions, but just to clarify my suggestion above as it related to what you were doing with HA:
It sounds like your core is configured as an ‘integrated setup’ with your Avant and doesn’t have any speakers of it’s own directly connected to the core? in which case it’s sources will show up in the sources menu of the TV and you can can indeed assign a speaker group to them directly, and this will be retained even after being powered off and back on.
If instead the core was in different room to the Avant, and had it’s own set of speakers, and you were pressing ‘join’ on the avant to join in with what the core was already playing, then that is the scenario where my suggested workaround is helpful, as there is nowhere to configure the default speaker group for ‘join’. It will always use the default startup speaker group so it usually makes sense to configure this group for however you usually listen to music (usually with one or more front left and front right roles, and no centre roles), and then create new speaker groups for other sources where you want something different (and assign those to the sources you are able to configure in the Avant’s menus)
I am new and excited about HA and one of the first things I wanted to try is to get my Beosound Balance working. Unfortunately I failed at everything I read and tried here. My concern is that the Beosound Balance can’t be connected at all because I can not get anything out of this:
curl -H "Content-Type: application/json" -X GET http://192.168.86.95:8080/BeoZone/Zone/Sound/SpeakerGroup
curl: (7) Failed to connect to 192.168.86.95 port 8080: Connection refused
I should be able to connect to my speaker via port 8080 in order to be able to integrate it into HA, right?
Beosound Balance and the other new “Mozart-based” products use a completely different API. I think a new custom component will be ready quite soon