We have moved at community.getvera.com

Author Topic: Alexa can get notifications from Vera - UPDATED 01/23  (Read 2479 times)

Offline ZW-Tom

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +8/-2
Alexa can get notifications from Vera - UPDATED 01/23
« on: January 06, 2019, 05:21:11 pm »
You can send your Alea devices notifications from your Vera.

To do so, you need to install the "Notify Me" skill on your Alexa. After you register with notify, you will receive an Access Code. When you do, paste the access code into one of the 2 attached code lines (txt file attached). Past the entire line exactly as detailed in the (attached txt file) into a scene luup. When the scene is triggered, you will get the notice on your Alexa device. When you get the notice, just say "Alexa, read my notifications".

I have provided two code lines that can send notifications to Alexa.
1.) The first line uses a curl instruction to send the notification. The notification is text and can NOT be a (text variable).
2.) The second line uses wget to do the same thing (less desirable method).

The 2 examples send the notification "There is someone at the front door".

Tom

UPDATE: 01/23/2019:
I added an attachment that includes code and instructions for very simple calls from any scene using the following format as example:

AlexaMessage("Someone sole you car while you were gone.")

Complete instructions and code are included in the 2'nd attached "VeraAlexaNotify.txt" file below.

UPDATE: 01/23/2019 (same as above but with time and date stamp:

I added another (version-2) today that includes Time and Date stamp automatically in your notification.

Tom
« Last Edit: January 24, 2019, 02:29:05 pm by ZW-Tom »

Offline robie

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Alexa can get notifications from Vera
« Reply #1 on: January 07, 2019, 01:16:53 am »
wow, this is great.  Can this be modified to make announcements instead of notifications? so that it announces if somebody enters the door instead of the additional step of asking alexa to read the notifications

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Alexa can get notifications from Vera
« Reply #2 on: January 07, 2019, 01:38:22 am »
I?m in my 3rd month using this
https://github.com/walthowd/ha-alexa-tts

It requires a spare raspberry/Linux vm to execute, but it?d be ported to Lua since it?s a couple of http calls. It works very well.
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more

Offline ZW-Tom

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +8/-2
Re: Alexa can get notifications from Vera
« Reply #3 on: January 07, 2019, 02:15:19 pm »
wow, this is great.  Can this be modified to make announcements instead of notifications? so that it announces if somebody enters the door instead of the additional step of asking alexa to read the notifications

No. The good thing is that you can review messages if you are away when they arrive. In the example that I included, you would know someone was at the door while you were gone. You can also get them on your mobile phone if you have alexa installed.
Tom

Offline robie

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Alexa can get notifications from Vera
« Reply #4 on: January 08, 2019, 03:07:24 am »
Yup, I realized that advantage of notifications on alexa.  The voice messages will complement the vera app notifications and email.  Many thanks for sharing the scripts.

I'm now thinking of doing a mod on one of my extra door contact sensors to work with my existing wired doorbell so that my cameras will send me a picture of who is infront of the house.  if this will work, it's going to be like the "ring" doorbell but better like you described.  better since my camera is positioned on a better view and all devices are permanently installed.  also, more weather proof and will complement existing systems already. 

But still hoping for vera support on announcements (or amazon support on vera installed devices) as it has a different use for home security.  existing zwave chimes and sirens are not enough. also since a different branded hub already have this function

wow, this is great.  Can this be modified to make announcements instead of notifications? so that it announces if somebody enters the door instead of the additional step of asking alexa to read the notifications

No. The good thing is that you can review messages if you are away when they arrive. In the example that I included, you would know someone was at the door while you were gone. You can also get them on your mobile phone if you have alexa installed.
Tom


Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: Alexa can get notifications from Vera
« Reply #5 on: January 08, 2019, 06:10:43 am »
To make its smart. Why not have an announcement when the Vera is in Home status and a notification otherwise?

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Alexa can get notifications from Vera
« Reply #6 on: January 08, 2019, 12:14:46 pm »
But still hoping for vera support on announcements (or amazon support on vera installed devices) as it has a different use for home security.  existing zwave chimes and sirens are not enough. also since a different branded hub already have this function

since my house is very dispersive, I have various announcements based on time of the day, status of doors, etc. plus, based on this same things, I send to my Telegram account a short video anytime a specific door or gate is opened. it works very well.

the scripts is working ok, I encapsulated it into my own applications written in C# and doing notifications (based on presence) and it's very cool, because it is dynamic. I used to trigger pre-recorded messages, but dynamic ones are better (and you don't need to use TTS, plus the voice is the same coming from Alexa, so my family members seems to like it better).
« Last Edit: January 09, 2019, 12:39:38 pm by therealdb »
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Alexa can get notifications from Vera
« Reply #7 on: January 08, 2019, 12:18:19 pm »
To make its smart. Why not have an announcement when the Vera is in Home status and a notification otherwise?

I send notifications when house mode is not home (ie away, night or vacation), and play announcement when home (with volume changing based on the time of the day - ie lower when > 10 pm or < 8 am). I skip notifications when it's not dark, but always play message. My entry door is very far from the open space, and it's not uncommon that someone from the family enters in the property and the others are not noticing it. Notifications for gates and doors is my wife favorite feature. You know, you spend year tweaking this thing, and all she loves is some voice announcement that one of our sons is entering our home :)
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1574
  • Karma: +110/-31
Re: Alexa can get notifications from Vera
« Reply #8 on: January 09, 2019, 05:10:47 am »
To make its smart. Why not have an announcement when the Vera is in Home status and a notification otherwise?

I send notifications when house mode is not home (ie away, night or vacation), and play announcement when home (with volume changing based on the time of the day - ie lower when > 10 pm or < 8 am). I skip notifications when it's not dark, but always play message. My entry door is very far from the open space, and it's not uncommon that someone from the family enters in the property and the others are not noticing it. Notifications for gates and doors is my wife favorite feature. You know, you spend year tweaking this thing, and all she loves is some voice announcement that one of our sons is entering our home :)

I knew you where smart  ;D

There is now one more on my to-do list  ::)

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline robie

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Alexa can get notifications from Vera
« Reply #9 on: January 10, 2019, 07:24:15 am »
Hi, got this working on my doorbell and on my alarms (so that alexa can tell me which device triggered the alarm, if any, especially at night when i'm lazy to check on my phone). 

Is it possible to add time stamps on the notification?  Incase anybody knows, does notifications have an expiry?

Offline ZW-Tom

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +8/-2
Re: Alexa can get notifications from Vera
« Reply #10 on: January 13, 2019, 04:13:52 am »
Hi, got this working on my doorbell and on my alarms (so that alexa can tell me which device triggered the alarm, if any, especially at night when i'm lazy to check on my phone). 

Is it possible to add time stamps on the notification?  Incase anybody knows, does notifications have an expiry?

Answers:
1.) When you ask "Alexa, read my notifications", it will display the notifications and when each notification was received. It will then announce each one.
2.) Notifications are archived in your Alexa app after you request a read. They do not "expire", but can only be announced one time each.
3.) You can delete the notifications received by saying "Alexa, delete my notifications."
NOTE: You must access your Alexa app to delete archived notifications. Use #3 above to avoid this.

Hope that helps,
Tom
p.s. Paste the code in your startup LUA and find out how may times Vera reboots every day!  :-[

Offline mbaker171

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-1
Re: Alexa can get notifications from Vera
« Reply #11 on: January 13, 2019, 07:14:00 am »
This is all very cool. I can send a static notify message from vera to Alexa ok. How would I send a message with some variable in it,  like : the temperature in the study is 'dynamic variable'?

Offline robie

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Alexa can get notifications from Vera
« Reply #12 on: January 17, 2019, 04:47:19 pm »
Answers:
1.) When you ask "Alexa, read my notifications", it will display the notifications and when each notification was received. It will then announce each one.

Many thanks again for the responses, it is very helpful.  Can i clarify the quoted reaponse on item 1 - is this applicable only to the echo show and echo spot? (a) It does not show on my amazon phone app and (b) the amazon voice devices does not read it with a time stamp

Offline mbaker171

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-1
Re: Alexa can get notifications from Vera
« Reply #13 on: January 18, 2019, 03:30:16 am »
Hope this will help. I have manged to use a variable(actually many variables)

local rtemp = "Current%20room%20temperature%20is.%20"..tostring(current_temp)
local ntemp = "and%20Thermostat%20is%20set%20to%20"..tostring(global_temp_set)

local btemp = rtemp.."%20"..ntemp

access_code ="Your code"

luup.inet.wget('https://api.notifymyecho.com/v1/NotifyMe?notification='..btemp..'..!&accessCode='..access_code)

If you want to string many messages together just add them to btemp.

I'm trying to use <break time="3s"/> now as Alexa reads the messages too quickly. No luck so far. Anyone any ideas?


Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Alexa can get notifications from Vera
« Reply #14 on: January 18, 2019, 04:30:47 am »
I managed to slow it done by using 3 commas (",,,").
Vera Edge EU, Fibaro FGRM 222 (14), Fibaro FGS 223 (26), Fibaro FGS 222 (6), Fibaro UBS (2), Fibaro+N Plug (3), NeoCoolCam Door Sensor (3), PIR (2) & Plugs (2), Nest (3), Home Server running my own integrations, Harmony Hub, OpenSprinkler, Personal Weather Station, Sonoff TH & more