LinkPlay Integration

Hello, how can I add a functionality, when I trigger nabucasa.tts engine, and when it plays the TTS, to return autoamtically to radio station?
I tried announce tag but it doesn’t work.
Im currently use snapshot media_player, but I want to skip that, and to leave it for linkplay to do it a job for me

Hi @Kamil-u , I’ve now reached a point where there is some basic functionality appearing in the ‘Mini Media Player’ Lovelace card, but most of the functionality is not working. In addition most of the really useful functionality, such as changing the input source, doesn’t even appear to be accessible.

I have had a poke around using the http API and via that means the Arylic box appears to be responding as expected. My confusion now is, why does the LinkPlay integration mention “Fully compatible with Mini Media Player card for Lovelace UI by kalkih, including speaker group management.” when in my instance at least that doesn’t appear to be the case. Or am I still naively missing something in the set-up somewhere?

There sadly isn’t a media player card that fully supports the linkplay platform currently. Mini and maxi media player do work with some features, but no grouping etc. Although stated in the linkplay docs, the standard ‘media_player.join’ service also does not work.

I spent quite a lot of time to build a media player card myself for that reason. Problem is that the linkplay integration is quite buggy and weird for some things, so the cards yaml code got huge and full of custom helpers. But I’m currently trying to declutter that mess and am going to share the whole thing here soon, here’s a preview:

2 Likes

Can anyone assist with the H50 integration. I’m trying to get a button to change input sources. I run calls for media_player.select_source and choose HDMI, Bluetooth, etc but it doesn’t actually change them on the H50. Any suggestions on how I could achieve this?

Hi! I updated Home Assistant to 2024.5.0 and I get an error saying the linkplay integration couldn’t load properly. Anyone else having the same issue?

There was a new release - make sure your linkplay integration is up to date.

1 Like

Since the latest firmware update (4.6.415145.55) on my Arylic A50+, I’ve been experiencing issues with selecting the source using automation. Oddly, when I manually select the source (optical) from the dashboard, it works fine. However, when I create an automation to switch the source to optical, it doesn’t work. Has anyone else encountered this issue?

Configuration:

- platform: linkplay
    host: 192.168.1.30
    name: "Woonkamer Linkplay"
    uuid: 'FF31F09EACCEED3E0B6B51B6'
    volume_step: 10
    icecast_metadata: 'StationNameSongTitle'
    multiroom_wifidirect: False
    sources: 
      {
        'optical': 'TV',
        'line-in': 'Platenspeler',
        'bluetooth': 'Bluetooth',
      }
    common_sources: !include linkplay-radio-sources.yaml

Automation:

alias: Audio bij Apple TV
trigger:
  - platform: state
    entity_id:
      - media_player.woonkamer_appletv
    to: null
condition: []
action:
  - choose:
      - conditions:
          - condition: state
            entity_id: media_player.woonkamer_appletv
            state: playing
        sequence:
          - service: linkplay.unjoin
            metadata: {}
            data:
              entity_id: media_player.woonkamer_linkplay
          - service: media_player.select_source
            metadata: {}
            data:
              source: TV
            target:
              entity_id: media_player.woonkamer_linkplay
mode: single

When the automation changes the source according to the status-viewer in developer-tools the input is changed to “TV”, but there is nu sound. Also the LED indicator in de Arylic turns to white instead of purpel.

When selecting “TV” input from the dashboard everything works fine.

Yes. Up to date your linkplay integration.

"Logger: homeassistant.setup
Source: setup.py:481
First occurred: 12:50:42 (2 occurrences)
Last logged: 12:50:42

Unable to prepare setup for platform ‘linkplay.media_player’: Unable to set up component."

I have the same error in logs but it does nothing to interfere with device.

Failed communicating with LinkPlayDevice (httpapi) 'Arylic': <class 'aiohttp.client_exceptions.ClientConnectorError'>
Failed communicating with LinkPlayDevice (httpapi) 'Arylic': <class 'TimeoutError'>

I’m using Mini Media Player and it works just great.

Maybe You have some typo in config.yaml?

Hi all,

Not sure whether this is too off-topic but I couldn’t see an obvious place to post it.

I recently bought a WiiM Pro and am generally very happy with it. I want to use it with HA and it’s a Linkplay device so I’ve been following this thread as well as looking at various third party integrations (plus this PR to get a Linkplay integration added to core!).

This all looks very promising but all of the integrations I’ve seen seem to poll using the Linkplay API rather than subscribing to UPnP events - which should be preferable for both the device and for HA. (This comment from the author of the WiiM fork of the Linkplay integration gives the impression that these devices don’t cope well with frequent polling.)

So it has been bugging me that the standard HA UPnP integration doesn’t seem to work with my WiiM Pro. I’ve taken a closer look and realised that it is a due to what looks like a bug in the WiiM. The events that it sends back to HA are not formatted correctly.

TL:DR → In a nutshell, the upnp:class property should be inside the item object in the DIDL-Lite xml in the state_variables in the event message. Unfortunately it seems to be in the wrong place - or at least not where the didl_lite python package expects it to be.

I’ve made a small but very nasty hack to didl_lite.py in my HA installation and the HA integration now works perfectly:

I have raised his as an issue with WiiM support and there is a precedent for them fixing UPnP message issues so I’m hoping that this will just be sorted out in time. However, if it drags on then I might think a bit more about workarounds.

I’m interested to understand whether this issue affects Linkplay products other than WiiM. Does the core UPnP integration work for other devices?

Anyway, FYI.

@Kamil-u

I had the same problem. After a HA reboot the arylic up2stream is working again.

Looks great, can you share the code? Thank you very much. Tom

Hi all,

I have recently reported an issue with Music Assistant, where the progress bar of a track is not working properly: the progress bar resets after two seconds and starts over again.

Those developers have looked into the topic, and they assume an issue with the Linkplay-based player that is provided from Home Assistant into Music Assistant.

Is there anything that can be done on Home Assistant side to fix behavior?

Thank you.

Best regards,
Marcus

Sure, I’m going to post it here in a few weeks when I’m back home. I’ve put so much time and effort into that media card that I’m really looking forward to finally share it with others :slight_smile:

it’s strange that you didn’t find the grouping in the mini media player. Clicking the button opens a extended menu for this
image

Although I myself use separate scripts to control the multiroom that run with both buttons and voice control. It’s more universal.
And any missing commands can be implemented through restapi

I had found this grouping feature, but unfortunately it does not work reliably with the linkplay platform in my experience (it does work perfectly with media players which support the default ha grouping, though). Since I have often read from other linkplay users that they have the same problem, I suspect it is because of some problem with the mini media player card itself. After trying for a while, I gave up and solved this with scripts.

I last tested it about half a year ago, so it may well be that the problem has been fixed in the meantime. Does grouping work reliably for you with the mini media player?