Announcement

Collapse
No announcement yet.

Chromecast CAPI help

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

    Chromecast CAPI help

    Hello,

    I have an event that runs every hour, plays BigBen sounds.

    But it seems the Google Speakers stay connected, and I can't stream to the speaker from my iPhone.

    I have to disconnect the device, I then can stream to the speaker from my iPhone.

    I want to create a script that will run a disconnect after each BigBen event, but I cannot get it to work.
    ( I have 14 speakers/Chromecast, so I want one script that I can call from multiple events.)

    hs.CAPIControlHandler(hs.CAPIGetSingleControl(2851,True,"0", False,False))

    Root deviceID 2850
    Connection deviceID 2851

    Any help would be appreciated.

    Thank you,
    Tom

    #2
    Originally posted by tmassano View Post
    Hello,

    I have an event that runs every hour, plays BigBen sounds.

    But it seems the Google Speakers stay connected, and I can't stream to the speaker from my iPhone.

    I have to disconnect the device, I then can stream to the speaker from my iPhone.

    I want to create a script that will run a disconnect after each BigBen event, but I cannot get it to work.
    ( I have 14 speakers/Chromecast, so I want one script that I can call from multiple events.)

    hs.CAPIControlHandler(hs.CAPIGetSingleControl(2851,True,"0", False,False))

    Root deviceID 2850
    Connection deviceID 2851

    Any help would be appreciated.

    Thank you,
    Tom
    Sorry, I don't want to take this off topic. Are the BigBen Sounds chimes? Where can I get these from?

    Comment


      #3
      I got mine from here https://www.soundsnap.com/tags/big_ben

      Comment


        #4
        Spud, no recommendations on writing a script to disconnect the Google devices?

        Comment


          #5
          Not sure to understand why you would need to disconnect the plugin from the Chromecast, you shouldn't have to do that.

          Anyway here is some C# code that should do what you want:

          Code:
                          CAPI.CAPIControl[] controls = hs.CAPIGetControlEx(2851, false);
                          CAPI.CAPIControl control = Array.Find(controls, c => c.ControlValue == 0);
                          hs.CAPIControlHandler(control);

          Comment


            #6
            Thank you Spud, I will give this a try.

            Yes, it makes no sense, and I'm sure its a Google bug, not yours.

            I play tones every hour.
            The plugging stays connected

            If I try to cast music from my phone to a speaker, it tells me something went wrong.
            If I try to cast music from my phone to a Display, it gives me a 101 Error.
            This is from Spotify or SiriusXM on my iPhone.

            If I cast to a group of speakers, it works.

            If I reboot the speaker, I have a small window to connect my phone, before HS connects. Once HS connects, I cannot from my phone.

            Always, if I disconnect the HS plugin, I have no issues.

            Thanks again,
            Tom

            Comment

            Working...
            X