Plex webhooks - trailers, pre-roll, credits

Didn’t find this previously posted.

Wondering if there’s any interest in webhooks supporting the start of trailers, pre-roll, and credits individually? I use my Hue lights with Plex currently and would like to have them dim for trailers, off for the feature and dim up again when credits start. On at the very end. In order to do that webhooks would need to make this information available.

I know currently Plex has no way to know when credits begin, but I’m sure there’s a way to implement some sort of feature where the timecode could be manually entered or fetched from another service where that information could be available.

Based on another post here by @dwclarknu, I actually created an app that controls my lights based on webhook events. I am responding to this post because part of this project, I had to detect the start/end of trailers and pre-rolls. Though I never tried to detect credits (not sure how to even do that), I am able to detect the 90% mark of a movie by consuming the “media.scrobble” webhook event.

Having said that, I was able to dim the lights during trailers, then at the end of the pre-roll (only way to detect media start), I turn off the lights. When a movie is 90%, lights go back to dim, then light turn on when movie is done. Otherwise when trailers/pre-roll aren’t enabled it works just normal. I only have it implemented for Leviton Decora switch, but if I had a Philips Hue, I would include that too :wink:

The major problem I have is that when trailers/pre-roll are enabled, Plex only sends one “media.start” event when you hit play. So there is no way to detect the start of a movie AFTER the trailers/pre-roll are done. This makes a pre-roll required for all the special trailer/pre-roll detection since the end of it is the only way to detect the movie actually starting! I consider this either a flaw or limitation with the webhooks that Plex would need to fix/implement so I don’t have to code around it.

If interested in how I detect trailers/pre-roll, or just interested in controlling your lights with Plex, see my project at: Plex Lighting Automation - Webhook

It would be very useful for home automation to be able to detect when a show or movie reaches the credits (from the new credits detection feature!). This could be used to slowly brighten the lights just like in a theater.

This seems like a straight forward thing for the devs to add. Would love to use it in my home theater. I already use plex webhooks and homebridge to dim and brighten the lights when I start and stop a movie.

+1 for this

I already use webhooks to publish playback events, which I then use to control the lights. Sure would be sweet to raise the lights and drop the volume by say 30% when the credits roll!

3 Likes

I would like to revisit this request now that we have Skip Credits Feature. It would be ideal to have the Credits as a webhook to bring lights back up during the credits.

I would very much like to have separated playback control events for trailers and the main feature.

I want to dim the lights only halfway when the trailers are playing, and dim them all the way down when the main movie starts (like they do in cinemas).

BR,
Morten

Anyone?
Trying to automate the lights is useless if they turn on and off between pre-rolls, trailers and main feature. Ruins the entire experience.

Here to throw another vote for a credits webhook.

And I hadn’t even considered volume control when credits roll, great idea!

+1, seems simple to implement & would give some nice options.

+100, would love to see this. The credit data is already there so I imagine it shouldn’t be much effort to expose this to webhooks!

Also mentioned here:

This would definitely be useful for lighting automation. It would be handy to have something similar to media.scrobble which triggers at 90%, but media.credits when the credits roll.

!00% agree, this would be a very nice feature to have, need it to turn on the lights when the credit rolls. We already have this Kaleidescape and it just makes the movie experience much more cinema like. So please, if possible, add this feature.

Thanks!

A huge gap in automation capabilities is the missing event for when the “Skip Credits” comes up. This is the best time to bring up lights or perform other home automations - not the 90% mark.

My suggestion is that we have a webhook available for this specific event!