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
How to play tts on homepod mini from Homeassistant? #1221
Comments
You can't yet. As of 0.8.0 pyatv supports streaming audio files via AirPlay, but I haven't added support for that in the Home Assistant integration. It's on my todo-list, but my highest priority right now is #1220. Could possibly be hacked to work by running |
Ok, then there is a logic explanation :) I have tried with the shell command but it just returns
When i try to run atvremote in a ssh session it just say command not found. I am not a coder but i would love to help if i can do anything about the other issue. |
It's been ages since I used the shell command integration, so I'm not sure how to debug that. What command are you trying to execute? You need to have pyatv installed to run |
There a one who already implement it. But I found that it call stream_file() to play audio file and cause HA 2021.7.3 (hassos 2021.06.8) restart. |
Cool, didn't know someone made a custom component for that (my intention is to have proper support for AirPlay devices in the Apple TV integration). Can't vouch for the quality, I guess issues should end up in that repo instead. |
attached the exception log while using HomePod Mini with ha core 2021.7.4
|
@niceboygithub That's an issue with the component not checking available features. You should open an issue in the repo of the component. |
This is for TTS only. It can play media files but there's no way of controlling the playback (play,stop, pause, etc). In other words: not a full-featured HA media player. Maybe @postlund can pull this off with his coding skills ;-) |
The problem is that the RAOP protocol only supports playback control (and implicitly metadata) for the current stream. So it cannot control playback in case someone else is playing something. I guess that's by design in AirPlay. The HomePod however supports tunneling MRP over AirPlay (like the Apple TV requires in tvOS 15). I have implemented that on |
So... current status here is that I'm working on #1312, which will add support for "stop" properly. That will at least make it possible to stream something and stop it on demand. As there's no queue or playlist supports, it's not really possible to make anything sensible with next/previous. Pause requires a bit of work, but I will try to fix that as well in due time. Anyways... As mentioned, RAOP only supports streaming local files. In the beta version of the Apple TV integration (available here: https://github.com/postlund/hass-atv-beta) I have added a small hack that, when TTS is sent to an Apple TV media player, will wait for the file to be downloaded before starting to stream it locally. This makes it possible to use TTS with the regular integration instead of using another one. This particular solution will not make the final cut when submitting a PR back to Home Assistant, but I hope that I can spark some interest into developing a proper solution. But you can use the beta component to stream to HomePod Minis (or any AirPlay receiver really) in the mean time. |
When i try to send a TTS to one of my homepods i get this error |
@SalkinDK Darn it, my bad! I have pushed a new release now! |
@postlund Thx for reacting so fast. But now I get another error
|
@SalkinDK Yeah, I suck... Pushed another release now. |
@postlund no not at all. you are the man for continuing development here. :) But now I get |
@SalkinDK That doesn't sound very good. I will have to look in to that. If you manage to extract any logs that would be helpful. |
@postlund the only thing I can get from the logs after the crash is
|
@SalkinDK That nothing I can work with I'm afraid. Maybe you can enable debug logs, try to stream and see what happens? |
@postlund of course.. sorry for not thinking of that before 😊
|
If you try a short text, like "hey", is it still the same? |
Yes. Most of The tests I done with the text “test”. |
@SalkinDK Can you try if the latest version of the beta component works better? |
I am also getting the same "Failed to call service tts/cloud_say undefined" and crash as well. I was able to get the debug logs.
|
I won't spam with additional logs unless asked, but I can confirm that I am experiencing the same TTS crash issue with the latest HA and AppleTV betas. I get the UPDATE: Same issue occurring when calling TTS on an Apple 4K Gen 1. |
@SalkinDK The log is inconclusive I'm afraid. How did you install Home Assistant? On HassOS, supervised? @MizterB Same question to you: how did you install Home Assistant? I'm fairly certain the crashes happen because of pyminiaudio as some people have reported that before. The solution has been to re-install that library manually. |
I'm running HAOS in a ProxMox VM. As I am running the latest beta, my config is: Can you please confirm if I need to do something with |
I am also running HAOS in a proxmox VM. It was installed fresh last month. I just attempted to reinstall miniaudio using:
And can confirm it is now working! |
@jcbshw - Where/how are you executing those commands? Terminal add-on drops me into the Supervisor, but I assume this needs to be run against HA Core? |
Make sure protection mode is disabled on the add on then run:
|
Thank you! I can also confirm success after updating |
Thank you guys for verifying! 👍 I guess the pre-built wheels from Home Assistant has built with some kind of optimization that is not generic enough to be compatible with your systems. Probably need to investigate that further... |
But I will close this issue for now. |
What's on your heart?
First of all, thx alot for a great integration and all the hard work.
i read in the release logs for HA 2021.7:
But how do i send a TTS to one of my homepod minis?
If i try to add them thru the integration i am promted to input the airplay code, but since there isnt a screen showing it i dont know what it is?
Thx in advance :)
The text was updated successfully, but these errors were encountered: