Jump to content

Include Webhooks


Recommended Posts

Posted

Hi, yea this is pretty simple. It is a possibility for the future, thanks.

  • Like 4
  • 2 weeks later...
Posted

I think I can do this in a plugin. To make transition from plex easy, I'll use the same JSON output--or as much as possible.

Posted

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
PhyberApex
Posted

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

PhyberApex
Posted

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
Posted

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
Posted

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
  • 2 weeks later...
Posted

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.

PhyberApex
Posted

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

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