Jump to content

Webhooks - Android TV Resume and Pause do not send a hook


Recommended Posts

JustEric78
Posted

@@Luke @@ebr

 

I have been working with Derek over at https://sequematic.com/ to automate my lights turning on and off based off of the event that Emby sends over. I will be posting a write up on how to get this setup for other users but in the meantime, we found that a hook is not sent for pause or resume. I will still add those steps in my write up with the caveat that it is currently not working for those two commands. On a side note, out of my ignorance, what is the scrobble event? I have not set that up so depending on what it is supposed to do, I will add that to the write up.

  • Like 1
Posted

What emby app are you testing with?

JustEric78
Posted

What emby app are you testing with?

 

@@ebr Windows Server 2012 R2 and an Nvidia Shield for playback

Posted

Please test this with the next release of the app.

 

Thanks.

  • Like 2
JustEric78
Posted

Thank you @@ebr

 

Thank you, in that case I will leave that functionality baked into the sequence that I posted about separately in the home automation section. 

  • 3 weeks later...
pir8radio
Posted (edited)

OOPS WRONG THREAD

Edited by pir8radio
Posted

@@ebr I'm using version: 1.7.92g and am seeing a pause event but not the unpause event

Posted

@@ebr I'm using version: 1.7.92g and am seeing a pause event but not the unpause event

 

In exactly what context?

Posted

In exactly what context?

Using the web app I get a playback.unpause event with webhooks.

Using the Android app I do not. I only get playback.start, playback.stop and playback.pause

  • Thanks 1
Posted

Using the web app I get a playback.unpause event with webhooks.

Using the Android app I do not. I only get playback.start, playback.stop and playback.pause

 

Playing what?

Posted

Playing what?

TV Episode

 

I didn't test with movies or music. I can give those a test this evening.

Posted

That would be great, thanks .

JustEric78
Posted (edited)

Is the pause/resume triggers supposed to be working now? Unless I have the hooks worded wrong, they are still not working for me via an Nvidia Shield and Server 2012 R2. Currently I have it looking for playback.pause and playback.resume

Edited by JustEric78
Posted (edited)

@@ebr @@Luke

TV Series:

I receive playback.start, playback.stop, playback.pause

I do not receive playback.unpause

 

Movies 

I receive playback.start, playback.stop, playback.pause

I do not receive playback.unpause

 

Music

I receive playback.start and playback.stop

When paused it sends a playback.stop followed immediately by playback.scrobble

When resumed it sends a playback.start instead of playback.unpause

 

This is android tv only. On the android mobile app they all work as expected.

 

Another thing I've noticed in my testing is that the webhooks seem to stop sending after the server has been running a while. To do the above test I had to reboot the server and I noticed the same thing yesterday as well. I'll pull the logs if I notice it persists.

 

@@JustEric78 you should be looking for playback.unpause not resume. playback.pause is working

Edited by MRobi
Posted

@@Luke

 

4:58pm and currently watching Westworld S03E01

Last webhook was sent at 3:11pm and you can see numerous playback starts and stops afterwards.

 

In the logs though I don't even see where Westworld even started to be played. You can see the playback start reported at 16:55 but no details in logs showing what it was.

embyserver.txt

Posted

Thanks, looks like the app needs to be updated to send the unpause event.

Posted

Music

I receive playback.start and playback.stop

When paused it sends a playback.stop followed immediately by playback.scrobble

When resumed it sends a playback.start instead of playback.unpause

 

Perhaps we just need to send unpause in addition to start here because there is no distinction with music between pausing and stopping. 

 

How do you treat unpause differently from start?

Posted

Perhaps we just need to send unpause in addition to start here because there is no distinction with music between pausing and stopping. 

 

How do you treat unpause differently from start?

 
 

In my specific use case I treat an unpause exactly the same as a start. But I can't speak for everyone. Others may have a better use for it.

I only mention it for consistency since android mobile sends an unpause while android tv sends a start.

 

    switch(status) {
        case ["playback.start","playback.unpause"]: status = "playing"; break;
        case ["playback.pause"]: status = "paused";  break;
        case ["playback.stop","playback.scrobble"]: status = "stopped"; break;
    }
JustEric78
Posted

 

 
 

In my specific use case I treat an unpause exactly the same as a start. But I can't speak for everyone. Others may have a better use for it.

I only mention it for consistency since android mobile sends an unpause while android tv sends a start.

 

    switch(status) {
        case ["playback.start","playback.unpause"]: status = "playing"; break;
        case ["playback.pause"]: status = "paused";  break;
        case ["playback.stop","playback.scrobble"]: status = "stopped"; break;
    

Same, pause is the same as stop and unpause is the same as start. 

Posted

The thing is "stop" just doesn't exist in the current world of music players.  I doubt you can show me one with a stop button on the interface.  But, as far as actual operation (from the computer's standpoint) goes, it makes more sense to me to treat the pause of music as a stop because that is the only way to stop a current music player.

Posted

The thing is "stop" just doesn't exist in the current world of music players.  I doubt you can show me one with a stop button on the interface.  But, as far as actual operation (from the computer's standpoint) goes, it makes more sense to me to treat the pause of music as a stop because that is the only way to stop a current music player.

Is it possible for pause to be sent when paused and stop to be sent when backing out of the music screen?

Otherwise I do agree that leaving it as-is for music would be best with just start/stop and add the unpause to tv and movies.

Posted

Is it possible for pause to be sent when paused and stop to be sent when backing out of the music screen?

 

Backing out of the music screen does not stop music playback.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...