View on GitHub

Press-for-success

Success should be celebrated with the entire team

Download this project as a .zip file Download this project as a tar.gz file

inventid logo

Press For Success

Sometimes in your team something awesome happens. Maybe you finally squatted that nasty bug that was troubling you for weeks or maybe you made the most promising sale of the year. Either way: you did something you are really proud of. And that is something others should be able to know!

What is it?

At inventid quite a few people tend to work remote. So we can high-five the people on the office, but that does not always cut it. Since we use Hipchat for our internal communication, it made sense to build something in a few hours to let everyone know about your success. Not only with a message, but with a picture of the emotions you felt when the success was pursued.

Additionally we have a big ass screen in the office which keeps track of some key metrics: Current sales, revenue, server status, and support calls. Something needed to be built here, running on the same PC powering that screen. And it would be great if there was a special act whenever others needed to know about the success.

Hence press-for-success was born.

A big red alarm button was installed on a small pillar in the center of the office, once pressed a picture of the person pressing it should be taken. That picture should be uploaded to Hipchat with a special notification. Finally we wanted to mention everyone who was at the office at that time.

How to use

It quite simple actually. There is a script present startstop.sh which launches the application on the screen (you might have to edit the parts). Then a transparent Java screen is placed on top of the current application (so you can still see your metrics). Whenever the left mouse button is pressed, the application starts its sequence and takes a picture using a webcam, uploads it and notifies people on a Hipchat room.

First clone (or fork) the repository. Edit config.example.txt to config.txt (we will explain the parameters below).

Create an AWS bucket

  1. Login to AWS, go to your console, select S3, and select a region.
  2. Create a bucket (we use a specific bucket for this for convenience).
  3. Create a pressForSuccessImages directory in that bucket.
  4. Create a AWS IAM user which can only upload to that bucket. Note the credentials and enter them in the config.txt file, along with the bucket name and region.

Obtain a Hipchat Token

  1. Go to Hipchat and sign in (administrator).
  2. Press Group Admin, then API.
  3. Create a new Admin user (label it appropriately so you won't forget what is does).
  4. Enter the credential in config.txt.

Identify your Hipchat room ID

You have to specify a room where the notifications will be sent to. Currently you can only specify one room.

  1. Go to Hipchat and sign in (administrator).
  2. Press Group Admin, then Rooms.
  3. Click the room where you want the notification to appear.
  4. Note the API ID and enter it in config.txt.

Setup whosonline

We love to use whosonline since it allows everyone to see who is at the office and go there if they want to work with them on some project. However since we have the data, we also can use it for this project and show who were there when something awesome happened. In case you do not need/want this feature, just remove the entire entry out of the config.txt file. Otherwise continue.

  1. Locate the URL where the machines-online.xml and users.json are located. Ensure they can be read by the PC running press-for-success (we use a VPN for this).
  2. Enter the URL in the config.txt file.
  3. If a user shows up as online, a press will add them to the list of people in the office.

Hardware

We use a big red button for the presses, since it gives that extra feeling when you do something. You can either press or slam your way around thriumps, but it will always work. And pressing an emergency button also just feels really good :wink:.

For this we bought the button (FAK-R/KC11/I) itself. Then using some simple hacker mind, we disassembled an old USB mouse and soldered some connections on the chipboard for the mouse (for the left mouse button). The wires go through the button, where they are soldered in place (with some extra material to make it more resistent to any sort of violence). The other USB side just goes into the PC.

We mounted the button onto a small pillar (which also houses the PC itself) where it is standing in the room, only requiring power and Ethernet and a HDMI cable to the monitor.

There you go, an emergency button functioning as a left mouse. Costs were around € 50,-

Doge is impressed