Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

2024.8 Linkplay in core #150

Open
pergolafabio opened this issue Aug 1, 2024 · 31 comments
Open

2024.8 Linkplay in core #150

pergolafabio opened this issue Aug 1, 2024 · 31 comments

Comments

@pergolafabio
Copy link

Seems LinkPlay will be an official core integration soon
So this HACS is not necessary anymore?

https://rc.home-assistant.io/integrations/linkplay/

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 1, 2024

Oh wow, finally! I can deprecate this as soon as it will be released.

@Thrasher2020
Copy link

I tried using it - there's nowhere to actually configure it like the yaml version.

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 2, 2024

It's autodetected. No need for YAMLs.
It's also pretty generic, eg. can't change the input source names.

@pergolafabio
Copy link
Author

Yeah, probably more PR are coming to make it better...

@Thrasher2020
Copy link

Exactly. Mine is pretty heavily configured via yaml for icecast, LastFM and lots of sources etc. This new one doesn't allow for any of that so I think I'll stick with the HACS version :)

@pergolafabio
Copy link
Author

Yeah, probably more PR are coming to make it better...

@pergolafabio
Copy link
Author

maybe @nagyrobi can give a help to the core team about improving it? :-)

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 2, 2024

From now, the linkplay custom component for Home Assistant is deprecated, and unsupported! Starting with Home Assistant 2024.08 release, Linkplay chipset based media players are officially supported without the need of any custom component.

To switch to the official LinkPlay integration starting from 2024.08, follow these steps:

  • Remove tle current linkplay configuration from your configuration.yaml.
  • Restart Home-Assistant.
  • Delete the custom component through HACS or manually by deleting the custom_components/linkplay folder.
  • Restart Home-Assistant again. Your players will be automatically discovered, a notification popup will inform you on this.

For any bugs and feature requests, please use the official Home Assistant channels.

@pergolafabio
Copy link
Author

that was quick :-)

@pergolafabio
Copy link
Author

anyway, thnx a lot for this custom, i really enjoyed it!!

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 2, 2024

When I took this over from @Limych, in 2020, Home Assitant codebase was much more simpler and easier to understand. Over time, it grew to be so overcomplicated and abstracted that I simply couldn't keep up as an amateur programmer. Tried to watch the way other built-in media players codebase evolves, but from a point on I had to give up.

My personal opinion is that certain aspects of the development are not going the best way but then again, what do I know.

Additionally, I got a bit frustrated about the way certain Linkplays call home to third party servers, so I really like the news shared in #142, which would require a completely new integration/component anyway.

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 2, 2024

maybe @nagyrobi can give a help to the core team about improving it? :-)

Already found a bug, reported it, and they fixed it.

@pergolafabio
Copy link
Author

glad you are helping already, good job!
lets hope it gets merged in the beta, before it gets out :-)

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 2, 2024

Meanwhile everybody who wants to see their devices autodetected by brand and model in HA, please make a PR, based on the project field seen in /httpapi.asp?command=getStatusEx, by adding to the file homeassistant/components/linkplay/utils.py.

For example I added some Arylics I know in home-assistant/core#123056

nagyrobi referenced this issue in home-assistant/core Aug 7, 2024
* Add some LinkPlay models

* Update utils.py

* Update utils.py

* Update utils.py

* Update homeassistant/components/linkplay/utils.py

* Update homeassistant/components/linkplay/utils.py

* Update utils.py

---------

Co-authored-by: Joost Lekkerkerker <joostlek@outlook.com>
@pergolafabio
Copy link
Author

hey @nagyrobi , just tested the new core, but with yours custom, i used this service:

                  action: call-service
                  service: linkplay.preset
                  service_data:
                    entity_id: media_player.luidspreker_buiten
                    preset: 1

any idea if thats possible too to play presets?

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 8, 2024

Don't think so. Make a Feature Request in HA core.

@pergolafabio
Copy link
Author

seems also this one doesnt work?

                  action: call-service
                  service: media_player.play_media
                  service_data:
                    entity_id: media_player.luidspreker_buiten
                    media_content_id: 'http://opml.radiotime.com/Tune.ashx?id=s10861'
                    media_content_type: url

any idea how the new format will be?

thnx!

@pergolafabio
Copy link
Author

done

home-assistant/core#123372

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 8, 2024

any idea how the new format will be?

It will be the way the developer who makes it, wants to...

@pergolafabio

This comment was marked as spam.

@nagyrobi
Copy link
Owner

nagyrobi commented Aug 8, 2024

Please don't spam with the same message in multiple places.

@saschaludwig
Copy link

Sad to see something so useful being discontinued.

I made excessive use of multi-room audio and

  sources: {}
  common_sources: !include linkplay-common-sources.yaml

with over 150 items in it.
The new integration isn't close to anything you created with the HACS version.
I'll guess I have to stick some more months/years with your version.
Thanks for all your effort!

@nagyrobi
Copy link
Owner

I don't see the good principle behind this kind of software development. Release unfinished products...

@saschaludwig
Copy link

Someone started a feature-request thread over here:
https://community.home-assistant.io/t/core-linkplay-integration/757985
Please feel free to comment and upvote :-)

@pergolafabio
Copy link
Author

hey @nagyrobi , since linkplay is now in core, i have setup it once, but since its limited, i deleted the integration and start using your custom again...
But now the log file is flooded with messages like below, i think the custom is conflicting with the core, is there a way to solve it? maybe by renaming something?

2024-08-26 17:33:19.443 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2869, in _load_integration
    await integration.async_get_platform("config_flow")
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1100, in async_get_platform
    platforms = await self.async_get_platforms((platform_name,))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1116, in async_get_platforms
    if platform := self._get_platform_cached_or_raise(platform_name):
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1207, in _get_platform_cached_or_raise
    raise ModuleNotFoundError(
ModuleNotFoundError: Platform linkplay.config_flow not found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 108, in _async_start
    await gather_with_limited_concurrency(FLOW_INIT_LIMIT, *init_coros)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 106, in gather_with_limited_concurrency
    return await gather(
           ^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 104, in sem_task
    return await task
           ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1293, in async_init
    flow, result = await self._async_init(flow_id, handler, context, data)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1313, in _async_init
    flow = await self.async_create_flow(handler, context=context, data=data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1449, in async_create_flow
    handler = await _async_get_flow_handler(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2890, in _async_get_flow_handler
    await _load_integration(hass, domain, hass_config)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2876, in _load_integration
    raise data_entry_flow.UnknownHandler from err
homeassistant.data_entry_flow.UnknownHandler

@pergolafabio
Copy link
Author

if i delete the yaml, and restart HA, i see below error:

2024-08-26 20:34:46.575 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2869, in _load_integration
    await integration.async_get_platform("config_flow")
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1100, in async_get_platform
    platforms = await self.async_get_platforms((platform_name,))
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1177, in async_get_platforms
    import_future.result()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1147, in async_get_platforms
    await self.hass.async_add_import_executor_job(
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1090, in _load_platforms
    platform_name: self._load_platform(platform_name)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _load_platform
    cache[full_name] = self._import_platform(platform_name)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1296, in _import_platform
    return importlib.import_module(f"{self.pkg_path}.{platform_name}")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 200, in protected_loop_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'custom_components.linkplay.config_flow'

@nagyrobi
Copy link
Owner

No clue sorry. I use the integration in core.
You should complain in HA support channels.

@pergolafabio
Copy link
Author

Can you use the media_play service to send online m3u files for example to it? I never succeed doing that...

@nagyrobi
Copy link
Owner

I only use linkplay integration to control volume nowdays...that works....

@ireun
Copy link

ireun commented Aug 31, 2024

Official integration for Wiim Pro Plus shows me "Failed to conntect"

@nagyrobi
Copy link
Owner

Not here to report...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants