core icon indicating copy to clipboard operation
core copied to clipboard

Linkplay speakers do not support tts

Open DaveK-Rocketmakers opened this issue 1 year ago • 8 comments

The problem

When attempting to send a tts say command to a linkplay media player, the media player goes silent. This is experience on a Jam based speaker.

What version of Home Assistant Core has the issue?

2024.8.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

linkplay

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

DaveK-Rocketmakers avatar Aug 15 '24 16:08 DaveK-Rocketmakers

Hey there @velleman, mind taking a look at this issue as it has been labeled with an integration (linkplay) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of linkplay can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign linkplay Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


linkplay documentation linkplay source (message by IssueLinks)

home-assistant[bot] avatar Aug 15 '24 16:08 home-assistant[bot]

same. I see home assistant in the 4stream 'playing' but very very silent ( no text to hear ) Did not work either with hacs linkplay... might device related ( i have arylic players )

b00tsie avatar Sep 02 '24 13:09 b00tsie

If it helps, it worked with this integration on a Jam Voice https://github.com/nagyrobi/home-assistant-custom-components-linkplay

override80 avatar Sep 05 '24 11:09 override80

I have the same issue. I have a Jam speaker that was working fine with piper and the old custom Linkplay component. Since it was deprecated by the owner, I installed the new Linkplay integration. Since then, I no longer have TTS announcements on my Jam speaker. I wonder, is this because the output is in .wav format?

MoridinTX avatar Sep 06 '24 10:09 MoridinTX

Some fixes went in 2024.9.1 that may have resolved your issue.

silamon avatar Sep 07 '24 07:09 silamon

Some fixes went in 2024.9.1 that may have resolved your issue.

I am still seeing this issue

dnikles avatar Oct 15 '24 10:10 dnikles

I have the same issue. I have a Jam speaker that was working fine with piper and the old custom Linkplay component. Since it was deprecated by the owner, I installed the new Linkplay integration. Since then, I no longer have TTS announcements on my Jam speaker. I wonder, is this because the output is in .wav format?

Can you share how you made it work on the old custome Linkplay component, did not get it to work there either.

b00tsie avatar Oct 15 '24 10:10 b00tsie

This issue is present on my wiim minis but not my wiim amps, so it seems to be hardware dependent

dnikles avatar Oct 15 '24 22:10 dnikles

I also have this problem on Ayrilic 50 and I can't solve it. Please help

fireman266 avatar Nov 10 '24 19:11 fireman266

This could be a better implementation for TTS? https://developer.arylic.com/httpapi/#play-notification-sound

"Play Notification Sound When this API is used, the device will lower current volume of playback (NETWORK or USB mode only), and play the url for notification sound. Normally used in condition for a door bell in home automation system."

what do you think?

christi-g avatar Jan 07 '25 15:01 christi-g

@christi-g: I've just done a bit more digging into that, there is a post on the Arylic forums that suggests the play notification sound does not support the use of HTTPS at all, which may make that challenging to implement. I was also hoping this would be possible, but not at the moment apparently.

Related to TTS not working on Linkplay speakers, I've done a bit more digging and have a few findings that may be of use to get this working. FWIW I'm using an Arylic board, but I believe the Linkplay implementation is generic.

  • I concur with other users, at present the TTS functionality does not work.
  • If I visit the status API endpoint on the Arylic and manually copy the home assistant URL to the TTS generated mp3 into a browser window, it works in my browser.
  • If I copy this URL and paste it into the setPlayerCmd:play:<url> API endpoint, it does not work.
  • If I replace the hostname in the URL with the IP Address of my HA host, the expected TTS audio plays! Great success!
  • Looking at the requests passing through my firewall, it appears these devices have some hard coded DNS configuration baked in. Even though my DHCP server pushes out the use of internal DNS servers, I still see requests going to both 8.8.8.8 and 8.8.4.4 on port 53 in the firewall logs.
  • I've attempted to do a redirect of all traffic from these hosts to my local DNS servers to force the use of my local DNS servers, but this either doesn't work or isn't sufficient enough to get this working.
  • I've tried manually setting the IP Address and DNS server details on the Arylic, again this does not seem to be sufficient to get it working.

I think there are some substantial deficiencies in the way that Linkplay handle playing from domain names that aren't on the public internet. My HA instance is hosted internally with an internal only domain name and certificates provided by Lets Encrypt, everything else that I have integrated has had no issues with this.

Given that playing via HTTPS from the IP address is functioning, I believe we can assume that SSL validation is not performed on any connections originating on the Arylic, as the internal IP address that I am using in this case doesn't appear in either the CN or SAN of the Lets Encrypt certificate. The earlier comment about the Notification API not supporting HTTPS isn't confidence inspiring either.

I've not attempted to update the configuration of my HA to only use the IP address of my host to verify if this works, but I suspect it will given how I believe these URL's are synthesised. I'm just not willing to make that change to get a single integration working.

If other users with this issue are able to verify that they also have hostnames configured for their HA instance, that would validate this limitation I believe.

As to a solution, I'm not sure. I'd like to be able to manually set the IP address that is used for the URL base of TTS requests, but this is a bit clunky. Rewriting any URLs transparently that match the HA instance local address to use the IP address instead is probably a more seamless fix but I'm unsure on the feasibility of this. Can the integration devs provide some insight into how this may be achieved? 

Hope this helps and happy to help get this working.

ozonejunkieau avatar Jan 29 '25 12:01 ozonejunkieau

Thank you very much for your willingness. I would like to use the Arylic devices that I currently use for Spotify to also play notifications via HA. I hope this can be resolved in the future. Have a nice day.

st 29. 1. 2025 o 13:09 Tristan Steele @.***> napísal(a):

@christi-g https://github.com/christi-g: I've just done a bit more digging into that, there is a post on the Arylic forums that suggests the play notification sound does not support the use of HTTPS at all, which may make that challenging to implement. I was also hoping this would be possible, but not at the moment apparently.

Related to TTS not working on Linkplay speakers, I've done a bit more digging and have a few findings that may be of use to get this working. FWIW I'm using an Arylic board, but I believe the Linkplay implementation is generic.

  • I concur with other users, at present the TTS functionality does not work.
  • If I visit the status API endpoint on the Arylic and manually copy the home assistant URL to the TTS generated mp3 into a browser window, it works in my browser.
  • If I copy this URL and paste it into the setPlayerCmd:play: API endpoint, it does not work.
  • If I replace the hostname in the URL with the IP Address of my HA host, the expected TTS audio plays! Great success!
  • Looking at the requests passing through my firewall, it appears these devices have some hard coded DNS configuration baked in. Even though my DHCP server pushes out the use of internal DNS servers, I still see requests going to both 8.8.8.8 and 8.8.4.4 on port 53 in the firewall logs.
  • I've attempted to do a redirect of all traffic from these hosts to my local DNS servers to force the use of my local DNS servers, but this either doesn't work or isn't sufficient enough to get this working.
  • I've tried manually setting the IP Address and DNS server details on the Arylic, again this does not seem to be sufficient to get it working.

I think there are some substantial deficiencies in the way that Linkplay handle playing from domain names that aren't on the public internet. My HA instance is hosted internally with an internal only domain name and certificates provided by Lets Encrypt, everything else that I have integrated has had no issues with this.

Given that playing via HTTPS from the IP address is functioning, I believe we can assume that SSL validation is not performed on any connections originating on the Arylic, as the internal IP address that I am using in this case doesn't appear in either the CN or SAN of the Lets Encrypt certificate. The earlier comment about the Notification API not supporting HTTPS isn't confidence inspiring either.

I've not attempted to update the configuration of my HA to only use the IP address of my host to verify if this works, but I suspect it will given how I believe these URL's are synthesised. I'm just not willing to make that change to get a single integration working.

If other users with this issue are able to verify that they also have hostnames configured for their HA instance, that would validate this limitation I believe.

As to a solution, I'm not sure. I'd like to be able to manually set the IP address that is used for the URL base of TTS requests, but this is a bit clunky. Rewriting any URLs transparently that match the HA instance local address to use the IP address instead is probably a more seamless fix but I'm unsure on the feasibility of this. Can the integration devs provide some insight into how this may be achieved?

Hope this helps and happy to help get this working.

— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/123993#issuecomment-2621467108, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHOTKMHIAXU5RDR6JYPF4732NDAGXAVCNFSM6AAAAABMSQDYCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMRRGQ3DOMJQHA . You are receiving this because you commented.Message ID: @.***>

fireman266 avatar Jan 29 '25 14:01 fireman266

Just following up on this for anyone that may find this, I've just created a PR #137089 that should work around this bug. There is couple of HA related configurations that I'm still working out, so if you can share some pointers with me in that PR that would be greatly appreciated.

ozonejunkieau avatar Feb 01 '25 13:02 ozonejunkieau

I'm also seeing this on a Jam Symphony, it was working fine for a while then suddenly stopped, I don't have a clue why...

simmessa avatar Feb 07 '25 12:02 simmessa

Hello. I don't know what changed but after the HA 2025.4.0 update TTS started working on my Arylic A50+ devices. Thank you.

fireman266 avatar Apr 03 '25 09:04 fireman266

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.