From firmware 2.2.1, support for email notifications has been added to OpenSprinkler. This provides a free alternative to the previous IFTTT notification method, as IFTTT now requires a paid plan to use its Webhooks. The features explained in this article require a minimum firmware version of 2.2.1, and minimum app / UI version of 2.4.1.
Background. OpenSprinkler supports email notifications by using a user-selected SMTP (Simple Mail Transfer Protocol) server such as Gmail or Zoho. When a notification event is generated, the firmware makes a SSL connection (e.g. via port 465) to the SMTP server, and sends out the notification message. The instructions below use these two SMTP servers as examples as they are widely used and have been verified to work with firmware 2.2.1. Other SMTP servers may NOT work as they may require the newer TLS and no longer accept SSL.
Configuring Email settings requires the following parameters:
- SMTP server: either smtp.gmail.com or smtp.zoho.com in the examples below.
- Port: 465 in the examples below.
- Sender Email: the sender's email address (i.e. the 'From' email).
- App password: the application-specific password of the sender's email (NOTE: this is NOT the sender email's log-in password, instead, it's an ad-hoc, random password auto-generated by the email service).
- Recipient Email: the receiver's email (i.e. the 'To' email). It can be the sender email but doesn't have to.
Note that the Sender Email and App Password together are used to authenticate with the SMTP server. You can think of them as the username and password required to authorize the use of the SMTP server. The Recipient Email can be any email you wish to use to receive the notifications, it doesn't even have to be a gmail or zoho mail.
Most SMTP servers impose a limit on the number of emails sent per day from a specific sender. For example, at the time of this writing, Gmail has a daily limit of 500 emails; Zoho has a daily limit of 50. When this limit is reached, it will result in a temporary suspension of the sender's email account. For that reason, we highly recommend you to create a new sender email and app password solely for the purpose of sending notifications, and use another email as the recipient to receive these notifications.
Step 1: Create a Sender Email account and App Password
Option 1: Gmail SMTP server (recommended, as Gmail has higher daily limit)
- Navigate to this page to create a new personal Gmail account. Again, even if you may already have an existing Gmail, it's still recommended to create a new one solely for the purpose of sending notifications. After creating this account, navigate to myaccount.google.com. Once there, select the Security tab and scroll down to 2-Step Verification. Google will not let you create an app password without this enabled. See screenshot below.
- Follow the steps to activate 2-Step verification, then go back to myaccount.google.com and enter app passwords into the search bar at the top, then select App passwords in the search result.
- On the app password screen, type the required App name (it can be anything, such as opensprinkler) and press Create.
- A popup window will show a 16 character password in the format "xxxx xxxx xxxx xxxx". Please save this app password somewhere, as it's required by the Email configuration and this is the only time it's visible to you. Once the popup window is closed, you will not see the app password again, however, you can always create a new app password if you've lost the old one.
Option 2: Zoho SMTP se(if you prefer something other than Gmail)
- If you would rather not use Gmail, the Zoho mail is a good alternative. To do so, navigate to this site to create a new Zoho Mail personal account. Make sure to select "Personal Email" (NOT the default "Business Email").
- Once you have created your account and logged in, navigate to accounts.zoho.com. Then select the Security tab and scroll to the section labeled "Application-Specific Passwords" and click the button "Generate New Password".
- A window will pop up to create a new app password. Here you can enter the app name (it can be anything such as opensprinkler) and click Generate. Please save this app password somewhere, as it's required by the Email configuration and this is the only time it's visible to you. Once the popup window is closed, you will not see the app password again, however, you can always create a new app password if you've lost the old one.
(In some cases you may get a popup asking you to verify your password, if so follow that popup and enter your password when prompted. You will then be returned to the pop up and you can click Generate again).
Step 2: Configure Email Settings
At your OpenSprinkler's homepage, go to Edit Options and click the Integrations tab. Next to Email Notifs click the "Tap to Configure" button. In the Pop-Up dialog, fill in the required parameters. Specifically,
- SMTP server should be smtp.gmail.com if using Gmail server, or smtp.zoho.com if using Zoho mail.
- Port is 465 in either case.
- Sender Email and App Password are what you created in Step 1 above.
- Recipient Email can be any of your existing email: it can be the same as Sender Email but doesn't have to.
Step 3: Choose Notification Events and Set Device Name
The final step is to choose which events to receive notifications of. At the Edit Options -> Integrations tab, click Notifs. Events, a window will pop up with a list of events to select, such as Program Start, Controller Reboot, Weather update. If your controller runs a lot of zones per day, you may want to leave some events, like Station Run unchecked, to avoid creating too many emails that exceed the daily limit.
Below Notifs. Events, you can set a customized Device Name. This Device Name is included in all Email notifications so you can easily tell which controller sent the email. This is particularly useful if you have more than one OpenSprinkler devices.
Please note that Notifs. Events and Device Name are used by both Email and IFTTT notifications. In the case you use both methods of notifications, the same settings will affect both. Also, if you have more than one devices, they can share the same Email settings, so long as the total number of emails sent per day stays below the daily limit. If you are not sure, you can always create a separate Sender Email account for each different OpenSprinkler device (and the Recipient email can remain the same regardless).