Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linkplay speakers do not support tts #123993

Open
DaveK-Rocketmakers opened this issue Aug 15, 2024 · 14 comments · May be fixed by #137089
Open

Linkplay speakers do not support tts #123993

DaveK-Rocketmakers opened this issue Aug 15, 2024 · 14 comments · May be fixed by #137089

Comments

@DaveK-Rocketmakers
Copy link

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

@home-assistant
Copy link

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)

@b00tsie
Copy link

b00tsie commented Sep 2, 2024

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 )

@override80
Copy link

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

@MoridinTX
Copy link

MoridinTX commented Sep 6, 2024

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?

@silamon
Copy link
Contributor

silamon commented Sep 7, 2024

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

@dnikles
Copy link
Contributor

dnikles commented Oct 15, 2024

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

I am still seeing this issue

@b00tsie
Copy link

b00tsie commented Oct 15, 2024

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.

@dnikles
Copy link
Contributor

dnikles commented Oct 15, 2024

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

@fireman266
Copy link

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

@christi-g
Copy link

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?

@ozonejunkieau
Copy link
Contributor

@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.

@fireman266
Copy link

fireman266 commented Jan 29, 2025 via email

@ozonejunkieau
Copy link
Contributor

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.

@simmessa
Copy link

simmessa commented Feb 7, 2025

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...

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

Successfully merging a pull request may close this issue.

10 participants