PhyberApex 16 Posted February 3, 2017 Share Posted February 3, 2017 Hey, I'd really like it if emby would enable me to configure some webhooks much like the ones over @@Plex as seen here: https://support.plex.tv/hc/en-us/articles/115002267687 this would enable advanced users (as myself) to do all sorts of things as soon as emby plays media. ~Cheers 5 Link to comment Share on other sites More sharing options...
Luke 37269 Posted February 3, 2017 Share Posted February 3, 2017 Hi, yea this is pretty simple. It is a possibility for the future, thanks. 4 Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 14, 2017 Share Posted February 14, 2017 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. Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 14, 2017 Share Posted February 14, 2017 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? 1 Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 14, 2017 Share Posted February 14, 2017 @@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 1 Link to comment Share on other sites More sharing options...
PhyberApex 16 Posted February 14, 2017 Author Share Posted February 14, 2017 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 More sharing options...
nxenos83 52 Posted February 14, 2017 Share Posted February 14, 2017 There should be info in the output to handle the lights dimming and what is currently playing. If you have Hue, I have this to dim my lights on play/resume https://emby.media/community/index.php?/topic/44781-plugin-for-controlling-hue-light/ I look to add hooks based upon new items being added. 1 Link to comment Share on other sites More sharing options...
PhyberApex 16 Posted February 14, 2017 Author Share Posted February 14, 2017 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 1 Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 15, 2017 Share Posted February 15, 2017 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. 1 Link to comment Share on other sites More sharing options...
nxenos83 52 Posted February 17, 2017 Share Posted February 17, 2017 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 2 Link to comment Share on other sites More sharing options...
mpearon 7 Posted March 1, 2017 Share Posted March 1, 2017 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 More sharing options...
PhyberApex 16 Posted March 1, 2017 Author Share Posted March 1, 2017 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 More sharing options...
nxenos83 52 Posted March 1, 2017 Share Posted March 1, 2017 Lets move this discussion regarding this plugin here: https://emby.media/community/index.php?/topic/45318-webhooks-plugin/ Link to comment Share on other sites More sharing options...
Luke 37269 Posted October 22, 2019 Share Posted October 22, 2019 There will be a new webhooks plugin with the upcoming Emby Server 4.3: https://emby.media/community/index.php?/topic/77969-new-webhooks-plugin/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now