[Release] - Speaker Central

Unfortunately the latest release didn't solve the problem playTextAndRestore problem I'm experiencing. While I'm not getting an exception in the logs anymore, now if I select Music Player and set a volume in Notifications app, nothing gets played at all on through the proxy.

The signature for playTextAndRestore(string, long) is still missing as far as I can see in the code. That's what the notifications app tries to send to the speaker.

I think there is a problem with the child app on the new update? I can't pick the virtual device (the proxy speaker device) anymore. When I save I get "No Virtual Device Set" in the log.

Also, why is there a setting for "Use existing speech proxy device" on the parent? That shouldn't be there, right? If you move the proxy device up to the parent level then you can't use different groups of speakers for different scenarios. That should be a question the child app is asking. I have three announcement groups that all operate differently depending on the mode and other factors that I can't set in your app but I can set in RM. If I can only set the proxy device at the parent level then I am limited to one proxy device and I can't get the all the combinations I need anymore. I used to be able to have a proxy device per child app. Hopefully that hasn't changed.

It also means I can't have two different volumes easily if I can't define the condition with your control types. For example, if water is leaking I don't want to have to turn on a virtual switch and then speak something and have to turn the virtual switch off afterwards. I don't want to have to maintain switches to maintain volumes. I could just use a different proxy device that was always fixed volume loud when the child apps had their own proxy devices. It was much easier when the virtual speaker device was tied to the child.

*edit: Also, do you know where this comes from on every reboot?

groovy.lang.MissingMethodException: No signature of method: java.lang.String.call() is applicable for argument types: (com.hubitat.hub.domain.Event) values: [com.hubitat.hub.domain.Event@17b23313]
Possible solutions: wait(), any(), wait(long), each(groovy.lang.Closure), any(groovy.lang.Closure), take(int) (updated)

@doug
This is the only app that sends the volume with the text to speak
I'll add some additional code to the handler to cover this

@codahq
I'll look at this again and make some 'option' changes
This was changed so that the parent could create the proxy device for you (to try and help new users)
I couldn't see a use for more than one proxy as volume levels etc are set in child app and pushed before speaking so only one proxy device is really needed.

Personally I have lots of different volume levels and different scenarios where certain speakers are enabled/disabled
All use the same proxy device

The error on boot is some code which I thought I had removed which was designed to reinitialise everything on boot (but didn't really work)
I'll check that again

Well, that's partially true, as I have yet to release this enhancement to the public that is coming in Envisalink Integration

Thanks for enhancing!

I recall reading that VLC can be used as an audio device. Is there a reference on how to set it up so it can work? I have a Linux computer that stays on constantly. It would be good to use it for sound output (chimes, announcements, etc.) if I can find out how to do so.

You can try this. Works pretty well.

1 Like

I have a lot of configurations as well. Even if you add config for HSM (water, fire, etc) so I can turn the volume up for emergencies I still can't do a local notification to one room anymore.

Example:

  • I have an announcement group of speakers that has a child app to disable at night
  • I have an individual speaker in my office that is part of that group. I send a single announcement to that speaker once every hour if I am in the office to remind me to get up and walk around every hour.
  • The volume of my speaker changes through out the day because it is part of other groups so I want to always fix volume speak the office announcement at 15% so that if I'm on a call it will be basically imperceptible. However, I can no longer do that because there is overlap in the conditions now. The only thing that enabled me to do this previously was have a separate proxy for the office and have it fixed volume to 15%. I will never be able to do that no matter how much logic you add unless I start to create a virtual switch to manage it.

Does that make sense?

I’m testing a version where I go back to putting the device config in the child

1 Like

That's amazing. Thank you, thank you!

Wrapping my head around Speaker Central...

Everything seems to be install correctly. I have the proxy virtual device set up.

Now, within the Speaker Central app, I can choose the virtual device. Then configure a child: choose the speakers I want to have my alert played on, etc.

I guess I'm trying to figure out the process for using this in another app. So, I have NOAA Weather Alerts, that can push weather alerts to google home and minis (currently doing this). Within my NOAA app, I choose the speakers (I choose the Cobra Proxy VD).

Assuming this is correct, how does SpeakerCentral know which child app to use? There seems to be only one Proxy Speaker Virtual Device choice in the SC app, so all third party apps (NOAA for example) push their output to the Cobra PSVD.

And I'm not sure what the Speaker Central TTS Device is for. I've read most of this thread, and hubitat.uk, etc.

Thanks for any pointers.

Set up rules in Speaker Central for where you want the TTS sent to etc, then point your TTS messages to the Proxy speaker.

Based on what you set up in the app, it’ll then send the messages to the correct places.

Example. I use modes for where my TTS messages should be sent. During “home alone” I want them sent to my Office speaker. So I have SC app send all message sent to the proxy speaker and SC sends them to my office speaker. And any app I use for TTS I just use the proxy speaker as where to send the message to.

SC will then forward it on to where I need it.

If my mode changes to Home, then all messages from apps will be sent to my lounge speaker.

Hope this helps?

Still seems like SC is a black box. I don't see where a SC child and the third part app (NOAA in my case) reference each other.

UI seems to allow only one Proxy Device in SC, which is basically the gateway into SC from third party apps. I still don't see how (unless my install is incorrect) how SC routes specific third party apps to the correct SC-child.

Separately, I'm not sure what Speaker Central TTS Device purpose is.

Thanks.

Think of the virtual proxy as a ‘receiver’ which takes tts from any app (where it is configured as a speaker) and ‘forwards’ the tts to one or more speakers (configured in one or more child apps)

Each child app can be configured to turn on or off one or more speakers dependant upon certain conditions..

For example.
I have a speaker in my kitchen..
my childapp for my kitchen is activated by motion..
If motion is active in the kitchen then the speaker is ‘on’ and tts from the virtual device is sent to that speaker
If there is no motion in the kitchen then the speaker is ‘off’ and no tts gets through to that speaker.

I have other speakers in my office.. if I am in my office (again, detected by motion) then if tts is sent to the virtual device by an app, then it plays in my office but not in the kitchen (as when I’m in the office, there is no motion in the kitchen)

The proxy is just a ‘forwarder’ to send tts to each child app then the individual child apps decide whether to play the tts or not.

Andy

That's the answer. Thank you.
So, it goes to every child app. So, SC just helps to, for example, not send it to SpeakerA because no one is there to hear it, or an infant is napping in that room at the moment (no motion), etc.

I was trying to make SC send to multiple speakers when the third party app wouldn't allow that.

Thanks @Cobra

Correct!

You can make it do that too..
Just create a child app with the multiple speakers configured and use the proxy in your 3rd party app

I guess you decided to ditch putting the virtual device back into the child app? Having it in the parent app removes the ability to use zones of speakers the way I'm doing.

My other option is to create multiple instances of the parent app. This sort of works except that the second parent somewhat blindly create the virtual speaker device on install. This throws an error because the DNI is already in use by the first parent. Also, I can't name the parents so they have identical names. Also, once two parent apps are installed side by side neither works. That's kind of an issue.

Can you help me out here and give me one of these two options maybe?

  1. The ability to name the parent apps and the parent app more carefully creates the virtual speaker device (or waits until it needs to create it ideally)
  2. Put the virtual speaker back in the child app. Do people really only use one announce speaker group? How is this possible? Don't people have children and home offices to avoid?

I don't really want to have to fork and maintain my own copy. I wouldn't update at all but you've got some weird bug in 1.2 where every time the hub reboots an exception is thrown in initialize and I haven't had time to track it down. Maybe I'll just look at your commits to see what you did there to fix it.

I’m sorry, I have been tied up with real life and coding for a different project that I’m involved in.
I’m really hoping to get to this soon.
Speaker Central is not really working for me correctly atm so it has become a priority for me too now.
The error on boot is an easy fix
Hopefully, I can get to fix all this next week

Andy

2 Likes

The app was originally designed to use only ONE speaker proxy..
I have LOTS of different speaker groups but only ONE proxy..

And I have so many Message Central messages that I can't even get them all in one screenshot!

1 Like

Having issue with trying to create 'Parent' app for Speaker Central.

The answer is in your screenshot!

put two forward slashes - // in front of the line to comment it out if you are not using the 'Cobra Apps' container

1 Like