Even better remote notifications with Irssi

by Patrick Connelly posted on July 26, 2013

Last month I wrote a Irssi plugin that pushed messages from Irssi to Beanstalkd. I was pretty happy with it, but I wanted more. So, I’ve improved it. The new version pushes in a slightly more normalized json payload to one of two beanstalk tubes. The tubes are configured for here and away. Then the python script that consumes them either displays it via a notification pop up, if sent to the here tube, or to pushover if sent to the away tube.

Setup

  1. Install beanstalkd on a system that both the irssi client (producer) and the system the notifications will be displayed on (consumer) can access via the network
  2. Install and configure the beanstalkNotify.pl script in irssi
    1. Set beanstalk_server to the address of your beanstalkd server
    2. Set beanstalk_port to the port of your beanstalkd server
    3. Set beanstalk_here_tube to the tube name you want (optional)
    4. **Set beanstalk_away_tube to the tube name you want (optional)
  3. If you want to use pushover for your away notifications, do the following. Otherwise, set your beanstalk_away_tube in step 2D to the same as your beanstalk_here_tube
    1. Purchase pushover on your preferred platform [android / ios]
    2. Create a new application
    3. Copy your application key and user token from your account settings
  4. Download and configure beanstalk-notify.py on your consumer system
    1. Run the script python beantalk-notify.py start to generate the directories and basic configuration
    2. Modify the ~/.beanstalk-notify/beanstalk-notify.conf
      1. beanstalk
        1. server: The address / hostname to your beanstalk server
        2. port: The port for your beanstalk server
        3. clear_on_start: If the tubes should be emptied on start. This keeps from flooding you with notifications if the daemon has not been run in a while
        4. away_tube: The name of the tube for pushover messages
        5. away_ignore: A comma separated list of server names (from irssi) to ignore when sending notifications
        6. here_tube: The name of the tube for noticiation messages
        7. here_ignore: A comma separated list of server names (from irssi) to ignore when sending notifications
      2. pushover
        1. app_token: Your application token
        2. user_key: Your user key
        3. notification
          1. use_native: Use the python notification library
          2. type: The type to use. Determines icon
        4. daemon
          1. log_level: The message level for the daemon loggin
    3. Run the script with the updated config python beanstalk-notify.py start
    4. Profit!