# Shelly temperature too high notifications on your phone > Get a push notification when a Shelly temperature sensor rises above a limit you choose, e.g. a freezer thawing or a server cupboard overheating. - Company: Shelly (https://www.justpush.io/recipes/shelly) - Event: `temperature.change` (Temperature change) - Tags: Smart home, Monitoring - Install: https://studio.justpush.io/recipes/shelly/temperature-high - Web page: https://www.justpush.io/recipes/shelly/temperature-high ## Setup 1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL. 2. Open your Shelly device's web interface (browse to its IP address) or the Shelly Smart Control app and go to Actions. 3. Add a webhook action for the Temperature change event. 4. Use the URL from the setup notes below. Shelly fills in the ${…} parts itself when it calls it. 5. Save, then trigger the device once to send a real event. 6. Use this as the action URL: 7. ``` 8. your webhook URL (shown in Studio after install)?event=temperature.change&device=${config.sys.device.name}&tC=${ev.tC}&limit=30 9. ``` 10. Set the action's condition to `event.tC > 30` and its repeat period to **-1**, which makes it fire once each time the reading crosses the limit instead of on every reading while it stays past it. 11. If your device's action editor doesn't offer those settings, create the webhook from a terminal instead (replace `` with the device's IP address): 12. ``` 13. curl -X POST http:///rpc -d '{"id": 1, "method": "Webhook.Create", "params": {"cid": 0, "enable": true, "event": "temperature.change", "condition": "event.tC > 30", "repeat_period": -1, "urls": ["your webhook URL (shown in Studio after install)?event=temperature.change&device=${config.sys.device.name}&tC=${ev.tC}&limit=30"]}}' 14. ``` 15. Change `30` in both the condition and the URL to your own limit. For a freezer, use something like `-12`. ## Code Studio calls `handleRequest(request)` with the incoming webhook (`{ method, headers, body, query, raw }`) and sends the message object it returns. Returning `null` sends nothing. ```js // Shelly → temperature too high // Fires when a Shelly temperature sensor (H&T, Plus Add-on probe, BLU H&T via a // gateway, …) reads higher than the limit you set. // // Add a webhook action for the "temperature.change" event with the condition // "event.tC > " and repeat period -1 (fire once each time it crosses), calling: // ?event=temperature.change&device=${config.sys.device.name}&tC=${ev.tC}&limit= // Shelly webhooks are GET requests, so the data arrives as query parameters. // Fall back to a JSON body so the recipe also works when POSTed (and in the Test runner). function readParams(request) { const body = request.body && typeof request.body === "object" ? request.body : {} return { ...body, ...(request.query || {}) } } // Shelly fills an unset name in as "null"; treat that (and blanks) as missing. function text(value) { const s = value == null ? "" : String(value).trim() return s === "" || s === "null" || s === "undefined" ? null : s } function handleRequest(request) { const params = readParams(request) // Guard: only handle temperature readings, so other Shelly hooks stay quiet. if (params.event !== "temperature.change") { console.log(`Ignoring Shelly event "${params.event ?? "unknown"}" — not a temperature change`) return null } const tC = Number.parseFloat(params.tC) if (!Number.isFinite(tC)) { console.log("Temperature event without a reading — skipping") return null } // The Shelly condition does the filtering; this is a second check in case the // hook was saved without one. const limit = Number.parseFloat(params.limit) if (Number.isFinite(limit) && !(tC > limit)) { console.log(`${tC} °C is within the ${limit} °C limit — skipping`) return null } const device = text(params.device) ?? "Your Shelly sensor" return { title: "🌡️ Temperature too high", message: `${device} is at ${tC.toFixed(1)} °C` + (Number.isFinite(limit) ? ` (limit ${limit} °C)` : ""), topic: "Shelly", priority: 1, // High — a freezer thawing or a server cupboard overheating needs attention soon // sound: "incoming", // any of Studio's sounds, e.g. incoming, bugle, siren } } ``` ## Shelly temperature.change webhook payload (sample) ```json { "tC": "31.4", "event": "temperature.change", "limit": "30", "device": "Server cupboard" } ``` ## FAQ ### Does this work on iPhone and Android? Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification. ### Do I need to write code? No. Install the recipe in Studio, paste your webhook URL into Shelly and you are done. The code is there if you want to change the text, the sound or the buttons. ### Can I change what the notification says? Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save. ### What does it cost? JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.