Alexa notifications via Notify Me Skill

Posted on
Mon Apr 16, 2018 4:23 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Alexa notifications via Notify Me Skill

Found a fun Alexa Skill, Notify Me

https://www.amazon.com/Thomptronics-Notify-Me/dp/B07BB2FYFS/ref=sr_1_1?s=digital-skills&ie=UTF8&qid=1523917191&sr=1-1&keywords=notify+me

Lets you send notifications to your Alexa devices in various ways... http://www.thomptronics.com/notify-me

Took about 3 minutes to set it up, enable permissions in the Alexa app and get the email with an access code.

I'm using Python in action groups to send stuff... Alexa chimes and turns yellow about a second after the script runs.....

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

Bill
My Plugin: My People

Posted on
Mon Apr 16, 2018 4:50 pm
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: Alexa notifications via Notify Me Skill

Sounds interesting - can you select an individual Echo to play the announcement?

Posted on
Mon Apr 16, 2018 4:53 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Alexa notifications via Notify Me Skill

Nice find!

Colly wrote:
Sounds interesting - can you select an individual Echo to play the announcement?


No - it uses Alexa's notification mechanism so all echos on the account will make the noise and flash the yellow LED.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Mon Apr 16, 2018 4:56 pm
Colly offline
Posts: 535
Joined: Jan 16, 2016
Location: Ireland

Re: Alexa notifications via Notify Me Skill

jay (support) wrote:
No - it uses Alexa's notification mechanism so all echos on the account will make the noise and flash the yellow LED.

Guess that rules out any late night notifications as the kids have an echo in their bedrooms. :(

Posted on
Mon Apr 16, 2018 5:52 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Alexa notifications via Notify Me Skill

Got the code and gave it a try but get this error.

Maybe I missed something?

Edit: Can the spoken text be directed to a variable?

Thanks,

Carl
Attachments
98E4B94F-5AB9-4E39-9E89-93B9905527D3.jpeg
98E4B94F-5AB9-4E39-9E89-93B9905527D3.jpeg (287.53 KiB) Viewed 5246 times

Posted on
Mon Apr 16, 2018 7:56 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Alexa notifications via Notify Me Skill

ckeyes888 wrote:
Got the code and gave it a try but get this error.

Maybe I missed something?

Edit: Can the spoken text be directed to a variable?

Thanks,

Carl


The "accessCode" is the whole string staring with "amzn1.ask.account.AH...blablablabla" Don't know if the space between the end of your access code and the endquote makes a difference. Did you enable the permissions within the Alexa app?

I'm sure, I can only copy/paste Python, but bringing in a variable shouldn't be to hard. That will be my next step as well.

Colly wrote:
Guess that rules out any late night notifications as the kids have an echo in their bedrooms. :(

In the Alexa app, Under Settings -> Select an Echo -> Sounds , you can disable the notification sound. I'm guessing the ring will still change to yellow, but it won't chime in their room.

Bill
My Plugin: My People

Posted on
Mon Apr 16, 2018 8:24 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Alexa notifications via Notify Me Skill

Here's the code I'm using and yes I did enable permissions.

Code: Select all
import json
import requests
body = json.dumps({
 "notification": "Hello World!",
 "accessCode": "XXXXX"
})
requests.post(url = "https://api.notifymyecho.com/v1/NotifyMe", data = body)


It returns this in the log.

Code: Select all
  embedded script, line 7, at top level
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/api.py", line 111, in post
       return request('post', url, data=data, json=json, **kwargs)
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/api.py", line 57, in request
       return session.request(method=method, url=url, **kwargs)
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/sessions.py", line 477, in request
       resp = self.send(prep, **send_kwargs)
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/sessions.py", line 587, in send
       r = adapter.send(request, **kwargs)
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/adapters.py", line 491, in send
       raise SSLError(e, request=request)
SSLError: [Errno 1] _ssl.c:503: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure


Thanks for the help!

Carl

Posted on
Tue Apr 17, 2018 7:27 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Alexa notifications via Notify Me Skill

ckeyes888 wrote:
Here's the code


Carl.... I just ran your code on my end without error.

1) If you just got an Alexa notification that said "Carl, This is Bill"..... then it's not the code.... there is some kind of Python issue on your end.

2) Edit your previous post to remove your access code so I'm not tempted to send you random crap in the middle of the night.

3) I'm seriously Python handicapped.... so I can't help you troubleshoot that, but I'm sure someone else will chime in on that.... maybe a problem with your Kwargs? <- whatever that is?

Bill
My Plugin: My People

Posted on
Tue Apr 17, 2018 7:58 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Alexa notifications via Notify Me Skill

ckeyes888 wrote:
Code: Select all
  embedded script, line 7, at top level
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/api.py", line 111, in post
       return request('post', url, data=data, json=json, **kwargs)
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/api.py", line 57, in request
       return session.request(method=method, url=url, **kwargs)
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/sessions.py", line 477, in request
       resp = self.send(prep, **send_kwargs)
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/sessions.py", line 587, in send
       r = adapter.send(request, **kwargs)
     File "/Library/Application Support/Perceptive Automation/Indigo 7/IndigoPluginHost.app/Contents/PlugIns/requests/adapters.py", line 491, in send
       raise SSLError(e, request=request)
SSLError: [Errno 1] _ssl.c:503: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure



This looks like the SSL error on Sierra. Looks like Alexa has the same requirement as GitHub.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Tue Apr 17, 2018 8:44 am
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Alexa notifications via Notify Me Skill

I ran it on Sierra and it ran correctly. And it would be the api.notifymyecho.com host that would require TLS 1.2, not Amazon.

I think it's a Python version issue - Carl, what OS version are you running and what Python version? Open a terminal window and paste in this command and it will show you:

Code: Select all
python --version


If it's earlier than 2.7.9, then that's the problem. Sierra & El Capitan have 2.7.10 (which works) so I'm guessing you're still running Yosemite or earlier, which have Python <=2.7.6 (which is the problem).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Apr 17, 2018 4:18 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Alexa notifications via Notify Me Skill

Here's the return:
TV:~ TV$ python --version
Python 2.7.2

I'm still on 10.8.5

Thanks,

Carl

Posted on
Tue Apr 17, 2018 4:50 pm
jay (support) offline
Site Admin
User avatar
Posts: 18199
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Alexa notifications via Notify Me Skill

ckeyes888 wrote:
Here's the return:
TV:~ TV$ python --version
Python 2.7.2


Yep, that's the problem. Python 2.7.10 or later fixes an SSL issue that some sites trigger (apparently including the one needed for this script).

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Tue Apr 17, 2018 8:33 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Alexa notifications via Notify Me Skill

Thanks all. I’m moving to a mini running 10.12 which I’m hopeful will solve a number of issues I’ve been having.
Albeit...probably cause a bunch more. :cry:

Carl

Posted on
Sat Apr 21, 2018 7:49 pm
ckeyes888 offline
Posts: 2417
Joined: Nov 26, 2009
Location: Kalispell, MT

Re: Alexa notifications via Notify Me Skill

Just upgraded to 10.12 and the script seems to run, causes my Echos to chime but doesn't speak the notification.

I'm using this script, (access code edited for posting).

Code: Select all
import json
import requests
body = json.dumps({
 "notification": "Hello World!",
 "accessCode": "amzn1.ask.account.AFGN3ZSDZXZ433ZNV3ORUEDZXKVD6KMKYT5H3LWBTUHQQYG7HNCV572GEV47RBCUGIWLOCA2ZFISZ5EWIAYZHPJ5POAWFSS7AV3LGGUB2VSEYACPTPBYIGPL4NMXB7SVC2A26ZXANCM6DO5YPSU6E6MIBMLWNSHNSOPJ4ZBX46BTILLOR4ZZXK5WZ7SEKHBXZTB5Q"
})
requests.post(url = "https://api.notifymyecho.com/v1/NotifyMe", data = body)


Any idea why it's not speaking?

Edit: Is it supposed to speak or just chime to let you know a notice just came in?
If it's just a chime I'm not sure what use it is.

Thanks,

Carl

Posted on
Sun Apr 22, 2018 9:10 am
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Alexa notifications via Notify Me Skill

ckeyes888 wrote:
Just upgraded to 10.12 and the script seems to run, causes my Echos to chime but doesn't speak

Any idea why it's not speaking?

Carl


Currently that is all it does. I talked to the developer of the skill and he said that the ability to “announce” isn’t covered in the skills API yet.

The workaround to integrate the “announce” feature is nothing less than ghetto-fabulous..... Place an echo device next to your Indigo server. Create an action that speaks, “Alexa, announce there is someone at the door”. Works pretty well with very short sentences without punctuation. (A comma in the sentence will sometimes cause her to send the message once there is a pause and ignore the second half of the sentence)

I’m using my ghetto setup more than the Notifyme thing at the moment. I’m using notifyme more for leaving little notes for my wife when I’m out of town.

For announcements, it will go to all devices unless you have switched the “do not disturb “ on through the app.

Anyways, my fingers are crossed that directly speaking (announce) will get incorporated into the skill.

Bill
My Plugin: My People

Who is online

Users browsing this forum: No registered users and 3 guests