LaMetric
| Schemes | lametric://, lametrics:// |
| Cargo feature | service-lametric |
| Service | https://lametric.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 | 200 ms between requests |
| Vendor URLs accepted | yes |
URL formats
{schema}://{app_token}@{app_id}
{schema}://{app_token}@{app_id}/{app_ver}
{schema}://{apikey}@{host}
{schema}://{user}:{apikey}@{host}
{schema}://{apikey}@{host}:{port}
{schema}://{user}:{apikey}@{host}:{port}
{schema} is one of lametric://, lametrics://.
URL tokens
| Token | Meaning | Type | Required | Default | Notes |
|---|---|---|---|---|---|
{apikey} | Device API Key | string | no | secret | |
{app_id} | App ID | string | no | secret | |
{app_token} | App Access Token | string | no | must match ^[A-Z0-9]{80,}==$ | |
{app_ver} | App Version | string | no | 1 | must match ^[1-9][0-9]*$ |
{host} | Hostname | string | no | ||
{port} | Port | int, 1 to 65535 | no | 8080 | |
{user} | Username | string | no |
Query parameters
| Parameter | Meaning | Type | Default | Notes |
|---|---|---|---|---|
apikey | Device API Key | string | sets {apikey} | |
app_id | App ID | string | sets {app_id} | |
app_ver | App Version | string | sets {app_ver} | |
cycles | Cycles | int, min 0 | 1 | |
icon | Custom Icon | string | ||
icon_type | Icon Type | choice | none | one of info, alert, none |
mode | Mode | choice | device (usually; depends on the URL) | one of cloud, device |
priority | Priority | choice | info | one of info, warning, critical |
sound | Sound | string |
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):
lametric://root:8b799edf-6f98-4d3a-9be7-2862fb4e5752@192.168.0.5:8080/
lametrics://TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT==@com.lametric.941c51dff3135bd87aa72db9d855dd50/
lametrics://TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT==@com.lametric.941c51dff3135bd87aa72db9d855dd50/2/
lametric://8b799edf-6f98-4d3a-9be7-2862fb4e5752@192.168.1.2/?icon=230
lametric://8b799edf-6f98-4d3a-9be7-2862fb4e5752@192.168.1.3/?cycles=2
lametrics://8b799edf-6f98-4d3a-9be7-2862fb4e5752@192.168.0.6/?mode=device
lametrics://8b799edf-6f98-4d3a-9be7-2862fb4e5752@192.168.1.2/?icon=%23230
lametrics://8b799edf-6f98-4d3a-9be7-2862fb4e5752@192.168.0.6/?sound=alarm1
Rejected URLs:
lametric://
lametric://:@/
lametric://8b799edf-6f98-4d3a-9be7-2862fb4e5752/
lametrics://TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT==@com.lametric.941c51dff3135bd87aa72db9d855dd50/abc/
Send one from the command line:
mercurio -t 'Backup' -b 'Finished in 42s' 'lametric://root:8b799edf-6f98-4d3a-9be7-2862fb4e5752@192.168.0.5:8080/'
Notes
LaMetric (lametric://, lametrics://): notifications on LaMetric Time devices.
Two modes: cloud (developer widget push, {token}@{app_id}[/{ver}]) and device (local API, [user:]{apikey}@{host}[:port]).