Announcement

Collapse
No announcement yet.

Dynamic speaker client groups

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dynamic speaker client groups

    Alex, I would like the ability to send TTS messages to different groups of speaker clients depending on conditions in events. E.g., occupancy conditions: if it's night and someone's in bed upstairs, send certain notifications to only downstairs clients; at other times send to all clients; etc. This can be done with substantial duplication and complexity of events, but I'm hoping to figure out a simpler method without getting into complicated scripting (which is beyond my abilities). Perhaps it could be speaker client groups whose members can be dynamically changed via event.

    Does this plugin offer this type of functionality, or might you consider adding it?

    Thanks.
    -Wade

    #2
    Originally posted by cc4005 View Post
    I would like the ability to send TTS messages to different groups of speaker clients depending on conditions in events.
    Good idea, I need this myself, otherwise it announces in the bedroom when my wife is sleeping (you can imagine her reaction).
    You are right, currently the only way is to duplicate events and set different speaker groups.

    I will think about better implementation. Any input is also welcome.

    Comment


      #3
      Great! Thanks for considering it.
      -Wade

      Comment


        #4
        Probably easiest option is to create a HS device for each chromecast/google home - to enable/disable TTS. Then you can setup events to disable TTS in the bedroom when bed sensor is detected.

        I'll keep thinking

        Comment


          #5
          Originally posted by cc4005 View Post
          Alex, I would like the ability to send TTS messages to different groups of speaker clients depending on conditions in events.
          Version 3.0.0.13 (in BETA until approved by HTS) has the EnableTTS device for each Google device

          Click image for larger version

Name:	EnableTTS - Copy.jpg
Views:	191
Size:	64.2 KB
ID:	1341079

          Comment


            #6
            Great, I'll give it a try! Thanks.
            -Wade

            Comment


              #7
              Originally posted by cc4005 View Post
              Great, I'll give it a try! Thanks.
              Let me know.

              Comment


                #8
                Originally posted by alexbk66 View Post

                Let me know.
                I installed the PI and did some basic testing. It looks like the enable/disable function will let me do what I need to do with sending TTS to select speaker client(s) based on occupancy conditions. Good news!


                Observations and Issues:

                GH Minis
                95% of the use of the PI would be TTS is over the minis for general household notifications, and they appear to be working properly. The first speak action sent to several individually resulted in audio out of sync between the minis, but subsequent tests were in sync. Don't know how long it takes them to sleep or go offline, so don't know whether sync will be an ongoing issue or was a one-off problem with the first test.


                EnableTTS HS device
                On my new install, the EnableTTS device for each speaker in HS defaulted to status "Enable" but the actual state appeared to be disabled. No TTS would play to a device until I disabled and re-enabled its EnableTTS device in HS.


                Speaker Groups
                Are speaker groups fully supported in the current beta version? The PI finds my groups, but can't seem to configure them properly. As I watch the AKGC config page, the speaker groups show up, initially with IP 0.0.0.0. Then eventually it sets to set an IP address for each group, then loses it and it goes back to 0.0.0.0, then repeats, on and on. It's as if the speaker group's IP address is continually changing and the plugin is trying to keep up but can't. Meanwhile the log fills with lots of info, warnings and errors from the PI, and at some point I start getting the "Warning - Dropping event callbacks due to full queue..." log entries repeatedly until I disable speaker groups in the PI config. I uninstalled the PI, deleted HS devices, restarted HS, reinstalled the PI, and tried again. No change.

                Sony Bravia TVs with built-in Google Cast
                I have 2 of these (similar models but different years and size) and they're doing the same thing. Sending a speak action from an event with the TV off results in the TV turning on and going to a screen showing "Default Media Receiver" with a spinner, but the TTS doesn't play. The PI logs the following:
                Nov-19 1:51:32 PM AK GoogleCast ERROR [3749]: SendMedia: http://192.168.0.16:80/Wave/Cast/Goo...7957165-en.mp3 (audio/mpeg) (Kitchen TV): Value cannot be null. Parameter name: value [HSPI_AKGoogleCast.SpeakerGoogleTransl]
                Nov-19 1:51:32 PM AK GoogleCast Warning [3749]: at Google.Protobuf.ProtoPreconditions.CheckNotNull[T](T value, String name) at Extensions.Api.CastChannel.CastMessage..ctor(String destinationId, String sourceId) at SharpCaster.Models.MessageFactory.Load(String destinationId, String payload) at SharpCaster.Channels.MediaChannel.d__13.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification(Task task) at SharpCaster.Controllers.DefaultMediaController.d__2.MoveNext () --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucce ss(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess AndDebuggerNotification(Task task) at HSPI_AKGoogleCast.CastDevice.d__101.MoveNext()
                Nov-19 1:51:31 PM AK GoogleCast ERROR [3749]: Waiting to launch application CC1AD845 timeout 3000 (Kitchen TV): [HSPI_AKGoogleCast.SpeakerGoogleTransl]
                Nov-19 1:51:28 PM AK GoogleCast [3749]: Send media: http://192.168.0.16:80/Wave/Cast/Goo...7957165-en.mp3 (Kitchen TV)
                Nov-19 1:51:28 PM AK GoogleCast [3749]: Media file name: C:\Program Files (x86)\HomeSeer HS3\html\Wave\Cast\GoogleTranslate897957165-en.mp3 (Kitchen TV)
                Nov-19 1:51:28 PM AK GoogleCast [3749]: Getting TTS from https://translate.google.com/transla...sting.+Testing. (Kitchen TV)
                Nov-19 1:51:28 PM AK GoogleCast [3749]: SpeakText: Kitchen TV: Testing 1 2 3. Testing. Testing. Testing.
                Nov-19 1:51:28 PM TTS Speak (GOOGLECAST:KITCHEN TV):Testing 1 2 3. Testing. Testing. Testing.
                Subsequent speak actions (TV now on) also don't work and result in the following:
                Nov-19 1:57:56 PM AK GoogleCast ERROR [3749]: MediaChannel ErrorReceived: SharpCaster.Channels.MediaChannel: LOAD_FAILED : GoogleTranslate897957165-en.mp3 http://192.168.0.16:80/Wave/Cast/Goo...7957165-en.mp3 (Kitchen TV): [HSPI_AKGoogleCast.SpeakerGoogleTransl]
                Nov-19 1:55:49 PM AK GoogleCast [3749]: * PlayerState changed: Buffering (Kitchen TV)
                Nov-19 1:55:48 PM AK GoogleCast [3749]: Send media: http://192.168.0.16:80/Wave/Cast/Goo...7957165-en.mp3 (Kitchen TV)
                Nov-19 1:55:48 PM AK GoogleCast [3749]: Media file name: C:\Program Files (x86)\HomeSeer HS3\html\Wave\Cast\GoogleTranslate897957165-en.mp3 (Kitchen TV)
                Nov-19 1:55:48 PM AK GoogleCast [3749]: Getting TTS from https://translate.google.com/transla...sting.+Testing. (Kitchen TV)
                Nov-19 1:55:48 PM AK GoogleCast [3749]: SpeakText: Kitchen TV: Testing 1 2 3. Testing. Testing. Testing.
                Nov-19 1:55:48 PM TTS Speak (GOOGLECAST:KITCHEN TV):Testing 1 2 3. Testing. Testing. Testing.
                The TV remains in the Google Cast input state for about 5 minutes then times out and goes to normal television input, but no TTS ever plays.


                Onkyo Home Theater Receiver with built-in Google Cast

                Essentially the same result as the TVs except display.


                Chromecast Device on a dumb TV

                I have to turn on the TV and change input to the chromecast for this one--which I did before testing. Sending a TTS causes the chromecast to change screen to one with "Default Media Receiver" displayed, along with a spinner. No TTS comes through. After a couple minutes the chromecast changes the screen to the chromecast icon and appears to be ready and waiting. Re-sending the speak action sends it back to the "Default Media Receiver" screen and still doesn't play. No sound. Here's the log from 2 attempts, waiting for the chromecast icon screen to appear on the TV between tries.
                Nov-19 2:32:23 PM Warning File does not exist: C:\Program Files (x86)\HomeSeer HS3\html\23e56cb4217bd918d25568e7cf607a26\image0.jpg
                Nov-19 2:32:23 PM AK GoogleCast ERROR [3775]: Error downloading imge chrome-resource://cast_resources/images/background7.jpg (23e56cb4217bd918d25568e7cf607a26/image0.jpg): The URI prefix is not recognized.
                Nov-19 2:32:23 PM AK GoogleCast [3773]: * PlayerState changed: Playing (ChromecastDen)
                Nov-19 2:32:22 PM AK GoogleCast [3773]: * Application started: Backdrop (E8C28D3C) (ChromecastDen)
                Nov-19 2:32:16 PM AK GoogleCast [3773]: * Application ended (ChromecastDen)
                Nov-19 2:32:16 PM AK GoogleCast [3773]: * PlayerState changed: Idle (ChromecastDen)
                Nov-19 2:25:10 PM AK GoogleCast [3773]: * PlayerState changed: Buffering (ChromecastDen)
                Nov-19 2:25:09 PM AK GoogleCast [3773]: * PlayerState changed: Idle (ChromecastDen)
                Nov-19 2:25:09 PM AK GoogleCast [3773]: Send media: http://192.168.0.16:80/Wave/Cast/Goo...7957165-en.mp3 (ChromecastDen)
                Nov-19 2:25:09 PM AK GoogleCast [3773]: Media file name: C:\Program Files (x86)\HomeSeer HS3\html\Wave\Cast\GoogleTranslate897957165-en.mp3 (ChromecastDen)
                Nov-19 2:25:09 PM AK GoogleCast [3773]: Getting TTS from https://translate.google.com/transla...sting.+Testing. (ChromecastDen)
                Nov-19 2:25:09 PM AK GoogleCast [3773]: SpeakText: ChromecastDen: Testing 1 2 3. Testing. Testing. Testing.
                Nov-19 2:25:09 PM TTS Speak (GOOGLECAST:CHROMECASTDEN):Testing 1 2 3. Testing. Testing. Testing.
                Nov-19 2:25:01 PM Event Event Trigger "_test chromecast actions"
                Nov-19 2:25:01 PM Event Event _test chromecast actions triggered by the event page 'Run' button.
                Nov-19 2:23:14 PM AK GoogleCast ERROR [3773]: MediaChannel ErrorReceived: SharpCaster.Channels.MediaChannel: LOAD_FAILED : GoogleTranslate897957165-en.mp3 http://192.168.0.16:80/Wave/Cast/Goo...7957165-en.mp3 (ChromecastDen): [HSPI_AKGoogleCast.SpeakerGoogleTransl]
                Nov-19 2:21:08 PM AK GoogleCast [3773]: * PlayerState changed: Buffering (ChromecastDen)
                Nov-19 2:21:06 PM AK GoogleCast [3773]: * Application started: Default Media Receiver (CC1AD845) (ChromecastDen)
                Nov-19 2:21:06 PM AK GoogleCast [3773]: * Application ended (ChromecastDen)
                Nov-19 2:21:06 PM AK GoogleCast [3773]: * PlayerState changed: Idle (ChromecastDen)
                Nov-19 2:21:06 PM AK GoogleCast [3773]: Send media: http://192.168.0.16:80/Wave/Cast/Goo...7957165-en.mp3 (ChromecastDen)
                Nov-19 2:21:06 PM AK GoogleCast [3773]: Media file name: C:\Program Files (x86)\HomeSeer HS3\html\Wave\Cast\GoogleTranslate897957165-en.mp3 (ChromecastDen)
                Nov-19 2:21:06 PM AK GoogleCast [3773]: Getting TTS from https://translate.google.com/transla...sting.+Testing. (ChromecastDen)
                Nov-19 2:21:06 PM AK GoogleCast [3773]: SpeakText: ChromecastDen: Testing 1 2 3. Testing. Testing. Testing.
                Nov-19 2:21:06 PM TTS Speak (GOOGLECAST:CHROMECASTDEN):Testing 1 2 3. Testing. Testing. Testing.

                I've not been successful getting any TTS to play to devices other than the GH minis so far. I'll continue to tinker with it.
                -Wade

                Comment


                  #9
                  I'm testing on Google Home Minis, will test on Chromecast now.

                  Comment


                    #10
                    Originally posted by cc4005 View Post
                    The first speak action sent to several individually resulted in audio out of sync between the minis, but subsequent tests were in sync. Don't know how long it takes them to sleep or go offline, so don't know whether sync will be an ongoing issue or was a one-off problem with the first test.
                    It's not the "sleep" problem - it's starting the "media" app on each device may take a few seconds. Then once the app is loaded - the TTS is quick. Also, getting the TTS mp3 from Google first time can take time, but then the mp3 is cached locally.

                    Comment


                      #11
                      Originally posted by alexbk66 View Post
                      It's not the "sleep" problem - it's starting the "media" app on each device may take a few seconds. Then once the app is loaded - the TTS is quick. Also, getting the TTS mp3 from Google first time can take time, but then the mp3 is cached locally.
                      Ok thanks for that explanation. Any idea how long the media app stays active? Does it time out after some time? Or use of other app cause it to stop?
                      -Wade

                      Comment


                        #12
                        Originally posted by cc4005 View Post
                        Ok thanks for that explanation. Any idea how long the media app stays active? Does it time out after some time? Or use of other app cause it to stop?
                        Yeah, you are right - loading any other app (i.e. Spotify) unloads the general media app. I discussed with other users the possibility of periodically sending some "inaudible" short sound to keep the media app loaded. It's a possibility, but needs some thinking.

                        Regarding "sleep" - Minis shouldn't really go to sleep - Google even implemented "Ping-Pong" message - every 5 seconds plugin must send it to keep the connection alive.

                        Comment


                          #13
                          Originally posted by cc4005 View Post
                          EnableTTS HS device
                          On my new install, the EnableTTS device for each speaker in HS defaulted to status "Enable" but the actual state appeared to be disabled. No TTS would play to a device until I disabled and re-enabled its EnableTTS device in HS.
                          After more testing I have more on this issue. Each time the plugin is enabled--whether after simply being disabled or after a HS3 restart--the speakers seem to be in this disabled state while the EnableTTS device in HS reports them as enabled. In other words, none of my minis can be used for TTS after a plugin start until the EnableTTS device has been set to toggled.
                          -Wade

                          Comment


                            #14
                            I have not had alot of time to test just yet. With that being stated. I did try a couple things. The Disable/Enable function seems awesome first of all!
                            I am having same results as cc4005. No TTS plays through Minis until I diable/enable them individually. Once that is done, a group will play appropriately or individual mini speaker.
                            My dumb TV with a Chromecast plugged into it will recognize and display the HS speker device on the screen , but no TTS comes through.
                            In summary. Same results as cc4005. Minis are the only device I have gotten any TTS to play in a group or individually. Nothing from the Chromecast Device itself plugged into tv.

                            Will continue testing/tinkering as I can!
                            Thanks for the work Alex.

                            Comment


                              #15
                              Originally posted by cc4005 View Post
                              On my new install, the EnableTTS device for each speaker in HS defaulted to status "Enable" but the actual state appeared to be disabled. No TTS would play to a device until I disabled and re-enabled its EnableTTS device in HS.
                              Originally posted by cc4005 View Post
                              After more testing I have more on this issue. Each time the plugin is enabled--whether after simply being disabled or after a HS3 restart--the speakers seem to be in this disabled state while the EnableTTS device in HS reports them as enabled. In other words, none of my minis can be used for TTS after a plugin start until the EnableTTS device has been set to toggled.
                              Originally posted by Meapilot View Post
                              I am having same results as cc4005. No TTS plays through Minis until I diable/enable them individually. Once that is done, a group will play appropriately or individual mini speaker.

                              Ok, this one is easy - fixed in ver. 3.0.0.14 (in Beta as always until approved by HST)

                              Comment

                              Working...
                              X