Announcement

Collapse
No announcement yet.

Way to turn off a device connected to a Chromecast?

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

    Way to turn off a device connected to a Chromecast?

    So I use a Chromecast connected to my TV/Media center for speakers. When an event plays a file or uses TTS, it turns on the TV and receiver. Is there a way to get it to turn off?

    #2
    Originally posted by Alconnell View Post
    So I use a Chromecast connected to my TV/Media center for speakers. When an event plays a file or uses TTS, it turns on the TV and receiver. Is there a way to get it to turn off?
    The only possible way I think is to use HDMI-CEC - tell Chromecast to turn the TV off via HDMI. I'm investigating this, but I don't see this possible now. Hope I'll find something.

    Another option is to use Logitech Harmony remote connected to HS to send OFF command after TTS (if you have one)

    Comment


      #3
      I'm wanting to do the same thing. I have your plugin stream a camera feed to my chromecasts which automatically turn on the TVs and then begin showing a camera. After 5 minutes, I stop the camera feed and then want to turn off the TV. Using google home, I can tell it to turn off the TV, so it would appear that there's some command that is available, just not sure if you can get to it or not.

      Also, it would be nice to know if the TV is off or on. If it was already on when beginning the web url cast, I could turn off the TV if it was off before showing the camera. If the TV was already on, then I would leave it on after the camera feed was stopped.

      Comment


        #4
        Originally posted by slbuck View Post
        I'm wanting to do the same thing. I have your plugin stream a camera feed to my chromecasts which automatically turn on the TVs and then begin showing a camera. After 5 minutes, I stop the camera feed and then want to turn off the TV. Using google home, I can tell it to turn off the TV, so it would appear that there's some command that is available, just not sure if you can get to it or not.

        Also, it would be nice to know if the TV is off or on. If it was already on when beginning the web url cast, I could turn off the TV if it was off before showing the camera. If the TV was already on, then I would leave it on after the camera feed was stopped.
        Do you know how Google Home turns off the TV? Via Chromecast?

        Google continuously improve their API, problem is - there's no C# API for ChromeCast, so it's a lot of work to find out.

        Regarding getting the status from TV is interesting, but don't see how. Possibly via CromeCast.

        Comment


          #5
          Another possibility is to use DLNA to control the TV, but I would really like to avoid adding another protocol.

          Comment


            #6
            Hmm I hadn't thought of Harmony and I do have one but stopped using it. Might be worth considering.

            Comment


              #7
              Originally posted by Alconnell View Post
              Hmm I hadn't thought of Harmony and I do have one but stopped using it. Might be worth considering.
              Problem is - you need to know if the TV was ON or OFF before TTS - but currently there's no way to find out. Keep thinking

              Comment


                #8
                Originally posted by Alconnell View Post
                Hmm I hadn't thought of Harmony and I do have one but stopped using it. Might be worth considering.
                What TV do you have? There may be plugin for WiFi control for your TV. Also I remember seeing some DLNA plugin and most devices these days support DLNA.

                Comment


                  #9
                  Originally posted by alexbk66 View Post

                  Do you know how Google Home turns off the TV? Via Chromecast?

                  Google continuously improve their API, problem is - there's no C# API for ChromeCast, so it's a lot of work to find out.

                  Regarding getting the status from TV is interesting, but don't see how. Possibly via CromeCast.
                  From reading, Google Home turns the TV off and on via HDMI-CEC through the chromecast. It doesn't appear that this functionality is exposed through the API. Not sure how this would be implemented without something like the Harmony to turn off the TV.The issue of determining if the TV was off or on before casting something to it, so that you could leave it on or turn it off, still remains.

                  There's no technical, just general information on this page that describes how to do it from a consumer point of view. https://support.google.com/chromecas.../7498991?hl=en

                  Comment


                    #10
                    I know that Chromecast uses HDMI-CEC to control the TV, but I also know that there's no public API for that. But Google updates their API regularly, so there's a remote possibility.

                    But I suspect that currently the only feasible option is DLNA.

                    Comment


                      #11
                      Found this yesterday on Hackaday

                      BETTER CONTROLS FOR YOUR CHROMECAST THROUGH CEC

                      https://hackaday.com/2020/01/14/bett...t-through-cec/

                      Comment


                        #12
                        Originally posted by drhtmal View Post
                        Found this yesterday on Hackaday

                        BETTER CONTROLS FOR YOUR CHROMECAST THROUGH CEC

                        https://hackaday.com/2020/01/14/bett...t-through-cec/
                        This part is intriguing. It would be exactly what I'm looking for where the TV could be turned off once the Chromecast goes back to it's idle backdrop state. I currently use this plug-in to display a camera feed on the TV and then after 5 minutes, to quit out of the application and go back to the default idle state. If we could figure out how to turn off the TV, that would be great.

                        "It also sends shutdown commands to the attached TV when Chromecast goes into its idle state, saving energy. It relies on the PyChromecast library to intercept traffic on the network, and thus send the appropriate commands to other hardware."

                        Comment


                          #13
                          Originally posted by slbuck View Post
                          "It also sends shutdown commands to the attached TV when Chromecast goes into its idle state, saving energy. It relies on the PyChromecast library to intercept traffic on the network, and thus send the appropriate commands to other hardware."
                          Yeah, I looked at PyChromecast, will look again. Thank you.

                          Comment


                            #14
                            Originally posted by drhtmal View Post
                            Found this yesterday on Hackaday

                            BETTER CONTROLS FOR YOUR CHROMECAST THROUGH CEC

                            https://hackaday.com/2020/01/14/bett...t-through-cec/
                            I don't think this is of much use. It's not sending commands to Chromecast - it runs on Raspberry PI (Linux, using libcec) connected to the TV via HDMI.

                            Comment


                              #15
                              Originally posted by alexbk66 View Post

                              I don't think this is of much use. It's not sending commands to Chromecast - it runs on Raspberry PI (Linux, using libcec) connected to the TV via HDMI.
                              The OP wanted to turn off the TV when the the Chromecast was done. The Hackaday article specifically states that "It also sends shutdown commands to the attached TV when Chromecast goes into its idle state, saving energy."

                              Comment

                              Working...
                              X