blink(1)
| Schemes | blink1:// |
| Cargo feature | service-blink1 |
| Service | https://blink1.thingm.com/ |
| Body formats | text (first is the default) |
| Attachments | no |
| Title length | no title (merged into the body) |
| Body length | 32,768 characters |
| Body lines | unlimited |
| Request throttle | none |
| Vendor URLs accepted | no |
URL formats
{schema}://
{schema}://{serial}/
{schema} is one of blink1://.
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{serial} | Serial Number | string | no |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
duration | Duration (ms) | int, 0 to 300000 | 5000 | |
fade | Fade Time (ms) | int, 0 to 10000 | 0 | |
ledn | LED Number | choice | 0 | one of 0, 1, 2 |
The common URL parameters (format, overflow, verify, redirect, cto, rto, retry, wait, store, tag, tz, user, password, port, optional, emojis) apply as well.
Examples
Accepted URLs (tokens are fake):
blink1://
blink1://_/
blink1://?ledn=1
blink1://?fade=10000
blink1://?duration=300000
blink1://?fade=15&duration=5
blink1://ABCD1234/?fade=100&duration=50
blink1://?fade=200&duration=100&ledn=2
Rejected URLs:
blink1://?fade=10001
blink1://?fade=-1
blink1://?fade=abc
blink1://?duration=300001
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'blink1://'
Notes
blink(1) (blink1://, blink1://<serial>/): lights a blink(1) USB LED in the notification type’s colour.
Sequence: fade to the colour over fade ms, wait fade + duration ms, then switch the LED off instantly. Mercurio has no HID dependency and drives the sequence through ThingM’s blink1-tool, which must be installed and on PATH:
blink1-tool [--id <serial>] --led <n> -m <fade> --rgb <r>,<g>,<b>
(sleep fade + duration)
blink1-tool [--id <serial>] --led <n> -m 0 --rgb 0,0,0
The fade is passed rounded down to 10 ms, the device’s resolution.