GuidesWebhook
Send data with a webhook
Step-by-step - give a sensor, script, IFTTT, Zapier or Home Assistant a private URL, send a test reading, and get alerts when it goes quiet or crosses a limit.
You don't need to write code. You need about 5 minutes, and for the test, a terminal (instructions below) or any automation tool that can "make a web request".
Step 1: Add the webhook
- Go back to your workspace tab and open Configure (Sources).
- In the top row, choose Webhook in the picker and click Add (the + button).
Or leave the picker on Any, type what you want in that row (or in Chat), e.g. "alert me if my sump pump stops reporting for 30 minutes", and click Add.
- A Webhook card appears with the status Waiting for first post. That's expected: nothing has been sent yet.
Step 2: Create your private URL
- On the card, leave Extra security at None (recommended to start; the URL itself is the secret).
- Click Create URL, then Copy.
- Paste it somewhere safe right away. It is shown only once. If you lose it, click Rotate URL to get a new one (the old one stops working).
Step 3: Send a test reading
On a Mac: open Terminal (press Cmd+Space, type Terminal, press Return). On Windows: open PowerShell or Terminal from the Start menu.
Copy this command, then replace the whole PASTE_YOUR_URL_HERE part (keep the quotes) with the URL you copied:
curl -X POST "PASTE_YOUR_URL_HERE" -H "Content-Type: application/json" -d "{\"temp\": 38, \"door\": 0}"
Press Return. (On Windows, type curl.exe instead of curl.)
Expected result: the terminal prints {"ok":true}.
Then go back to Configure and reload the page:
- The card shows Last post just now · 1 total and the values it received:
temp = 38,door = 0. - The status changes from Waiting for first post to Working.
- Your dashboard now has temp and door cards (reload it if it was already open).
Step 4: Choose your alerts
- Alert if quiet for (minutes): if nothing arrives for this long, you get an alert ("No data from … in the expected time"). Good for "is my device still alive?".
- Alert above / Alert below: a limit on one value. Use the same units your device sends. Check your device's units (its app, label or manual): Configure shows the number it sent, not whether that is °F or °C.
- Fields: which values to chart. Click a value under the URL to add it (✓ means it's already charted), then click ✓ Confirm on the card to save.
Click ✓ Confirm on the card after changing any of these.
Troubleshooting
- 404 / not found: The URL is wrong or was rotated. Copy it again (or click Rotate URL and use the new one). Make sure you replaced the whole placeholder.
- 401: You chose Password header or Signed posts under Extra security, but the post didn't include it (signed posts also need a fresh
X-Eaves-Timestamp; the error message says which part is wrong). Switch back to None and click Rotate URL, or add the header (see Advanced). - 400: The body wasn't a list of named values. Send
{"temp": 38}, not just38. - 413: The post is bigger than 32 KB. Send only the readings.
- 503: Too many posts are waiting to be processed (more than 200). Nothing was saved; wait the number of seconds in
Retry-Afterand send again. - 429: More than 60 posts a minute. Send less often (every minute or every few minutes is plenty).
curl: command not found: Use the IFTTT/Zapier/Home Assistant steps below, or install curl.- Status still Waiting for first post: Nothing reached us yet. Re-run Step 3 and check the terminal printed
{"ok":true}. - No dashboard cards: Reload the dashboard. Only numbers are charted; text values are listed but not charted.
Connect a real device
Home Assistant
In configuration.yaml (Settings → Add-ons → File editor, or your usual editor):
rest_command:
eaves_freezer:
url: "PASTE_YOUR_URL_HERE"
method: POST
content_type: "application/json"
payload: '{"temp": {{ states("sensor.freezer_temperature") }}}'
Restart Home Assistant, then create an automation (Settings → Automations → Create): trigger Time pattern every 5 minutes (or State of your sensor), action Call service → rest_command.eaves_freezer.
IFTTT
Add the action Webhooks → Make a web request. URL: your URL. Method: POST. Content type: application/json. Body: {"value": {{Value1}}} (or another ingredient).
Zapier
Add the action Webhooks by Zapier → POST. URL: your URL. Payload type: JSON. Data: one row per value (e.g. temp → your step's value).
Keep it private
Anyone who has the URL can send readings to it, so treat it like a password. If it leaks, click Rotate URL; the old one stops working at once. Posts can be JSON or form fields, up to 32 KB, at most 60 a minute. true/false and on/off count as 1/0. Under the URL, Configure shows the names of the values in your last post and the numbers, never text values.
Advanced: extra security
Only needed if your tool asks for it. Pick it under Extra security before clicking Create URL or Rotate URL; the secret is shown once next to the URL.
- Password header (Bearer token): send
Authorization: Bearer <token>with each post. - Signed posts (HMAC): with each post send
- X-Eaves-Timestamp: <current unix time in seconds> - X-Eaves-Signature: sha256=<hex HMAC-SHA256 of: timestamp, a newline, then the raw body>
The timestamp must be within 5 minutes of the real time and newer than the last accepted one, so a captured post can't be replayed. Send at most one signed post per second. (X-Hub-Signature-256 is accepted as the header name, but GitHub's own webhooks don't send a timestamp, so they won't verify; use None or Password header for those.)
BODY='{"temp": 38}'
TS=$(date +%s)
SIG=$(printf '%s\n%s' "$TS" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | sed 's/^.* //')
curl -X POST "PASTE_YOUR_URL_HERE" -H "Content-Type: application/json" \
-H "X-Eaves-Timestamp: $TS" -H "X-Eaves-Signature: sha256=$SIG" -d "$BODY"
Python:
import hmac, hashlib, json, time, urllib.request
body = json.dumps({"temp": 38}).encode()
ts = str(int(time.time()))
sig = hmac.new(SECRET.encode(), ts.encode() + b"\n" + body, hashlib.sha256).hexdigest()
req = urllib.request.Request(URL, body, {"Content-Type": "application/json",
"X-Eaves-Timestamp": ts, "X-Eaves-Signature": "sha256=" + sig})
urllib.request.urlopen(req)
Failed signatures are limited separately (20 a minute per URL), so someone guessing can't use up your 60 posts a minute.