LinkPlay Integration

It should only fail once or twice when a speaker changes from “standalone” mode to slave mode. How often do you see this error in the log?

EDIT: The reason why it fails is that the speaker gets a new IP when it goes into slave mode and thus can’t be reached any longer on the IP provided in the HA configuration. As soon as the component detects that the device is in slave mode it stops trying to reach the speaker via it’s configured IP and the errors should stop…

Could you try to upgrade to the latest version of the component and make sure that the devicename parameter in the HA configuration matches exactly the name of the device as specified in the iOS/Android companion app?

Updated to last version.

Used:

“media_player.linkplay_connect_multiroom”

with service data:

{
“entity_id”: “alb”,
“master_id”: “albastru”
}

configuration.yaml:

  • platform: linkplay
    host: 192.168.0.151
    devicename: albastru
    name: albastru

  • platform: linkplay
    host: 192.168.0.152
    devicename: alb
    name: alb

The log:

Entity ID alb is an invalid entity id for dictionary value @ data[‘entity_id’]
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/components/websocket_api/commands.py”, line 122, in handle_call_service
connection.context(msg))
File “/usr/local/lib/python3.7/site-packages/homeassistant/core.py”, line 1118, in async_call
processed_data = handler.schema(service_data)
File “/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py”, line 267, in call
return self._compiled(, data)
File “/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py”, line 589, in validate_dict
return base_validate(path, iteritems(data), out)
File “/usr/local/lib/python3.7/site-packages/voluptuous/schema_builder.py”, line 427, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: Entity ID alb is an invalid entity id for dictionary value @ data[‘entity_id’]

Hi, thanks for the custom component, it works very well.

I have a problem with TTS, or with the resume of streaming service after TTS.

I know that for Sonos there are 2 services that work in this situations that are media_player_sonos_snapshot which take a snapshot of the current status of the player and madia_player_sonos_restore which is used to restore the media player snapshot.
It’s possible to integrate this two services in Linkplay custom component?

Thanks.

1 Like

any thoughts on custom_updater?

1 Like

Hi, this great custom integration has stopped working with version 0.92
I’m not an expert, just curious, but maybe this is related: https://developers.home-assistant.io/blog/2019/04/12/new-integration-structure.html

Thank you very much!

1 Like

yes, thats needed now. several custom components gave up in 0.92

ok, create a file in the Linkplay folder named

__init__.py

leave it empty. Create a second file named manifest.json in that file enter this:

{
“domain”: “LinkPlay”,
“name”: “Home Assistant LinkPlay”,
“documentation”: “home-assistant/homeassistant/components/linkplay/media_player.py at post-88 · nicjo814/home-assistant · GitHub”,
“dependencies”: ,
“codeowners”: ,
“requirements”:
}

That will solve it.

1 Like

As I see, the author of this component — nicjo814 — for some reason has not been in touch for a long time and does not update the code.

Now, due to recent changes in HA, its code is already seriously outdated.

I propose to save this component by transferring its support into the hands of the community.

I created a separate repository for this component, transferred the latest version of the code to it, and also created different service files:

Including the code to support the ability to update the component via custom_updater.
To initiate tracking add this lines to you configuration.yaml file:

# Example configuration.yaml entry
custom_updater:
  track:
    - components
  component_urls:
    - https://raw.githubusercontent.com/Limych/media_player.linkplay/master/custom_components.json

I myself can’t hardly seriously support this component. Therefore I invite collaborators.
@Christian_Hollbjar, how about join this repository as collaborator?

1 Like

Yes, this is possible. But we need to make us own services to implement this functionality.

If my idea described above with the collective support of this component works, I think we will do it quickly.
I added an issue on this topic:

im no coder :slight_smile: im just a pretty good googler :slight_smile:

1 Like

It is a pity that you refuse. I one will be hard to maintain this component.

refuse? I cant code phyton, so what do you want me to colaborate with? What I posted above to fix the issue is already posted all over the forum, so did not “invent” anything… I can join as colaborator but i do not know what i can bring to the table…

I won’t be able to work very much on the component due to a combination of work load and family taking all my time. I hope you will be able to continue the development in some fashion.

Sorry, if not quite correctly put it. But the essence of this does not change: it will be difficult for me alone to maintain this component…

Thank you for everything you have already done.
Of course, the component will evolve. The only question is how fast…

https://www.patreon.com/posts/26532452

Hi!
The latest update and the latest hassio seams to be broken

Log Details (ERROR)
Mon Aug 12 2019 12:23:23 GMT+0200 (Central European Summer Time)
Update for media_player.koket fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 249, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 419, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/linkplay/media_player.py", line 766, in update
    self._update_from_id3()
  File "/config/custom_components/linkplay/media_player.py", line 658, in _update_from_id3
    import eyed3
  File "/usr/local/lib/python3.7/site-packages/eyed3/__init__.py", line 32, in <module>
    from .utils.log import log                                          # noqa: E402
  File "/usr/local/lib/python3.7/site-packages/eyed3/utils/__init__.py", line 27, in <module>
    import magic
  File "/usr/local/lib/python3.7/site-packages/magic.py", line 181, in <module>
    raise ImportError('failed to find libmagic.  Check your installation')
ImportError: failed to find libmagic.  Check your installation

For some reason your HA missing one library.

Got this response on discord:

add python-magic to the "requirements" in the manifest.json file for the CC.