Alexa response

I could use some help with this Echo reminder. I made a virtual switch "Alexa says" to control a response when a "take out garbage" reminder is announced.
I not sure if I'm adding this to the correct location for an action in RM. I'm trying to add it to apps code. When I do I get this error...
"unexpected token: every @ line 1, column 8."

This routine should do the following:

On Mon & thu @ 2:18 PM
Alexa asks Hey it's garbage night. Have you taken out the garbage?
My response If yes then End If no then ask again in 20 minutes.

Any help would be appreciated. I'm not sure if the code will even work.

Trigger Event

On Mon, Thu at 2:18 PM

Actions to Run

Repeat every 0:20:00 (stoppable)
Notify Echo - Kitchen echo:'Hey it's garbage night. Have you taken out the garbage? Please say "Alexa done" to confirm task finished, otherwise I will remind you again in 20 minutes.'
Wait for event:alexa says yes(off) turns on--> timeout 0:00:15
IF (alexa says yes(off) is on FALSE) Stop Repeating Actions
END-REP
IF (alexa says (off) is on(F) [FALSE]) THEN
Notify Echo - Kitchen echo: "Thank for taking out the garbage."
ELSE
Notify Echo - Kitchen echo: 'The request had timed out.'
END-IF

Apps code allows you to add third party (or your own) apps written in Groovy. What you want to do here is add it in Rule Machine. If Rule Machine doesn't show up in your listed apps you can install it by going to the apps page and then clicking here...

and scrolling down to

However... if this is your first attempt at automation you may want to try something a bit simpler. Rule Machine is powerful but it can be a bit daunting.
Sounds like you may be jumping in at the deep end of the pool, so to speak.

There's some documentation available here that will help.

https://docs.hubitat.com/index.php?title=Hubitat_Elevation_Documentation

I tried to add it to RM but can't locate where to enter the code.

It's not so much a matter of typing in the code as it is selecting code elements from the drop-downs. The screen shots should give you an idea, though I did omit a couple intermediate screens to save time. Hope this helps! It is a little tricky at first so patience is key. Again, you might try with a much simpler automation and get the hang of it.






1 Like

Well I think I got it! Tested and seems to work.
The final test will be on the day it runs.
Thanks again for all your help with this.

Good learning experience!

BTW you can run the rule actions regardless of the trigger to test it

Yes I did that. Seems to work fine.