Send notifications to your mobile phone from a Shelly device
Shelly offers a renowned selection of smart home products renowned for their seamless integration into your Wi-Fi network, rendering the need for a dedicated smart home hub obsolete. A standout feature lies in their remarkable versatility, as they effortlessly operate within their proprietary cloud system or harmoniously integrate with free open-source software platforms like Home Assistant or OpenHAB. This adaptability empowers you to effortlessly assemble a robust and budget-friendly smart home system, outshining conventional automation systems in terms of cost-effectiveness.
Another notable capability of Shelly is its effortless communication with external automation systems through webhooks. Webhooks, essentially HTTP-based callback functions, facilitate lightweight, event-driven communication between two application programming interfaces (APIs).
In simpler terms, any Shelly device can be conveniently programmed to trigger an external web program when notable events occur.
For example, imagine a scenario where you have a Shelly 1 smart switch controlling your porch lights. You can program it to activate an external web resource each time the light is turned on or off. For instance, it could call the EZAlert.me API to dispatch a notification message via Telegram, Slack, or Discord channels.
To achieve this, you'll first need to create an EZAlert.me account if you haven't already and set up your first channel. Please refer to the "Getting started with EZAlert.me" guide for detailed instructions.
Once your channel is established, locate your channel API key by clicking the "Config" button and selecting "API Keys" in the popup menu. The API key is a string in the format YY-YYYYYYYYYYY.
As outlined in the EZAlert.me documentation, you can transmit alerts to the channel using the EZAlert.me API and your channel API key.
Suppose you wish to send a message each time the porch light is switched on. In that case, you should construct a URL like the following:
Subsequently, employ this URL in the "I/O Actions" section of the Shelly device configuration, specifically as the "Output on" URL, as illustrated in the provided image.
Be sure to change the YY-YYYYYYYYYYY with your channel actual API key.
WARNING: sometimes Shelly devices seems unable to reach SSL Urls. In the case your Shelly sensor is unable to send alerts, try use "http://" instead of "https://" in the Webhook URL. It usually fix the problem but please note that HTTP protocol is not encrypted and inerently less secure than HTTPS.
In the same way you can build an URL for the "Output off" event if you want to be notified every time the light is switched off.
Every Shelly device model has its own list of webhooks so that you can fire notification on specific events, for example you can program a Shelly door to send you an alert every time the door is opened.
Or you can program a Shelly EM to send an alert every time your house electric power consumption is too high or every time your solar panels produce more than a certain quantity of power.
For more information about Shelly webhooks and how to use them please check out Shelly documentation .