EZAlert.me Blog

Use cases, facts and tutorials about EZAlert.me

About EZAlert.me

EZAlert.me offers a simple API to allow your programs or devices send you alerts via popular instant messages applications like Telegram, Skype, Facebook Messenger or Slack.
Here we publish posts about use cases, samples and stuffs related to EZAlert.me use and configuration.
If you like to share notes about how you use EZAlert.me, just sent us an email to ezalert(at)ezalert.me.
EZAlert.me home

Send a Telegram / Skype / Messenger / Slack alert from Arduino

So, you have an Arduino board and you want to be notified with an istant message everytime something happens. Maybe when someone press a button or when temperature is higher or lower that a preset threshold, or when a pir sensor detects something. No problems, EZAlert.me can help you!

We just added in our GitHub repo a sample Arduino Sketch you can use as and example to send instant messages from an Arduino ESP8266 board. The sample can be easily fixed to work with other boards or with Arduino boards with ethernet/wifi hats. Anyway the core function is quite easy:

int sendAlert(String text) {

 // ******* EZALert.me API Key here *******
 String ezalert_ApiKey = "PUT YOUR EZALERT.ME API KEY HERE";

 const char* servername = "ezalert.me";
 String line1=F("GET /v1/sendAlert?apikey=")+String(ezalert_ApiKey)+F("&text=")+urlencode(text)+F(" HTTP/1.1");
 String line2=F("Host: ezalert.me");
 WiFiClient client; 
 if (client.connect(servername, 80)) {     
      // Make a HTTP request:
      client.println(line1);
      client.println(line2);
      client.println();      
      return 1;
 }  
 return 0;
}

In this function we create a WiFiClient object, then we connect to EZAlert.me API and send the contents of text string throught it.

The only thing you need to have is a working EZAlert.me account with its API key, and your Arduino board can alert you about any event you want to track.

QNAP alerts on SLACK

So you have your QNAP device and your Slack channel, and you are wondering how to get QNAP alerts in Slack. QNAP can only send emails so you need to use EZALert.me Email Gateway.

What is EZALert.me Email Gateway?

Each EZAlert.me channel has an associated email address: every email sent to that address is distributed to all subscribers of the channel. Each EZAlert.me channel can be subscribed via Skype, Telegram, Facebook Messanger or can use a webhook to send messages to a Slack channel.

Configuring QNAP to send alerts via EZAlert.me

First of all you need to find the email address of your EZAlert.me channel, so login to your EZALert.me account, go in the channel configuration page and get the "EMail gateway address". The address is usually hidden, just click on the "View/Hide API key" button to show it.

It is an email address in the form XX-YYYYYYY@ezalert.me.

EZAlert.me Email Gateway Settings

Now you have to use that email address in your QNAP config as alert email destination and you will get qnap errors via EZAlert.me instant messages.

To do it you can use QNAP email alert notification instructions here

Access to your QNAP configuration panel and open System Settings applet. Select Notifications on the left menu and then click on "Alert Notification" tab. Insert your EZAlert.me channel Email Gateway address into the "E-mail address 1" field. Then click the "Send Test E-mail" butto to test it.

If you can't receive the message, it's possible you need to configure a SMTP gateway on SMTP Server page of QNAP Notification configuration. Set it to your internet service provider SMTP address. If you are in doubt you can use EZAlert.me SMTP gateway, but please note that it will only work for EZAlert.me emails and it will not forward emails to addesses out of the @ezalert.me domain. EZAlert.me SMTP gateway address is: mail.ezalert.me .

Configuring EZAlert.me to send alerts to Slack

To allow EZALert.me post to your Slack, you need to install in it the Incoming Webhooks Slack app.

Slack App to install

Once you installed the app, enter its configuration panel, and copy the Webhook Url field contents:

Slack App to install

Go back to EZAlert.me configuration, enter your EAlert.me channel page, and click on "Add Slack Connection". Paste the Url you copied from the Webhooks app and click on Save button.

Now every time you QNAP sends an alert via email, that email is forwarded to EZAlert.me which wil push its contents to your Slack!

Find more info about EZALert.me Slack integration here: https://ezalert.me/pages/slackintegration

Integrate GitLab with EZAlert.me

GitLab is one of the best sites where to store your source repositories. If you are a GitLab user, you will be pleased to know that EZAlert.me offers a webhook that it can call every time something happens on one of your repositories, and the best is that the configuration is a piece of cake!

First of all you need to own a channel on EZAlert.me, so if you have not, register on EZAlert.me and create one. Then navigate to channel details and click on the "Show API Keys" button to make the modal appear.

EZAlert.me GitLab webhook

Copy the URL in the GitLab webhook section, then go to GitLab, select your repository, then click on Settings and Integrations. Paste the URL you copied in the URL field.

How to configure GitHub Webhooks

To complete the configuration click Add webhook button.

Now subscribe the EZAlert.me channel via one of its bots (Skype, Telegram, Facebook Messenger) and get GitLab notifications directly on your mobile phone.

Integrate GitHub with EZAlert.me

If you are a GitHub user, you will be pleased to know that EZAlert.me offers a webhook that can be called every time something happens on one of your GitHub repositories, and the best part is that the configuration is super easy.

First of all you need to own a channel on EZAlert.me, so if you have not, register on EZAlert.me and create one. Then navigate to channel details and click on the "Show API Keys" button to make the modal appear.

EZAlert.me GitHub webhook

Copy the URL in the GitHub webhook section, then go to GitHub, select your repository. click on Options button and then select Webhooks". Click on Add webhook then paste the URL you copied in the Payload URL field.

How to configure GitHub Webhooks

Once you complete the configuration, just subscribe the EZAlert.me channel via one of its bots (Skype bot, Telegram bot, Facebook Messenger bot) and get GitHub notifications directly on your mobile phone.