So, I picked up a few squeezeboxes to integrate with my HA, and I had some door sensors laying around. Really loving the Squeezeboxes + LMS integration. Anyway, I figured I should be able to send announcements to them. So I built an automation when the door open for 2s to play a TTS notification. That works, but music stops playing. I found that according to the LMS documentation, an “announce: true” flag can be used to pause playback, send the announcement, then resume playback of music on LMS / Squeezebox. However, I have configured the following action and it fails to run, with this error : extra keys not allowed @ data[‘announce’]. Got None
Additionally, there are two other paremeters for announce_volume and announce_timeout. I can add these in, but I still have the same issue. I am not often edting YAMLs. Have I misunderstood the LMS announce functionality, or am I inputting the YAML incorrectly? Or is it something else / not supported ?
You actually got one of the red Squeezebox Radios? (I love the LMS ecosystem, too, and also still have a few of the original devices.)
I must say I never tried using the basic tts.speak again after discovering the lovely Chime TTS (a HACS integration), which also has options for Announce and Fade. I seem to recall I use the “Fade” option with LMS media players—it’ll fade down the music, plays the announcement (with optional soundfile prepended!), and fades back in. Nice.
Example as YAML (Firefox couldn’t do a full-page screenshot of the many settings, sorry):
You’re mixing up a couple of things from the doc - which don’t mix…
announce: true is a parameter to play_media, not to tts.speak. tts.speak automatically adds announce: true when you use it - you don’t (can’t) pass it as a parameter. Also, as it says in the doc, you can’t pass the extra parameters when you use tts.speak - again, they’re part of play_media. If you want to use the extra params, you have to use play_media, with the media_source modified. There’s a specific example of this in the doc
action: media_player.play_media
target:
entity_id: media_player.squeezebox
data:
media_content_type: music
media_content_id: media-source://tts/tts.google_translate_en_co_uk?message="There's someone at the door"
announce: true
extra:
announce_volume: 0.2
announce_timeout: 60
Oh, I see. Yes, now that I look at the entire YAML the action was - action: tts.speak
I understand now. So, if I put the front door announcement wav in a static spot I could do it that way. It also sounds like I should check out the chime TTS HACS integration.
I have been avoiding HACS, because the first thing I did was add LMS with HACS and had LMS running directly on my HA. But then I tried to upgrade HAos and had issues… I then restored from backup and failed to restore properly multiple times. I figured HACS had something to do with that… Anyway I’ve switched it to a VM now with USB passthrough, and have both regular HAos backups and proxmox snapshots. So I will give it a try. LMS is running on its own container as well at this point.
The community here is great. Thanks for your support. I see I have a lot to learn, but I love that there are so many resources and helpful folks. There’s no shortage of fun possibilities.
Regarding the red squeezebox, yes that was my first one. I was on ebay and I saw it listed for maybe $10 more than the black one. So I went for it. My wife loves it, the red makes it look kinda retro. I then bought a black squeezebox, and a squeezeboom.
While I’m learning the in’s and outs of HA, I am also looking into whether or not I could port the wyoming satellite over to the LMS ecosystem, so the squeezebox line-in could be used as a mic. The challenges I see there are, I’m not sure if the line-in is accessible to the squeeze os. I don’t see any prior plugins that touched the line-in at all. So it may just be like a hardware pass thru. We’ll see…
Glad you’re making some headway. I’m not sure what you might need tts speak for (since the squeezebox integration supports announce), but you shouldn’t have any problems with HACS. I’d suggest a significant portion of the HA world run HACS - I certainly couldn’t do without it. However, I think you’ve now landed on the right setup - well, it’s exactly the same as mine… Proxmox with HAOS running in a VM and LMS running in a separate LXC container. Works perfectly for me - proxmox snapshots and backups make everything so much easier - I now run PBS as well to make it better and have a proxmox cluster happily running with both the LMS and HA on high availability. It’s amazing what you can do on cheap hardware with open source software these days …
I don’t think you’ll get anywhere with the squeezebox device mics currently - i haven’t seen anything useful about line-in, but it might be worth some digging.
So, I got it to partially work with chime TTS fade option.
The announce option just seems to be about setting the volume, whereas the announce option is simply to set the volume to a certain level. Fade talks about fading out the music, then fading it back in when the announcement is done. When I’m listening to a spotty spotify playlist. It ends up skipping the current song instead of pausing and resuming, but it’s better than nothing. If I’m listening to internet radio, it just stops still.