Webhook Output
ESPGeiger can send radiation data to a custom URL endpoint via HTTP POST. This allows you to integrate your Geiger counter readings with your own services, databases or automation systems.
Setup
- Configure ESPGeiger: On the Config page, open the Upload tab, tick Enable under Webhook and enter your target
URLin the Webhook section. Optionally set aKeyfor authenticating requests from your device. - Set the interval: the submission interval in seconds, 10 to 3600. The default is 60 seconds.
ESPGeiger will report the Webhook submission status in the Web Interface console.
Your endpoint should reply with a body that contains OK. Anything else, including an empty 204 reply, is logged as Webhook: Error and /outputs shows the webhook as not OK, even though the data arrived.
Note: Only HTTP endpoints are supported. An HTTPS URL saves but is never sent (the console shows Webhook: URL not usable (http only)); it is never sent as plain HTTP.
The URL must start with http:// and may carry a query string, for example http://192.168.1.10/hook?src=geiger&n=1. Characters outside the usual URL set, such as a space, ', #, [ or ], are refused when you save.
JSON Payload
ESPGeiger submits a JSON payload via HTTP POST with Content-Type: application/json. The following fields are included:
| Field | Type | Description |
|---|---|---|
id | string | Device chip ID |
key | string | Configured webhook key (only included if set) |
ut | integer | Uptime in seconds |
cpm | float | Current CPM (1-minute smoothed) |
cpm5 | float | 5-minute smoothed CPM |
cpm15 | float | 15-minute smoothed CPM |
usv | float | Current microsieverts per hour (µSv/h) |
cps | float | Current counts per second |
tc | integer | Total accumulated click count since boot |
mem | integer | Free heap memory in bytes |
rssi | integer | WiFi signal strength in dBm |
tube | integer | 1 while counts are arriving, 0 once the tube has been silent longer than expected |
sat | integer | 1 when the count rate is close to the tube’s dead-time limit |
warn | integer | 1 when CPM is above the warning threshold |
alert | integer | 1 when CPM is above the alert threshold |
hv | integer | High voltage reading in volts (builds with HV feedback: ESPGeiger-HW, *_hv) |
hv_fault | integer | 1 while HV is held off: over the voltage limit (same builds) |
t | float | Temperature in °C (environment sensor only) |
h | float | Relative humidity in % (BME280 / AHT family only) |
p | float | Atmospheric pressure in hPa (BME280 / BMP280 only) |
Environmental fields are emitted only when the corresponding sensor channel is available. A BMP280 ships t and p but not h; an AHT20 ships t and h but not p; a BME280 or AHT20+BMP280 combo ships all three.
Example JSON Output
{"id":"7a9256","ut":3600,"cpm":30.00,"cpm5":29.50,"cpm15":30.10,"usv":0.1987,"cps":0.50,"tc":1800,"mem":19088,"rssi":-45,"tube":1,"sat":0,"warn":0,"alert":0}