Notify Me
Another clever skill for Alexa
from Thomptronics

http://amzn.to/2G8ADsU

Take control of your Alexa by sending it your own notifications.  This skill is perfect for people into home automation ("A leak has been detected in the laundry room"), home security ("Your garage door has been open for over an hour"), and many other creative uses you might think up ("It's Tuesday. Did you put out the trash?").

Notify Me works with an almost unlimited number of services and devices, such as
This is an admittedly nerdy skill for, well, nerds who are at least somewhat familiar using RESTful APIs.

To get started, just enable the skill, giving it permission to send notifications to your Alexa and linking it to your Amazon account so we can send a unique access code to the email address associated with that account.  Next, just say, "Alexa, open Notify Me" and the skill will introduce itself and send your access code via email.

If it seems to be taking too long to receive the access code, please check your SPAM filter.  The email will come from from notifyme@notifymyecho.com via amazonses.com.  Remember: launching the skill ("Alexa, open Notify Me") is what triggers the email with the access code.

With your access code in hand, you are ready to go.  See below for instructions on how to start notifying yourself!


How to use your Access Code

First off, please don’t share or lose your access code.  If you do share it and appear to be getting unwelcome Echo notifications, disable and re-enable the Notify Me skill; then launch the skill again and you will be sent a new access code.  If you lose this code, relaunch the Notify Me skill and simply ask it to resend your access code.

Use of the access code assumes you have a passing familiarity with RESTful APIs.  (Don't worry, Notify Me's API is quite simple.)  Here are its specifications:

Specs
URL
api.notifymyecho.com/v1/NotifyMe

Port (if required)
443

Method
POST | PUT | GET   (Notify Me doesn’t care, but you should generally use POST)

URL Params (optional if you use Data Params)
  required:
    notification=string
    accessCode=ACCESS_CODE
  optional:
    title=string

Data (body) Params (optional if you use URL Params)
{
  "notification": "string",
  "accessCode": "ACCESS_CODE",
  "title": "string"  // optional parameter
}

Notes
  • Replace ACCESS_CODE with your access code string
  • The NotifyMe part of the URL is case sensitive -- you must capitalize the N and the M.
  • While you can use both URL and Data (body) parameters in the same call, be aware that data (body) parameters override URL parameters in the case of a conflict.

Examples
Browser URL with URL params
https://api.notifymyecho.com/v1/NotifyMe?notification=Hello%20World!&accessCode=ACCESS_CODE

curl with data (body) params
curl https://api.notifymyecho.com/v1/NotifyMe -H "Content-Type: application/json" -d '{"notification":"Hello World!","accessCode":"ACCESS_CODE"}'

Windows PowerShell with data (body) params
Invoke-RestMethod https://api.notifymyecho.com/v1/NotifyMe -Method POST -Body '{"notification":"Hello World!","accessCode":"ACCESS_CODE"}'

Python with data (body) params
import json
import requests
body = json.dumps({
 "notification": "Hello World!",
 "accessCode": "ACCESS_CODE"
})
requests.post(url = "https://api.notifymyecho.com/v1/NotifyMe", data = body)

JavaScript with data (body) params
var https = require("https");
var body = JSON.stringify({
    "notification": "Hello World!",
    "accessCode": "ACCESS_CODE"
});
https.request({
    hostname: "api.notifymyecho.com",
    path: "/v1/NotifyMe",
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        "Content-Length": Buffer.byteLength(body)
    }
}).end(body);

IFTTT with data (body) params
When setting up your own Applet (click on Applets->New Applet), choose an "if" service to trigger your notification and then choose Webhooks as the "that" service.  Select "Make a web request" as the action and fill out the action fields as follows:
URL: https://api.notifymyecho.com/v1/NotifyMe
Method: POST
Content Type: application/json
Body: {"notification": "Hello World!", "accessCode":"ACCESS_CODE"}


HomeSeer HS3 VB Script
The following script, saved with a .vb extension, should work with HomeSeer HS3.  Just pass your notification message in the "Run a Script or Script Command" Parameters field.

Sub Main(ByVal notification As String)
  dim accessCode = "ACCESS_CODE"
  dim host = "https://api.notifymyecho.com"
  dim path = "/v1/NotifyMe?notification="+notification+"&accessCode="+accessCode
  dim result = hs.GetURL(host, path, TRUE, 443)
  hs.WriteLog("msg", result)
End Sub

Tasker (Android App)
Tasker's Net -> HTTP Post action works great with Notify Me.
  1. Launch Tasker, go to the Tasks tab and tap the plus sign to create a new task.  Give your task a name such as NotifyMyEcho and tap the check mark to accept.
  2. Tap the plus sign to add an Action, choose Net and then choose HTTP Post
  3. Fill out the HTTP Post fields as follows:
    Server:Port:  https://api.notifymyecho.com
    Path:  v1/NotifyMe?accessCode=ACCESS_CODE
    Data/File:  {"notification": "Hello World!"}
    Content Type:  application/json
You can include any Tasker variable, such as the time of day, in the notification string.


REMEMBER to replace ACCESS_CODE with your access code string in all of the above examples.



Did you find this skill useful?  We're interested in what you think and the creative ways you are using it.

Click here to leave us feedback: Feedback Page
Click here to read how Alexa notifications work: How Notifications Work
Click here to leave a review and give us a (hopefully good!) rating: Product Page

Five-star reviews go a long way towards supporting development of this and other skills like it.

Thanks!
-The Thomptronics team