Announcement

Collapse
No announcement yet.

Playbar Autoplay

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

  • Playbar Autoplay

    Would it be possible to add a Sonos action to enable/disable Playbar Autoplay?

  • #2
    Originally posted by baudi View Post
    Would it be possible to add a Sonos action to enable/disable Playbar Autoplay?
    I didn't know you could even do that. Is this to prevent that it automatically switches to TV(optical) input? Could you explain why you want to automate that, perhaps an example. Maybe it can be done in a different way.
    Dirk

    Comment


    • #3
      I have the playbar connected to my TV, and my TV connected to my HTPC computer.

      Suppose autoplay is on, and suppose I am listening to a radio station on Sonos. If I open certain websites (such as the Washington Post) in Chrome, even if there is no audio playing from the website, there's apparently some signal sent to the playbar that causes it to stop playing the radio station and switch to the website sound (which is silent). It's like the website signals that it may be sending audio soon, even if it's not sending it now.

      Now suppose Autoplay is off in the scenario above. Everything works fine. I can go to a website and the playbar ignores the signal. There's just one problem: If I stop listening to the radio and switch the Playbar to take its input from the TV signal, and then nothing plays on the TV for 10 minutes or so, the playbar apparently times out and will not play the TV audio until I tell it to take its signal from the TV again.

      So what I'd like to be able to do is turn autoplay on when I switch the playbar to take its input from the TV, and switch it off when I want to listen to Sonos music or radio.

      Comment


      • #4
        Here's the Sonos app screen for turning autoplay on and off
        Click image for larger version

Name:	Screenshot_20181130-223410.png
Views:	13
Size:	90.5 KB
ID:	1263409

        Comment


        • #5
          Originally posted by baudi View Post
          I have the playbar connected to my TV, and my TV connected to my HTPC computer.

          Suppose autoplay is on, and suppose I am listening to a radio station on Sonos. If I open certain websites (such as the Washington Post) in Chrome, even if there is no audio playing from the website, there's apparently some signal sent to the playbar that causes it to stop playing the radio station and switch to the website sound (which is silent). It's like the website signals that it may be sending audio soon, even if it's not sending it now.

          Now suppose Autoplay is off in the scenario above. Everything works fine. I can go to a website and the playbar ignores the signal. There's just one problem: If I stop listening to the radio and switch the Playbar to take its input from the TV signal, and then nothing plays on the TV for 10 minutes or so, the playbar apparently times out and will not play the TV audio until I tell it to take its signal from the TV again.

          So what I'd like to be able to do is turn autoplay on when I switch the playbar to take its input from the TV, and switch it off when I want to listen to Sonos music or radio.
          I see ....

          You can also turn autoplay off all together and run an action to change the playbar to "TV" which would have the same effect. Alternatively, if you mute the TV when you are using chrome does that still causes the playbar to switch?

          I had a quick look at what is available on the UPNP interface, and I don't immediately see the option to do just what you ask

          Dirk

          Comment


          • #6
            Originally posted by dcorsus View Post
            (1) You can also turn autoplay off all together and run an action to change the playbar to "TV" which would have the same effect.
            (2) Alternatively, if you mute the TV when you are using chrome does that still causes the playbar to switch?Dirk
            (1) That's the scenario I outlined in the second paragraph above. It doesn't work well because switching the playbar to TV only lasts for a few minutes if nothing is playing. After a few minutes of no audio, it times out and you have to switch it to TV again when you want to play tv audio again.

            (2) Assuming you mean muting the audio using the Windows Volume Mixer, that almost works, but the mute is cancelled as soon as you change the system volume.

            Comment


            • #7
              Originally posted by baudi View Post
              (1) That's the scenario I outlined in the second paragraph above. It doesn't work well because switching the playbar to TV only lasts for a few minutes if nothing is playing. After a few minutes of no audio, it times out and you have to switch it to TV again when you want to play tv audio again.
              I did not know this. So if autoplay is off and you select TV, after a number of minutes of no input it switches to something else? Might be a Sonos bug.

              Originally posted by baudi View Post
              (2) Assuming you mean muting the audio using the Windows Volume Mixer, that almost works, but the mute is cancelled as soon as you change the system volume.
              Don't take my response as being argumentative, hope it read I'm trying to help You could mute the TV I guess, but I probably still not get the whole setup.

              If you are playing say a radiostation on the playbar, the problem appears any noise coming from your PC switches the playbar input to "TV" and your music is gone, hope I still get it right?

              You say mute on the PC would work but any changing of volume would undo that, so why would you change the volume in the first place if you do not want it to come out of the TV->Playbar? Is this maybe some dual output arrangement where you pipe sound to TV AND some other speakers? If so, maybe that's were all the trouble start and we could talk about solving that.

              Where I'm going with this is that in any scenario, you must have some logic in mind how you set/unset things. Something like, I click on this and I trigger an event which has action x, y, z to do something. So you would need some "on" event and some "off" event. How do you see that?

              If you had in mind that "on" represented turning autoplay on and "off" would turn it off, how were you planning on triggering these event? Automated (meaning triggered on something else) or manually (you navigate to the HS pages and click on buttons). So let's set aside how we trigger, say we define On and Off as some other events, it could be a combination of switching the playbar to say TV and depending on the TV we could send a mute to the TV ...... or some variation of the above. If the TV is DLNA/UPNP enabled, my mediacontroller PI would be capable of setting mute on/off, or perhaps automatically switch inputs etc. Which model TV is this?

              Hope this helps, glad to brainstorm and provide some alternative pointers to get you where you want to be

              Dirk

              Comment


              • #8
                TLDR: I have a complicated and unusual setup that's an extreme edge use case. Probably not worth accommodating it.

                Originally posted by dcorsus View Post
                I did not know this. So if autoplay is off and you select TV, after a number of minutes of no input it switches to something else?
                Yes, it switches to "[No music selected]"

                Originally posted by dcorsus View Post
                Don't take my response as being argumentative, hope it read I'm trying to help
                Not at all. I'm grateful for your help.

                Originally posted by dcorsus View Post
                If you are playing say a radiostation on the playbar, the problem appears any noise coming from your PC switches the playbar input to "TV" and your music is gone, hope I still get it right?
                Right.

                Originally posted by dcorsus View Post
                You say mute on the PC would work but any changing of volume would undo that, so why would you change the volume in the first place if you do not want it to come out of the TV->Playbar?
                Yes, that's a very good question. It exposes my somewhat strange set up. I have the thumbwheel on my Logitech MX Master 2S mouse assigned to system volume. I use eventghost to monitor the system volume. Whenever it changes, I send a Json request to your plugin to change the Sonos volume to match the system volume. I am unable to assign the thumb wheel to any other useful action that eventghost can monitor.

                Originally posted by dcorsus View Post
                Where I'm going with this is that in any scenario, you must have some logic in mind how you set/unset things. Something like, I click on this and I trigger an event which has action x, y, z to do something. So you would need some "on" event and some "off" event. How do you see that?
                When I say "Hey google, radio", Homeseer runs an event that executes your PI's "play favorite" action to start playing a radio station. When I say "Hey google, tv", Homeseer runs an event that executes your PI's "play tv" action to start playing the playbar's optical input. Ideally, I'd like to put "autoplay off" and "autoplay on" actions into those events.

                Originally posted by dcorsus View Post
                So let's set aside how we trigger, say we define On and Off as some other events, it could be a combination of switching the playbar to say TV and depending on the TV we could send a mute to the TV ...... or some variation of the above. If the TV is DLNA/UPNP enabled, my mediacontroller PI would be capable of setting mute on/off, or perhaps automatically switch inputs etc. Which model TV is this?
                Muting my TV wouldn't really help, because I have to split the HDMI signal before it gets to the TV so that I can extract 5.1 audio for input to the playbar.

                Originally posted by dcorsus View Post
                Hope this helps, glad to brainstorm and provide some alternative pointers to get you where you want to be

                Dirk
                If you've read this far, Thank You!

                Comment


                • #9
                  Originally posted by baudi View Post


                  Muting my TV wouldn't really help, because I have to split the HDMI signal before it gets to the TV so that I can extract 5.1 audio for input to the playbar.
                  !
                  Your tv is the only one connected physically to the playbar so wouldn’t muting your tv prevent the playbar from switching away from your music? I suppose your pc is connected to the Tv by hdmi so if you mute the tv it mutes wathever comes from your PC, no?
                  Is this a playbar with optical interface or a beam with HDMI?

                  Comment


                  • #10
                    Originally posted by dcorsus View Post

                    Your tv is the only one connected physically to the playbar so wouldn’t muting your tv prevent the playbar from switching away from your music? I suppose your pc is connected to the Tv by hdmi so if you mute the tv it mutes wathever comes from your PC, no?
                    Is this a playbar with optical interface or a beam with HDMI?
                    My TV is not connected to the playbar. Here's the setup: HDMI cable from computer to HDMI Audio Extractor, optical cable from audio extractor to playbar, HDMI cable from audio extractor to TV. Muting the TV has no effect on the sound going from the audio extractor to the playbar.

                    Comment


                    • #11
                      This recurring event appears to be a workaround for the problem.

                      ​ ​​​​​​​

                      Comment


                      • #12
                        Originally posted by baudi View Post
                        This recurring event appears to be a workaround for the problem.

                        Code:
                        {"data-align":"none","data-size":"full","data-tempid":"temp_73882_1543883016956_240"}[/ATTACH]​ ​​​​​​​
                        ?????????

                        Comment


                        • #13
                          Strange. I uploaded an image, anf the image displays correctly when I look at the post. Anyway, here it is again.

                          Click image for larger version

Name:	Annotation 2018-12-03 191811.jpg
Views:	8
Size:	23.7 KB
ID:	1264094

                          Comment


                          • #14
                            Actually, I changed the event to what's shown below. I couldn't get device value "No Track" to trigger. I had to change it to an easy trigger string comparison against a null string. Anyway it seems to be working now. Here's the new version.

                            Click image for larger version

Name:	Annotation 2018-12-03 211137.jpg
Views:	8
Size:	24.8 KB
ID:	1264114

                            Comment

                            Working...
                            X