New Slack Notification plugin

Posted on
Tue Oct 30, 2018 3:54 pm
FlyingDiver online
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

New Slack Notification plugin

The old one was using a discontinued Slack authentication method, and it was easier to write a new plugin from scratch than to fix it.

http://www.indigodomo.com/pluginstore/192/

This one doesn't do all the fancy emojis and file uploads (yet), but it does work with multiple Workspaces.

Enhancement requests and bug reports to the GitHub issues page, please.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed Oct 31, 2018 8:35 am
FlyingDiver online
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Slack Notification plugin

Release 1.0.1 has been posted with support for uploading files.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Dec 08, 2018 9:04 am
henkjanvries offline
User avatar
Posts: 108
Joined: May 05, 2012

Re: New Slack Notification plugin

Hi Joe,

thanks for working on this.

I cant seem to find how to use the slack 2 notification method in triggers, the plugin itself doesnt have aconfig setup, so how can i connect the plugin to my slack environment?
thanks

Posted on
Sat Dec 08, 2018 4:33 pm
FlyingDiver online
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Slack Notification plugin


joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Sep 19, 2019 3:15 am
slackman1 offline
Posts: 52
Joined: Jun 20, 2011

Re: New Slack Notification plugin

Hi,

Installing the Slack 2 Indigo Plugin, it unfortunately fails on startup. Running Indigo 7.3 on El Capitan, it seems that a Python module cannot be found by the plugin:

Slack 2 Error Error in plugin execution InitializeMain:
Traceback (most recent call last):
File "plugin.py", line 4, in <module>
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Slack2.indigoPlugin/Contents/Server Plugin/slackclient/__init__.py", line 1, in <module>
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Slack2.indigoPlugin/Contents/Server Plugin/slackclient/client.py", line 8, in <module>
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Slack2.indigoPlugin/Contents/Server Plugin/slackclient/server.py", line 14, in <module>
ImportError: No module named websocket
Stopping plugin "Slack 2 1.0.1" (pid 6867)

Should I install this module to have the plugin working correctly? If so, could you maybe advise on the best way to do this?

Thanks, Gerrit Jan

Posted on
Thu Sep 19, 2019 6:07 am
FlyingDiver online
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Slack Notification plugin

The best way to fix is is to upgrade to a more current version of MacOS X that includes Python 2.7, which has websockets built in. I think El Capitan only has Python 2.6.

You might be able to fix it by manually installing websockets using "sudo pip install websockets"

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Sep 20, 2019 8:53 am
slackman1 offline
Posts: 52
Joined: Jun 20, 2011

Re: New Slack Notification plugin

Hi Joe,

Thanks for your kind reply and suggestions. However, Indigo on El Capitan has Python 2.7.10 available, also if I open a scripting shell from within Indigo:
------
Python 2.7.10 (default, Oct 23 2015, 19:19:21)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)]
Connected to Indigo Server v7.3.1, api v2.1 (localhost:1176)
>>>
------
(and these 2009 Mac mini's keep running and running and running... :D )

Tried the fix you suggest, but could not install as root. Had to do: pip install --user websocket.
This seemed to make websocket available to the plugin, but the next issue is then the 'create_connection' module or function:
------
File "/Library/Application Support/Perceptive Automation/Indigo 7.3/Plugins/Slack2.indigoPlugin/Contents/Server Plugin/slackclient/server.py", line 14, in <module>
ImportError: cannot import name create_connection
------

Any further suggestions? Am I missing some obvious prerequisite like installing Slack desktop client or so?

Thanks for your reply in advance.

Best regards, Gerrit Jan

Posted on
Fri Sep 20, 2019 9:13 am
FlyingDiver online
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Slack Notification plugin

OK, I'm going to have to investigate this. I could have sworn that websockets was pre-installed on the systems this plugin was tested on, but now I'm not so sure.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Sep 20, 2019 9:51 am
FlyingDiver online
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Slack Notification plugin

Looks like you need these two commands to fully install websockets:

Code: Select all
sudo pip install websocket
sudo pip install websocket-client


The install requires the Xcode command line tools, so those need to be installed first, if not already.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Fri Sep 20, 2019 1:21 pm
slackman1 offline
Posts: 52
Joined: Jun 20, 2011

Re: New Slack Notification plugin

Hi Joe,

Success!

Some additional information, I saw that you already amended the Wiki.
It seems to be (searching the web) that when OS X SIP protection is enabled on a Mac (check with csrutil) with El Capitan, pip cannot install successfully as root.
I used the --user option, works fine and indeed the 2 commands you provide are sufficient to get the plugin running correctly.
Code: Select all
pip install --user websocket
pip install --user websocket-client


Furthermore, some feedback on the info you provide on Scopes. I think it would be more clear to (also) list the 'technical' access designators, like so.

CONVERSATIONS
Code: Select all
Access information about user’s public channels
channels:read
Send messages as user
chat:write:user

FILES
Code: Select all
Upload and modify files as user
files:write:user


I also got a choice of the Scope 'Send messages as <slack app name>' with chat:write:bot designator, which worked equally well with your plugin.

So, thanks you again for building this, helping me and maybe some others in using this plugin...

Best regards, Gerrit Jan

Posted on
Tue Mar 17, 2020 12:17 pm
slackman1 offline
Posts: 52
Joined: Jun 20, 2011

Re: New Slack Notification plugin

Hi Joe,

I think the Slack2 plugin connects to Slack with a TLS version that is now phased out by Slack. (1.0 or 1.1)
Is this the case or is this caused by my old OS version (10.11.6)?

Thanks, Gerrit Jan

Posted on
Tue Mar 17, 2020 5:22 pm
FlyingDiver online
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Slack Notification plugin

slackman1 wrote:
Hi Joe,

I think the Slack2 plugin connects to Slack with a TLS version that is now phased out by Slack. (1.0 or 1.1)
Is this the case or is this caused by my old OS version (10.11.6)?

Thanks, Gerrit Jan


It’s your OS version. You need to be running High Sierra or later.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Mar 22, 2020 10:40 am
slackman1 offline
Posts: 52
Joined: Jun 20, 2011

Re: New Slack Notification plugin

Hi Joe,

Thanks for clearing that...:-)

Best regards, Gerrit Jan

Posted on
Sun Nov 29, 2020 7:28 am
avdhil offline
Posts: 4
Joined: Jan 19, 2017

Re: New Slack Notification plugin

Hi Joe,

Just installed the plugin. App and token should be fine. But I do get errors:

Code: Select all
 Started plugin "Slack 2 1.0.1"
   Slack 2 Debug                   Slack 2 startup
   Slack 2 Debug                   Slack Mi-Casa: Starting Device
   Slack 2 Error                   Slack Mi-Casa: Slack connection error: method_deprecated


Any idea?

Posted on
Sun Nov 29, 2020 7:32 am
FlyingDiver online
User avatar
Posts: 7220
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: New Slack Notification plugin

avdhil wrote:
Hi Joe,

Just installed the plugin. App and token should be fine. But I do get errors:

Code: Select all
 Started plugin "Slack 2 1.0.1"
   Slack 2 Debug                   Slack 2 startup
   Slack 2 Debug                   Slack Mi-Casa: Starting Device
   Slack 2 Error                   Slack Mi-Casa: Slack connection error: method_deprecated


Any idea?


Looks like they changed the API. Please open an issue on GitHub.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 3 guests