Closed molly200 closed 2 years ago
I'm sorry you have such a bad experience. I have no idea what went wrong on your setup but that is definitely not how it is intended to work. I'm chiming @nagyrobi into this conversation as he is the maintainer of the Linkplay integration and working with me to get the best experience. Maybe he has a clue of what went wrong.
First of all I think it would be good if you remove the integration and cleanup all/any wrong media players left on your setup. Then install the latest version using HACS and test again.
You are right that MA creates a duplicate player however that is opt-in and due to the hard work of @nagyrobi that should not be needed for Linkplay players.
Once you have the basics up and running we're going to have a look at your other experiences. A few of the things you write above I don't understand and I think others might be bugs we have to solve.
Also I'm intrigued by this sentence "I found the instance under HA media to be more user friendly and more functional." That is strange because the default HA Media Browser is currently very, very limited als will also introduce some annoying errors and delays atm which will be fixed in next HA release. The frontend designed by me should feel more natural if you're used to controlling systems like Sonos, Spotify etc. but maybe you have so many other issues atm that the whole experience is ruined.
How many Linkplay devices you have?
Released for testing Linkplay component with preliminary MA support: https://github.com/nagyrobi/home-assistant-custom-components-linkplay/releases/tag/3.1.7
@marcelveldt Thanks for the quick feedback!
Regarding the "MA creates a duplicate player however that is opt-in ". Do you mean I should disable the creation of entities in HA? I have tried that in the earlier version of MA and although the player was playing the track there was no sound from the speakers.
As per the functionality, I was referring to the player's available options. The player under the MA menu did not list or open any of the controls available under the HA media instance. Maybe is just a glitch with the player integration. I will retest from scratch again.
@nagyrobi I currently have 5 wireless Linkplay speakers scattered around the home. BTW, great work on the integration! With the current HA changes, I experienced a lot of problems with my Linkplay integrations. Since moving the TTS under the HA media integration, my audio notifications automation is broken. Sometimes is working intermittently shortly after a reboot, then it completely stops. The Linkplay integration was working flawlessly for years with no problems. Now, depending on the HA task, my speakers are getting disconnected and only a reboot will solve the connections. As an example, playing media is less problematic than TTS tasks. I can tell that some of the under the hood workflow has changed. Sometimes HA can drive you crazy!
Regardless of my problems, I will try this again an provide feedback.
Thank you all for you hard work!
TTS can be still used from automations as before (but not with MA yet). The new way through mediabrowser is indeed stupid...
Look for errors in the logfile and post them if you find any. And use static IP addresses (or fixed DHCP leases) for your linkplay devices for best results.
As suggested, I've uninstalled the integration and started from scratch.
Initially, I had the DLNA digital media render integration on, which created additional players for the Linkplay speakers. So, I turned it off and deleted all the media player entities.
Updated Media Assistant, rebooted HA and reinstalled the integration. I will confirm the initial finding that during the installation, Media Assistant only presented me with one media player (the first HA player entity) an the "Music Providers" configuration menu, where I entered my mounted media server folder path. At this point there was no "Create media players for Music Assistant players in Home Assistant" toggle available.
After opening the configuration option, all the media players were listed in the first window. I deleted the undesirable players, turned off "Create media players for Music Assistant players in Home Assistant" and completed the installation. The installation created two Media Assistant instances, one under the HA sidebar and the second as a folder in the HA Media integration.
In addition, the integration also creates a number of entities of the local players with some hexadecimal and mass extensions (e.g. media_player.mass_samsung_tv, d278f340_f3faaf2e, etc). Some of the players were not selected during the configuration. Yet, it appears that these are automatically being added as entities.
Reconfiguring the integration after the first setup by either adding or removing entities or sources, appears to incrementally add more player entities in HA. When I try to delete some of them I’m having a hard time keeping track of them.
As a side note, deleting a player entity has some undesirable consequences. If the player deleted is added back the player is added as a device but it will no longer be listed/relisted in the Music Assistant interface. The only way I cold bring the player back was to delete the integration and reinstall it. At which point, starting from scratch every time is not a viable option.
Opening the sidebar Media Assistant interface, I can see that the integration is updating the media interface and waited for the task to complete. However, few minutes into it, the HA suddenly rebooted itself. Starting back with the Music Assistant interface, I noticed a small number of tracks, albums and artists were added into the database. Out of the thousands of tracks only about 160 were added. At this time there is no update of the media information. The players were correctly added under the “Players ” selection. Trying to play a track was working, but at a limited volume. The volume control does not respond at all. The volume window remains open until refreshing the screen. The player’s control options (power, shuffle and repeat mode) are missing.
The Music Assistant instance under the HA Media has a complete set of the control option. The volume is functional but limited to about 50%. There is no media information available (e.g. tracks, artists and albums).
Under the HA Media integration, the media player selection displays two instances of each player. Each set have different synchronization with each other and in relation to the players listed under the Media Assistant instance. Half of the players are synchronized with the players listed under the Media Assistant instance. The other half with the controls and media provided by the HA Media integration. However, when a track is started from Media Assistant instance the controls from the original HA media player seem to correctly synchronize with each other. If a track is started from the HA Media integration which is synchronized with Media Assistant the track selection changes accordingly, it starts playing the track but there is no sound.
@nagyrobi
To confirm, all my networked devices are configured with a static IP.
This is the error fond in the logs regarding Playlink “Logger: homeassistant.components.media_player Source: custom_components/linkplay/media_player.py:247 Integration: Media player (documentation, issues) First occurred: 12:46:26 (1 occurrences) Last logged: 12:46:26
Error while setting up linkplay platform for media_player Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform await asyncio.shield(task) File "/config/custom_components/linkplay/media_player.py", line 247, in async_setup_platform data = await response.json(content_type=None) File "/usr/local/lib/python3.9/site-packages/aiohttp/client_reqrep.py", line 1119, in json return loads(stripped.decode(encoding)) File "/usr/local/lib/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)”
d278f340_f3faaf2e
This is likely created by browser_mod integration. It creates a new media player for each new browser instance you start to use Lovelace with. https://github.com/thomasloven/hass-browser_mod#devices
Well, by the day end, the integration managed to create additional players which flooded the player selection in the HA Media integration. All players with mass extensions, the players with hexadecimal extensions and video players were now listed there.
The d278f340_f3faaf2e was just one example. Tried to test one track and it totally froze HA. Had to reboot and remove the MA.
Interestingly enough, I see no feedback from other users with remarks in the context of my problems. Makes me feel a bit stupid!
I've decided to give it a break after spending so much time on this integration.
Too bad, because I love the concept. I may give it another try in a few weeks!
If anything should change, I would suggest that the integration not automatically create players. It would be more user friendly, if the configuration would be done with the user's input from the start. I do have a number of video media players which are irrelevant to this integration. I see no reason for the players to be reinstalled as new entities in HA by the MA integration.
It also be nice if the initial configuration stay persistent and not change without user's permission.
Thank you for your time and effort!
I really have no idea what's going on with your setup, especially those players with hexadecimal prefixes. Music Assistant doesn't make up players on its own, that's for sure.
The endgoal is that there are no additional players needed at all and that the native HA core media players just detect the metadata from MA. Until that goal is reached we offer the additional players. For now that option is enabled by default just for the sake of user friendliness, except in your case something seems to go wild.
Remember that this project is still at beta stage so bad stuff might happen ;-)
I am planning on refactoring the config/setup process before the stable release in june. Idea is to better detect useable players for MA and have the creation of "mass players" opt-in. Keep an eye on the releasenotes if you want to try it again once that is done. I'd love to get some feedback from you if it works better then.
Thanks for the feedback on this! Yes, there is something going wrong with my configuration.
First, what I do not understand is how a number of 9 devices (players) have entities with the same device name from the selection list (i.e. 9 devices and 54 entities from which some of the entities are media players not related to the selected devices).
Secondly when I try to reconfigure, the new entities are now listed in the configuration and despite the initial setup, the configuration retains the old devices and entities and adds the new selected players. Shouldn't the configuration selection reset the devices and entities accordingly as per the user's input?
I'll wait for the June release and definitely provide feedback.
Have a nice day!
It should work exactly how you describe how you expect it to work. So it is super strange what is happening to your setup.
I'd like to better understand what happened. Are you willing to send me some screenshots and/or your configuration files ? This may be with discord private message or email.
Hello Marcel,
First, thank you for this integration. It has a lot of potential! However, after a number of installations, today was the first time that I managed to play a song from the local folder. With a few glitches, the installation is somewhat working after a couple of tries and reboots.
I'm running hassio in docker and the latest HA image. As players I'm using a number of Linkplay wireless speakers.
After installing the mass folder and rebooting the system, the integration shows up in the settings. At the first install I'm following the configuration flow which finds only one player entity. I complete the install and using the "Configure" options, will present me with my regular players and two other duplicate of each player (e.g. one player is a number of 16 characters, presumably player entities from the previous music-assistant installations and one copy of the player with a media_player_mass_xxxxx extenssion). Not sure why the latter is displayed, as these entities if selected, are not accepted by the configuration flow.
After choosing the desired player the integration creates one device for each player along with a large numbers of player entities (for me 105 duplicate players). In addition the integration creates an exact player name listed in the sidebar of the HA media integration.
After the installation, a sidebar "Music Assistant" menu is created and the integration finds my only test track file, located in the local folder. However, playing the one track multiple times, creates a number of duplicate tracks with the same name as the original. Changing the player under the same menu will also create a duplicate track file. The sound button is locked at 50% and is not functional. The "QUEUE' button creates additional track duplicate every time is being used. Trying to remove the tracks manually will remove one track but is doubles the amount of tracks listed. After moving around a bit, I ended-up with more than a 100 duplicated tracks.
Using the control buttons from the right bottom (QUEUE, speaker and player selection) multiple times will lock them open and it only reset by closing and reopening the window.
The multiplication of items (players and tracks) can be reset by removing the integration. However, the old player entities persist even after removing the integration.
I find that the selection of the players is very confusing and hard to understand how the integration functions due to the exact created player duplicates in HA. I am aware of the entity creation toggle under the configuration flow, but by turning it off will not play the track when selecting a player.
Also, the Music-assistant menu appears in the sidebar and under the HA media integration. Yet, these appear to have different functionality. I found the instance under HA media to be more user friendly and more functional.
Thanks for your attention and effort in creating this integration.
Mike