Page 1 of 1

Slack Notify - Indigo Notification Plugin for Slack

PostPosted: Sun Feb 22, 2015 11:10 am
by achterberg
Plugin for one of the internet's current poster children, Slack

Posting a message like:

*f.lux* _set_ to %%v:159384927%%\n`And this is a line displayed as code.`\n:bulb: <https://slack.com>

results in the following eye candy:

Image
Optionally uploading an image with the message.
The plugin will also optionally upload a local file (e.g., the indigo log) to Slack.

The plugin is here, with instructions. Discussions should probably remain in this forum post though. Feel free to clone, make changes, and issue a pull request. I'm new to GitHub but this way, hopefully, contributions and improvements will be seemless. I am not a python developer, and this plugin is guaranteed to break in production :D . The code is a mess (PEP 8, what?). It works for me so far, but not every feature (Indigo and Slack) has been tested thoroughly. I'll try to fix things as they come up. I "borrowed" code snippets from other plugins and have attempted to provide credit.

For a simple python script:
Added to an embedded or external python script and with a few custom icons uploaded to Slack it will produce output like:

Image

Re: Slack Notify - Indigo Notification Plugin for Slack

PostPosted: Mon Feb 23, 2015 8:42 pm
by matt (support)
This is really cool. Thanks for sharing it.

Now I have another reason to try out Slack. :-)

Re: Slack Notify - Indigo Notification Plugin for Slack

PostPosted: Tue Feb 24, 2015 12:49 pm
by achterberg
Thanks. I was wanting to explore writing a plugin and since I am hardware poor, I thought it was a good target. Maybe easier than a device plugin I think. To anyone wanting to develop a plugin, there is a learning curve, like everything, but there are plenty of examples and good documentation to do so.

Re: Slack Notify - Indigo Notification Plugin for Slack

PostPosted: Sun Feb 07, 2016 7:30 pm
by willidiots
Thanks for writing this! Just installed it and working great. One question - for device values, where do I find the state key?

Re: Slack Notify - Indigo Notification Plugin for Slack

PostPosted: Wed Apr 26, 2017 1:49 pm
by petematheson
Thanks for this!

Worth updating the installation notes as getting the Team Key has changed since you last documented it I believe. I had to search around and go to the 'Legacy API' section.

Re: Slack Notify - Indigo Notification Plugin for Slack

PostPosted: Thu Dec 28, 2017 8:06 am
by henkjanvries
I was wondering if it was possbile to create input a variable into the file field for a path.
Im creating small movs from the camera monitoring the frontdoor, but the path to that file is interchangeable based on time.
So what i did was create a trigger that generates the filepath and put that into a variable.
If than can add the variable to the file, it can than be uploaded along the slack post.

Is this something that is easy to do? Would you prefer certain path formats?

loving to hear whats possible.

Re: Slack Notify - Indigo Notification Plugin for Slack

PostPosted: Thu Dec 28, 2017 9:41 am
by henkjanvries
I cant seem to add a file at all. if i add the path to the file, logs show it uploads, but i dont receive anything in Slack.

any clues?

Re: Slack Notify - Indigo Notification Plugin for Slack

PostPosted: Tue Jan 09, 2018 10:54 am
by jay (support)
This plugin has now been added to the Plugin Store. The original developer is no longer directly supporting it so we moved it into the Indigo Domotics repo on GitHub. If you want to report issues you can report them here or in the Issue tracker for the repo. Note, however, that we do not maintain the plugin, we're only hosting it. If someone wants to make changes then just fork, change, and submit a pull request on GitHub and we'll get a new release into the plugin store.

Re: Slack Notify - Indigo Notification Plugin for Slack

PostPosted: Thu Sep 06, 2018 8:09 pm
by FlyingDiver
It appears that Slack has changed the authentication method used for the Slack API. Or that their webpages have changed enough that the instructions with the plugin don't match up anymore.

If there's anyone currently using this plugin who can help clarify how to set it up, please comment on this issue: https://github.com/IndigoDomotics/slack-notify/issues/1

Otherwise, I have it on my to-do list to get this working with the current authentication scheme. Alternatively, I might rewrite it to use the current Slack API and Python library.