Jump to content

New Plugin: Emby.Notification.Slack


ackbarr
 Share

Recommended Posts

i added the dll to /volume1/@appstore/EmbyServer/var/plugins and restarted emby, how i access the config page for the plugin?

Link to comment
Share on other sites

The plugin options (webhook configuration, channel, etc) are in Extras -> Plugins. To control which notifications are sent to which services use Extras -> Notifications

Link to comment
Share on other sites

Thanks! But there is no options for the plugin in the extras > plugins page! Something else i need to do in addition to copy the dll to the plugins folder? Thanks for any advice!

Link to comment
Share on other sites

Thanks! But there is no options for the plugin in the extras > plugins page! Something else i need to do in addition to copy the dll to the plugins folder? Thanks for any advice!

 

Do you have a "hamburger menu" for each plugin? The settings option is in there.

 

59793d07ad860_20170726_20h04_56.png

Link to comment
Share on other sites

the problem is that the tile for your plugin is not there.

That would imply that the Emby server did not successfully load the plugin. Could you please supply your server's log file so that we could see what happened when it tried to launch the plugin file? 

Link to comment
Share on other sites

Error App: Error loading assembly /var/packages/EmbyServer/target/var/plugins/Emby.Notification.Slack.dll

System.UnauthorizedAccessException: Access to the path "/var/packages/EmbyServer/target/var/plugins/Emby.Notification.Slack.dll" is denied.

System.IO.DirectoryNotFoundException: Could not find a part of the path "/volume1/@appstore/EmbyServer/releases/v3.2.26.0/dashboard-ui/Emby.Notification.Slack/Configuration/config.html"

 

something is missing or maybe a permissions issues for the file! thanks for your replies!

 

EDIT:

 

2017-07-26 23:26:56.0593 Error App: Error loading assembly /var/packages/EmbyServer/target/var/plugins/Emby.Notification.Slack.dll
    *** Error Report ***
    Version: 3.2.26.0
    Command line: /var/packages/EmbyServer/target/server/MediaBrowser.Server.Mono.exe -package synology -programdata /var/packages/EmbyServer/target/var -ffmpeg /var/packages/EmbyServer/target/ffmpeg/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/ffmpeg/bin/ffprobe -restartpath /var/packages/EmbyServer/scripts/restart
    Operating system: Unix 3.10.102.0
    64-Bit OS: True
    64-Bit Process: True
    Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Sat Apr 22 19:57:12 CST 2017)
    Processor count: 4
    Program data path: /var/packages/EmbyServer/target/var
    Application directory: /volume1/@appstore/EmbyServer/releases/v3.2.26.0
    System.UnauthorizedAccessException: Access to the path "/var/packages/EmbyServer/target/var/plugins/Emby.Notification.Slack.dll" is denied.
     at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0025f] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
     at System.IO.File.OpenRead (System.String path) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.IO.File.ReadAllBytes (System.String path) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at Emby.Common.Implementations.BaseApplicationHost`1[TApplicationPathsType].LoadAssembly (System.String file) [0x00000] in <c0b17ba779b144e891439898017fa679>:0
    System.UnauthorizedAccessException
     at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0025f] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
     at System.IO.File.OpenRead (System.String path) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at System.IO.File.ReadAllBytes (System.String path) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
     at Emby.Common.Implementations.BaseApplicationHost`1[TApplicationPathsType].LoadAssembly (System.String file) [0x00000] in <c0b17ba779b144e891439898017fa679>:0 

Edited by SynoLoader
Link to comment
Share on other sites

ok, it was a permissions issue! i chmod the dll and now the tile appeared in the plugins page! i'm going to test it out now! thanks for all your support!

  • Like 1
Link to comment
Share on other sites

Hey ackbarr

Have you heard about rocket chat? It's a self hosted slack alternative.

Any plans to make a notification plugin for it, too?

 

Best regards

Link to comment
Share on other sites

Hey ackbarr

Have you heard about rocket chat? It's a self hosted slack alternative.

Any plans to make a notification plugin for it, too?

 

Best regards

 

I am definitely familiar with Rocket.Chat. Because the webhook scripting engine in rocket.chat is so flexible, the current Slack plugin will also work with Rocket.Chat. Take a look at https://github.com/ackbarr/Emby.Plugins/wiki/Supporting-Rocket.Chat for more details. I also believe that the existing plugin can be used with MatterMost, but I have not yet had a chance to test.

Link to comment
Share on other sites

That is great news. I do not have a Synology box, so I've never seen that particular app. I guess I should start a list of compatible applications.

  • Like 1
Link to comment
Share on other sites

apps still workinmg like a charm! After one of the emby updates the IPs are now included in the status messages. Is there a way to include this into the message, i.e.  Makarai is playing "terrible movie 2" on FireTV at 10.0.0.10

Edited by makarai
Link to comment
Share on other sites

This is likely a feature request for emby as the message inside the notification is managed by emby itself. To customize the message go to Extra -> Notifications and click the edit icon for the notification you wish to modify.  I'm running the latest stable version and according to the interface the Video Playback Started event can include the following tokens:

{UserName}, {ItemName}, {DeviceName}, {AppName}
Link to comment
Share on other sites

  • 4 weeks later...

hey @@ackbarr

will you make the needed changes to make the plugin work on the new .net core based version?

 

https://emby.media/community/index.php?/topic/50462-updated-plugin-docs-for-net-core/

 

It doesn't look too difficult to port the plugin to support .NET core. However, it will likely be next week before I have a chance.

  • Like 1
Link to comment
Share on other sites

It doesn't look too difficult to port the plugin to support .NET core. However, it will likely be next week before I have a chance.

thank you very much.

Take your time, I can't switch platform until the Kodi sync queue plugin is compatible with .net core, anyway :-)

Link to comment
Share on other sites

Hi,

 

Is there any chance that you could make a similar one for Discord servers?

 

https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks

https://discordapp.com/developers/docs/resources/webhook

 

According to this, the webhook api layer is compatible with Slack. Have you tried to plug your discord webhook URL into the Slack Incoming Webhook URI field?  I didn't get a chance to try this over the weekend.

 

* Update - looks like you have to add '/slack' to the end of your webhook for it to be "slack-compatible" 

 

https://discordapp.com/developers/docs/resources/webhook#execute-slackcompatible-webhook

Edited by ackbarr
  • Like 1
Link to comment
Share on other sites

I was able to get the existing slack plugin to work with discord as well. Here's how I set it up: https://github.com/ackbarr/Emby.Plugins/wiki/Supporting-Discord

 

Hmm, I can't seem to get it to work, I still get an error back even with putting /slack on the end of the webhook URL. Does this use a specific port? I might need to open it in my firewall potentially.

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...