Jump to content

Include Webhooks


PhyberApex

Recommended Posts

  • 2 weeks later...
nxenos83

Oh, I see that this is setup on the plex account and "travels" with the user across servers. I can create a plugin, but it will be server specific. And you will need to have administrator rights to the server.

 

 

Out of curiosity, what sort of things are you thinking of doing with the on play events?

  • Like 1
Link to comment
Share on other sites

nxenos83

@@PhyberApex

Can you give this plugin a try (unzip the dll into the emby plugin folder and restart emby). The output is only limited data, but it conforms with the format in the sample provided by plex file. I'll continue to map more data points to the output.

 

source: https://github.com/nxenos83/emby.plugin.Webhooks

 

Emby.Webhooks.zip

  • Like 1
Link to comment
Share on other sites

PhyberApex

Hey,

 

I totally missed your replies here so sorry. I am not transitioning from plex I just compare features a lot. I have always been an emby user :)

 

I want to integrate it into my home automation so it can tell me what the newest movie is, what movie is currently playing and stuff like that. Because right now I am using a polling mechanism inside of my home automation system which needs a few seconds to poll the information from emby. It would be great if I could dim the lights as soon as the playback starts on a specific player e.g.

 

I will give your plugin a go later this day / tomorrow and report back! Thanks a lot!

 

~Cheers

Link to comment
Share on other sites

PhyberApex

Hey I just checked it out. I think I can work with that! I don't have Hue lights. I am using home assistant to control everything in my home. If you could add those webhooks, that would be amazing! Also there seems to be a GUI bug if I add one webhook and add another and press delete on the second one both get deleted and I am not able to add another one until I reload the page :)

 

Any chance for this to make it into the "public" plugin catalog? Would be great!

 

~Cheers

  • Like 1
Link to comment
Share on other sites

nxenos83

Thanks, I have a handle on fixing the GUI bug.

 

Thought I could leverage the notification service to attach to the new items added events, but that only provides the name of the item.  I'll try to find another method.

 

Not sure how to get it added to the catalog, but I will check how that is done.

  • Like 1
Link to comment
Share on other sites

nxenos83

Fixed bug in config page.

Added option to listen for items added event

I had to change the media type output so that they were consistent for all events (types will be either movies, tvshows, or music)

 

let me know if you run into any issues

 

I will look into how to add to the plugin catalog another time

 

Emby.Webhooks.zip

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...
mpearon

Forgive my ignorance, but could this be leveraged for sending requests to the Wink API?
I do it via PowerShell's Invoke-WebRequest and Invoke-RestMethod, but I have to assemble the request with a JSON body and some headers.  I'm not sure how I would do this via the plugin.

Link to comment
Share on other sites

PhyberApex

I am don't really know anything about the Wink API but I took a quick look and it does not seem to work with that.

 

What this plugin does:

Send predefined (not customizable) HTTP-POST Request to a URL defined by you with a JSON Body with information about the event that occured.

 

You can add multiple Webhooks and you can specify on which events this Webhook triggers (as of writing this these are: Play, Pause, Stop, Resume, Item Added) for different Media Type (Music, Movie, TV Show).

 

I use it together with HomeAssistant. I don't see a way in the Wink API to use scripts or call the REST API with Post Requests.

 

~Cheers

Link to comment
Share on other sites

  • 2 years later...

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...