Blink1Control is the primary user-level application for controlling blink(1).
It is an event-based system, where events on your computer or on
the Net (via IFTTT!) can trigger color patterns on the blink(1).
Help Topics:
QuickStart: Connecting IFTTT to your blink(1)
Application Layout
Tools (Scripts/Files/URLs) Response Format
Mail Matching Rules
Tray / Menu Icon functions
Additional technical information can be found at: https://github.com/thingm/blink1/tree/master/docs
QuickStart: Connecting IFTTT to your blink(1)
IFTTT is an Internet-based service that connects other Net-based systems together.
IFTTT communicates with Blink1Control via "Rule names": IFTTT sends an event with
a given rule name and Blink1Control looks for events with matching rule names.
If the rule names match, Blink1Control will play the color pattern you've chosen.
On the IFTTT site, the rule name is specified in the blink(1) action of your recipe.
The general steps to hook IFTTT to Blink1Control are:
Get IFTTT Key from Blink1Control
Activate the blink(1) channel on IFTTT
Create an IFTTT recipe
Configure Blink1Control to watch for recipe
1. Get IFTTT Key from Blink1Control
On the left side of Blink1Control is the "Device" area with the "IFTTT key".
The IFTTT key is 16 hexadecimal characters.
Double-click the IFTTT key and press Ctrl-C / Cmd-C to copy it to your clipboard.
This number is what IFTTT uses to uniquely identify your blink(1).
2. Activate blink(1) Channel on IFTTT
Visit IFTTT.com and create an account for free.
Click on "Channels" then the "blink(1)" channel.
Click the Activate button and type in the IFTTT key from Blink1Control.
Click Activate once more and your blink(1) channel is now set up.
3. Create an IFTTT Recipe
To test everything out, let's create a really simple recipe where IFTTT listens for email from you
and then sends an event to your blink(1).
Go to "My Recipes" on IFTTT and click "Create a Recipe".
Pick the "Email" trigger (the "this") and then "blink(1)" action (the "that").
For the blink(1) action, there's a single field called "Rule name". This is the important bit.
Make up a rule name that's short and indicates what this recipe is about. In this example, it's "my_first_rule".
This is what you will also type in Blink1Control later.
Click on "Create Action" and then "Create Recipe" and you are done on the IFTTT site.
4. Configure Blink1Control to watch for recipe
Back in Blink1Control, click on the "IFTTT" tab and then the "+" button to add a new blank IFTTT rule.
Once you add a rule, the Recent Events area on the left will show any newly received IFTTT events.
(You might see a "Channel Activated" event from IFTTT. This indicates that Blink1Control has succesfully talked with IFTTT)
Double-click on the rule name, type in the rule name you used on IFTTT ("my_first_rule" in this case) and press Enter .
And pick a color pattern you like to play on the blink(1) when the recipe fires.
Now send a mail to "trigger@ifttt.com" from the email address IFTTT is expecting and your blink(1) will blink!
You will also see the event in the Recent Events list.
You can create more recipes using IFTTT. But be aware, as IFTTT says on their About page:
"Most Personal Recipes check for new Trigger data every 15 minutes, some are even faster."
Application Layout
The Blink1Control application has two status areas on the left, a color picker and color pattern chooser on the bottom,
and a set of control pages under tabs on the right.
The parts of the main Blink1Control page:
A. Virtual blink(1) -- Reflects what's going on the real blink(1) device
B. Serial number and IFTTT key -- Useful when setting up IFTTT
C. Recent events list -- Any of the event monitors log their activity here
D. Fixed BigButtons -- Common tasks and fun toys for immediate playing with blink(1)
E. Customizable BigButtons -- Assign these to your own colors or patterns, right-click to configure them.
F. Color Picker -- Pick the colors, fade times, and which LED you want to control.
G. Color pattern list -- Blink1Control comes with some stock patterns, but you can make your own.
Tools (Scripts/Files/URLs) Response Format
Blink1Control can fetch color or pattern triggers from several classes of sources. Thoses sources are:
The contents of these text responses can either be a hex color code (e.g. "#FFCC99")
or the name of an existing color pattern configred in Blink1Control (e.g. "red flashes")
The format of the text responses can either be plaintext or JSON.
Blink1Control can periodically poll IMAP, POP, and Gmail accounts and use information in
new email received to trigger color patterns. A common use for this is to alert on emails
from a particular sender or emails with a specific matching subject. Some people create
a special email address specifically for alerts, and that email address can be used with
Blink1Control.
When you go to the "Mail" tab and click on the "[+]" button to make a new mail rule, you are
presented with the popup window below. In it, fill in the credentials that you'd put in other
mail checkers. The Description field is for you to identify this configuration.
There are three different criteria to trigger color patterns with the Mail checker:
Number of unread emails
Subject containing a text string
Sender containing a text string
In all cases Blink1Control will scan the email account's Inbox for new messages and only alert
if any new messages match the criteria. Blink1Control does not look in any other IMAP/Gmail
folders other than the Inbox.
For the Sender and Subject criteria, Blink1Control will display how many emails in the Inbox match
the current setting and display "Matching Messages(n)" where "n" is the number of matching messages.
When new messages come in, it will display "New Matching Messages(n)".
System Tray / Menubar Icon
Blink1Control is designed to be minimized, so it presents a System Tray (Windows) / Menu bar (Mac) icon.
Clicking on the icon (right-clicking on Windows) gives a menu of startup options and info.
These options are:
"Start minimized" -- on next startup, don't show the main window
"Start at login" -- auto-run Blink1Control next time this user logs in
"Enable API Server" -- enable the HTTP REST API server to control blink(1)
"Open Settings" -- opens the main window
"Reset Alerts" -- cancels any currently playing color patterns and makes the blink(1) go dark