A webhook is the channel for everything that is not Telegram or a browser. The device sends a POST with a short JSON body to the URL you give it, and whatever answers there decides what to do next. Notifications are off by default.
What it sends
{
"title": "Screen text",
"message": "The phrase \"Press F1 to continue\" is on the screen.",
"device": "espkvm",
"at": 1790857313,
"log": "the last few kilobytes of the device log"
}
titleis the kind of event, in a few words.messageis the sentence a person reads.deviceis the device's hostname, so several devices can share one URL.atis when it happened, in Unix seconds. It is there once the device's clock is set.logis the tail of the device log, only while Attach recent log is on.
The header is Content-Type: application/json. Any 2xx answer counts as delivered.
No screenshot or file goes this way. A dashcam clip is named in message with its path on the card.
Setting up the device
- In the console open Settings, Notifications, and turn on Send notifications.
- Paste the address into Webhook URL.
- In the table under What goes where, tick what the webhook gets. Everything but the blank screen is ticked to start with.
- Save, then press Send a test in the Automation panel.
Where to point it
- n8n or Node-RED. A webhook node takes the body as it is. From there it can go to Slack, Discord, email or anything else they can reach.
- Home Assistant. An automation with a webhook trigger reads
trigger.json.message. ESP-KVM also talks to Home Assistant over MQTT, which gives buttons and sensors too. - A script of your own. Any small HTTP server works. Discord and Slack webhooks expect their own format, so they need something like this in between.
When the network is down
An alert that cannot go out waits and goes out later, oldest first. With a microSD card it waits on the card and survives a restart. In a late one, at still says when it happened. A 4xx answer is taken as a refusal and is not retried.