We have moved at community.getvera.com

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

Offline mbaker171

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-1
Re: Alexa can get notifications from Vera
« Reply #15 on: January 18, 2019, 05:06:22 am »
Thanks for that... it works .. but I'm not going to give up just yet.. look at all the other things you can do .. I just need to figure out how.

https://developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#break

Offline therealdb

  • Sr. Member
  • ****
  • Posts: 258
  • Karma: +6/-0
  • Automate all the things!
Re: Alexa can get notifications from Vera
« Reply #16 on: January 18, 2019, 06:55:35 am »
Custom skills are powerful, but you can?t initiate a tts. So far I?m very happy with the results.
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 robie

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Alexa can get notifications from Vera
« Reply #17 on: January 22, 2019, 07:20:46 am »
Is there a variable script to add the time of the alarm to the voice message?

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 ZW-Tom

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +8/-2
Re: Alexa can get notifications from Vera
« Reply #18 on: January 23, 2019, 09:54:27 am »
I posted a new update with my original post on page 1. Let's you send notifications from any scene by just using the following as an example:

AlexaMessage("Someone is hiding behind the curtain.")

Tom


Offline robie

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #19 on: January 24, 2019, 08:25:04 pm »
This is great and many thanks!  Is there a way to do this (time stamp) without editing the startup lua? (for the ff reasons - i will use it on several scenes, less software changes to the vera system and confined scripting to the scenes)

I posted a new update with my original post on page 1. Let's you send notifications from any scene by just using the following as an example:

AlexaMessage("Someone is hiding behind the curtain.")

Tom



Offline Buxton

  • Full Member
  • ***
  • Posts: 209
  • Karma: +12/-0
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #20 on: January 25, 2019, 01:17:51 am »
Very nice.  I was dreading writing a date to tts conversion script for this service as I didn't realize you could get similar results with os.date('*t').  Thx for this.  It's a great help. 

And for those who want to know exactly when your vera reboots--via Alexa notification, add a subsequent function call in the startup lua (next line down)
AlexaMessage("")     with your warning text in between the quotes. 
« Last Edit: January 25, 2019, 03:15:37 am by Buxton »

Offline ZW-Tom

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +8/-2
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #21 on: January 25, 2019, 03:53:10 pm »
This is great and many thanks!  Is there a way to do this (time stamp) without editing the startup lua? (for the ff reasons - i will use it on several scenes, less software changes to the vera system and confined scripting to the scenes)

I posted a new update with my original post on page 1. Let's you send notifications from any scene by just using the following as an example:

AlexaMessage("Someone is hiding behind the curtain.")

Tom



If you put it in your startup Lua, you never need to run the scene again. You only use the call ... example ie:
AlexaMessage("ZW-Tom sure is a helpful old dude. Just ask him. I think he will agree.")

When you create a scene in Vera, it does not activate until it is called, so unless the scene is run one time, the call does not work. After it is run with Lua startup, any call from another function using AlexaMessage("Say this") will work as long as the scene has run one time. This is an easy way of doing Lua code without all the other lua junk.

However:
If you want the use the code confined to a particular group of scenes, paste the AlexaMessage code into your desired scene and put the AlexaMessage("Say this") at the bottom of the code which will call the function every time that scene is triggered. (This process adds alot of code every time you send a message. Not very desiriable.)

Tom
« Last Edit: January 25, 2019, 06:28:27 pm by ZW-Tom »

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1464
  • Karma: +41/-36
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #22 on: January 25, 2019, 08:23:31 pm »
Outstanding. +1. I just wonder when I'll get the time to implement this with a high WAF.
Vera 3, 1.7.1040, CT101, Everspring Motion, GE/Jasco Switch/Dimmer, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, LB60Z-1 bulb, Hue, Alexa, Zooz 4-1

Offline mbaker171

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-1
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #23 on: January 26, 2019, 06:20:20 am »
I'd second that out standing. I am already using it.

I'm trying to incorporate some of these features here
https://developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#ssml-supported

Specially as a test this one
<break time="5s"/>

I'm trying this
AlexaMessage('Hello'..'<break time="5s"/>'..'World')

the command executes ok in Vera but a notification is never received.
I'm way over my head here but I'd like to know if what I am trying to do is possible or not!

Offline markoe

  • Full Member
  • ***
  • Posts: 137
  • Karma: +4/-3
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #24 on: January 26, 2019, 12:07:53 pm »
Thanks for sharing this ... works for me also.

I hope I can get alexa to speak out the notification some day directly without me asking it to "read my notifications". If I have understood correctly that is not possible at the moment due to alexa api limitations.



Offline ZW-Tom

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +8/-2
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #25 on: January 26, 2019, 07:13:35 pm »
I'd second that out standing. I am already using it.

I'm trying to incorporate some of these features here
https://developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#ssml-supported

Specially as a test this one
<break time="5s"/>

I'm trying this
AlexaMessage('Hello'..'<break time="5s"/>'..'World')

the command executes ok in Vera but a notification is never received.
I'm way over my head here but I'd like to know if what I am trying to do is possible or not!

Just add a comma after the word(s) you want to pause ...
AlexaMessage("Hello, world")

Tom

Offline mbaker171

  • Jr. Member
  • **
  • Posts: 85
  • Karma: +0/-1
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #26 on: January 27, 2019, 04:37:24 am »
I'd second that out standing. I am already using it.

I'm trying to incorporate some of these features here
https://developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#ssml-supported

Specially as a test this one
<break time="5s"/>

I'm trying this
AlexaMessage('Hello'..'<break time="5s"/>'..'World')

the command executes ok in Vera but a notification is never received.
I'm way over my head here but I'd like to know if what I am trying to do is possible or not!

Just add a comma after the word(s) you want to pause ...
AlexaMessage("Hello, world")

Tom

This rather misses the point of my post which is to figure out how to use those new speech features. The speech delay was just a simple one to try first.

Mick

Offline ZW-Tom

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +8/-2
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #27 on: January 27, 2019, 01:44:39 pm »
I'd second that out standing. I am already using it.

I'm trying to incorporate some of these features here
https://developer.amazon.com/docs/custom-skills/speech-synthesis-markup-language-ssml-reference.html#ssml-supported

Specially as a test this one
<break time="5s"/>

I'm trying this
AlexaMessage('Hello'..'<break time="5s"/>'..'World')

the command executes ok in Vera but a notification is never received.
I'm way over my head here but I'd like to know if what I am trying to do is possible or not!

Just add a comma after the word(s) you want to pause ...
AlexaMessage("Hello, world")

Tom

This rather misses the point of my post which is to figure out how to use those new speech features. The speech delay was just a simple one to try first.

Mick

This post is intended to help others use an Alexa "Notify Me" "skill" with Vera using the code I developed. Discussion regarding "SSML Tags" would be best discussed in another subject post, as it (and voice announce) do not appy here.

Tom



Offline robie

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Alexa can get notifications from Vera - UPDATED 01/23
« Reply #28 on: January 29, 2019, 03:39:53 am »
If you put it in your startup Lua, you never need to run the scene again. You only use the call ... example ie:
AlexaMessage("ZW-Tom sure is a helpful old dude. Just ask him. I think he will agree.")

When you create a scene in Vera, it does not activate until it is called, so unless the scene is run one time, the call does not work. After it is run with Lua startup, any call from another function using AlexaMessage("Say this") will work as long as the scene has run one time. This is an easy way of doing Lua code without all the other lua junk.

However:
If you want the use the code confined to a particular group of scenes, paste the AlexaMessage code into your desired scene and put the AlexaMessage("Say this") at the bottom of the code which will call the function every time that scene is triggered. (This process adds alot of code every time you send a message. Not very desiriable.)

Tom

Okies, many thanks for the additional explanations.  i'll copy paste and stop asking, haha! cheers to you :-)