Announcement

Collapse
No announcement yet.

Can't seem to speak or play a sound through a chromecast device

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

    Can't seem to speak or play a sound through a chromecast device

    Hi. I am running HS3 Pro v 3.0.0.548 on windows server 2019, and version 3.0.0.46 of the plugin.

    Have an event is manually triggered, and then "Speak Something" with "someone is at the door", and speaker client CHROMECAST: POOLHOUSE DISPLAY selected.

    When I trigger this event, I get this error:
    Mar-30 2:17:40 PM Chromecast ERROR System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Convert.ToInt64(String value) at HSPI_Chromecast.GTTSToken.CalculateToken(String text, String seed) at HSPI_Chromecast.ChromecastTarget.SpeakTextEventHandler(Objec t sender, SpeakTextEventArgs args)

    I get a imilar error if I try and play audio to any chromecast device.

    The plugin seems to read status just fine from the devices. But something is wrong with playback.

    Any ideas as to what's going on?

    thx
    mike



    #2
    On Windows small business server 2003 (I don't run it anymore) I had to enable an additional feature in order to allow the tts to work. Something related to multimedia if memory serves correct. I'm not sure if later versions of Windows server are defaulted in the same way, or if that's even your problem, but thought I'd mention it
    HomeSeer 3, Insteon, Z-wave, USB-UIRT, Google Hub/Chromecasts/Smart Speakers, Foscam cameras, Amcrest camera, RCA HSDB2a doorbell
    Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Insteon, Jon00 Homeseer/Echo Skill Helper, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

    Comment


      #3
      Originally posted by fresnoboy View Post
      Hi. I am running HS3 Pro v 3.0.0.548 on windows server 2019, and version 3.0.0.46 of the plugin.

      Have an event is manually triggered, and then "Speak Something" with "someone is at the door", and speaker client CHROMECAST: POOLHOUSE DISPLAY selected.

      When I trigger this event, I get this error:
      Mar-30 2:17:40 PM Chromecast ERROR System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt64(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Convert.ToInt64(String value) at HSPI_Chromecast.GTTSToken.CalculateToken(String text, String seed) at HSPI_Chromecast.ChromecastTarget.SpeakTextEventHandler(Objec t sender, SpeakTextEventArgs args)

      I get a imilar error if I try and play audio to any chromecast device.

      The plugin seems to read status just fine from the devices. But something is wrong with playback.

      Any ideas as to what's going on?

      thx
      mike


      You need to install the version 3.0.0.49 of the plugin available in the beta section of the updater

      Comment


        #4
        Originally posted by spud View Post


        You need to install the version 3.0.0.49 of the plugin available in the beta section of the updater
        This didnt work for me. I get the connection to Chromecast but no sound.

        Click image for larger version

Name:	Capture.PNG
Views:	60
Size:	234.8 KB
ID:	1466848

        Comment


          #5
          Installing the Beta fixed the error being reported in the log. However nothing happened on the chromecast device. Note I am trying this on one of the google hub displays.

          EDIT: I take that back. I had to wait awhile after the new plugin was installed before it would actually connect. I am seeing the same thing as willy1004 - it connects (and stays connected), but no sound. It stays connected too, it doesn't disconnect.

          Comment


            #6
            Are you using Windows 2019 with Desktop Experience? Do you have Audio enabled? Are you using Google or System TTS voice? Can you play the audio files you're trying to cast locally on the server? What is the audio file format?
            HomeSeer 3, Insteon, Z-wave, USB-UIRT, Google Hub/Chromecasts/Smart Speakers, Foscam cameras, Amcrest camera, RCA HSDB2a doorbell
            Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Insteon, Jon00 Homeseer/Echo Skill Helper, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

            Comment


              #7
              Originally posted by mrceolla View Post
              Are you using Windows 2019 with Desktop Experience? Do you have Audio enabled? Are you using Google or System TTS voice? Can you play the audio files you're trying to cast locally on the server? What is the audio file format?
              Yes, I have the desktop parts installed. Audio is enabled, but there is no speaker hooked to the VM. I am using the Google voice. I am trying to use TTS, not a local file now.

              Comment


                #8
                I believe TTS creates a local file and then casts that to the speaker(s), so you might want to get local audio files working first. I've attached some audio files that I use with the standard HomeSeer "Play an audio file" and hs.PlayWavFile() scripting function, while targeting Chromecast speaker devices. I don't use the plugin's "Cast" feature directly for this.

                I'm curious what happens on your server when you double click one of these audio files? Does a player open and appear to play the file just fine? Does it ask you which app you want to use? Are there any errors? I may be out of ideas.
                Attached Files
                HomeSeer 3, Insteon, Z-wave, USB-UIRT, Google Hub/Chromecasts/Smart Speakers, Foscam cameras, Amcrest camera, RCA HSDB2a doorbell
                Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Insteon, Jon00 Homeseer/Echo Skill Helper, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

                Comment


                  #9
                  Originally posted by mrceolla View Post
                  I believe TTS creates a local file and then casts that to the speaker(s), so you might want to get local audio files working first. I've attached some audio files that I use with the standard HomeSeer "Play an audio file" and hs.PlayWavFile() scripting function, while targeting Chromecast speaker devices. I don't use the plugin's "Cast" feature directly for this.

                  I'm curious what happens on your server when you double click one of these audio files? Does a player open and appear to play the file just fine? Does it ask you which app you want to use? Are there any errors? I may be out of ideas.
                  Thanks for the note. Windows Media Player pops up and complains about the audio device.

                  Comment


                    #10
                    spud would know way more than I, but I suspect this has something to do with your guest OS and/or virtual machine setup. I don't fully understand your system layout. Are you using a hypervisor? If not I'd strongly suggest just running HS on the host OS. I don't see much benefit in running Windows in a VM on top of Windows for anything other than testing something.

                    Firewall or VM network setup may be an issue here. When you cast something you're basically just giving the speaker a URL. In this case that URL is to HS and your speakers need to be able to access it.

                    If that's not it, my last suggestion is to get your VM capable of playing audio. If you're still having these problems after that, then I'm definitely out of ideas.
                    HomeSeer 3, Insteon, Z-wave, USB-UIRT, Google Hub/Chromecasts/Smart Speakers, Foscam cameras, Amcrest camera, RCA HSDB2a doorbell
                    Plugins: BLLAN, BLOccupied, BLUSBUIRT, Chromecast, Insteon, Jon00 Homeseer/Echo Skill Helper, Jon00 DB Charting, MediaController, NetCAM, PHLocation2, Pushover 3P, weatherXML, Z-wave

                    Comment


                      #11
                      Originally posted by mrceolla View Post
                      spud would know way more than I, but I suspect this has something to do with your guest OS and/or virtual machine setup. I don't fully understand your system layout. Are you using a hypervisor? If not I'd strongly suggest just running HS on the host OS. I don't see much benefit in running Windows in a VM on top of Windows for anything other than testing something.

                      Firewall or VM network setup may be an issue here. When you cast something you're basically just giving the speaker a URL. In this case that URL is to HS and your speakers need to be able to access it.

                      If that's not it, my last suggestion is to get your VM capable of playing audio. If you're still having these problems after that, then I'm definitely out of ideas.
                      After doing some more research and testing I am almost convinced that there seems to be a trust issue between my nVidia shield and my server. The example files will play on my server via the local machine remoted in. Since the nVidia Shield is not part of my domain, I dont think the server will pass off any files to play.

                      Comment


                        #12
                        Originally posted by mrceolla View Post
                        spud would know way more than I, but I suspect this has something to do with your guest OS and/or virtual machine setup. I don't fully understand your system layout. Are you using a hypervisor? If not I'd strongly suggest just running HS on the host OS. I don't see much benefit in running Windows in a VM on top of Windows for anything other than testing something.

                        Firewall or VM network setup may be an issue here. When you cast something you're basically just giving the speaker a URL. In this case that URL is to HS and your speakers need to be able to access it.

                        If that's not it, my last suggestion is to get your VM capable of playing audio. If you're still having these problems after that, then I'm definitely out of ideas.
                        I'm not running windows on top of a windows hypervisor, I run an ESXi cluster, and have two different hosts that I can migrate HS to. So if I need to do service on one of the machines, and I migrate the VM to another server. I run all my stuff virtualized, and from as security POV, it's better to keep machines single use when possible. It also gives me amazing abilities to snaphot a system, make a change, and if it doesn't work well, to roll it back.

                        All the machines sit in a rack in the basement with a nice UPS to take care of them. There are some nice Microsoft and VMware programs where you pay a fee per year and get large numbers of licenses to use for development. I always have the latest versions of OS's and run things very locked down to keep the security threats at bay.

                        This results in systems always being up so my family just assumes it's magic...






                        +++++++++++++++++++++++++++++++++++++++++++++++

                        Comment

                        Working...
                        X