Echo Speaks/IFTTT for Announcements


#1

1) Give a description of the problem
Can’t get the piston to fire correctly to output the speech

2) What is the expected behavior?
using IFTTT webhooks, send a SMS to IFTTT that relays to WC. When person arrives home, Echo gives the announcement (don’t forget to water the dog, etc)

3) What is happening/not happening?
I’ve gotten everything in place on the IFTTT side but can’t for the life of me figure out how to get the message over to the piston. I know it’s probably simple, but I’m a noob.

**4) Post a Green Snapshot of the piston!! Red snapshot added

5) Attach any logs (From ST IDE and by turning logging level to Full)
(PASTE YOUR LOGS HERE BETWEEN THE MARKS THEN HIGHLIGHT ALL OF THE LOGS SND CLICK ON THE </> ICON TO FORMAT THEM)

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

What does it look like on the ifttt side?

Edit: This is what I have…
image

In my example above… I can extract the message using $args.content variable.


#3



#4

Try to format the Body part to how I have it in my example.

In your piston, you can change messageText = $args.content


#5

Alright. I’ll give that a try when I get home and report back. Thanks so much!


#6

Dumb question I’m sure. I don’t see an option for $argus.content - where is it?


#7

$args is the data passed by IFTTT to your piston. If you format the Body of your IFTTT message like my example above, $args.content will extract the content part of the message only without the extra json data.


#8

I didn’t ask my question well enough - so when creating messageText = $args.content - I’m not sure how to do that. I can pull down and choose $args - but to add the .content - I’m lost. Did I tell you I’m a noob?


#9

Sorry, you can choose Expressions and you can type it in manually :slight_smile:


#10

well, we have some progress - SOME.
The piston did fire and the Echo did speak. However, it said something about playing Simon Says. NOT the text I sent.


#11

How does the ifttt side look like now?


#12

Interesting - now the Echo says “No” when the piston fires. I changed the IFTTT to POST to match yours.


#13

And the piston side?


#14


#15

Add a Log messageText after your line 21 and see what you get.


#16


Echo says “No”


#17

What was logged?


#18

Also for giggles, change your variable messageText type from dynamic to string, I know ES is expecting a string.


#19

Not sure where the message was logged. But I changed to string and still got “No”


#20

Logs

1/25/2019, 7:58:44 PM +196ms
+0ms ╔Received event [Home].time = 1548467925764 with a delay of -1569ms
+348ms ║RunTime Analysis CS > 53ms > PS > 254ms > PE > 42ms > CE
+352ms ║Runtime (40716 bytes) successfully initialized in 254ms (v0.3.109.20181207) (349ms)
+353ms ║╔Execution stage started
+581ms ║║Executed physical command [Echo - Jerry’s Echo Dot].setVolumeSpeakAndRestore([75, null]) (194ms)
+583ms ║║Executed [Echo - Jerry’s Echo Dot].setVolumeSpeakAndRestore (196ms)
+592ms ║║Executed virtual command [Echo - Jerry’s Echo Dot].setVariable (3ms)
+596ms ║╚Execution stage complete. (244ms)
+598ms ╚Event processed successfully (599ms)
1/25/2019, 7:58:35 PM +453ms
+1ms ╔Received event [Tanya’s lamp].switch = on with a delay of 440ms
+252ms ║RunTime Analysis CS > 15ms > PS > 205ms > PE > 32ms > CE
+254ms ║Runtime (40740 bytes) successfully initialized in 205ms (v0.3.109.20181207) (252ms)
+255ms ║╔Execution stage started
+266ms ║║Comparison (string) null executes (string) Alexa text message Jerry = false (2ms)
+268ms ║║Cancelling condition #2’s schedules…
+269ms ║║Condition #2 evaluated false (8ms)
+270ms ║║Cancelling condition #1’s schedules…
+271ms ║║Condition group #1 evaluated false (state changed) (10ms)
+279ms ║║Comparison (enum) on changes_to (string) on = true (1ms)
+281ms ║║Cancelling condition #7’s schedules…
+282ms ║║Condition #7 evaluated true (7ms)
+284ms ║║Cancelling condition #6’s schedules…
+285ms ║║Condition group #6 evaluated true (state changed) (10ms)
+293ms ║║Comparison (boolean) true is (boolean) true = true (2ms)
+295ms ║║Cancelling condition #9’s schedules…
+296ms ║║Condition #9 evaluated true (8ms)
+297ms ║║Cancelling condition #8’s schedules…
+298ms ║║Condition group #8 evaluated true (state changed) (11ms)
+302ms ║║Cancelling statement #10’s schedules…
+309ms ║║Executed virtual command [Echo - Jerry’s Echo Dot].wait (1ms)
+311ms ║║Requesting a wake up for Fri, Jan 25 2019 @ 7:58:45 PM CST (in 10.0s)
+317ms ║╚Execution stage complete. (62ms)
+319ms ║Setting up scheduled job for Fri, Jan 25 2019 @ 7:58:45 PM CST (in 9.993s)
+329ms ╚Event processed successfully (329ms)
1/25/2019, 7:58:31 PM +673ms
+0ms ╔Received event [Home].ifttt = Alexa text message Jerry with a delay of 105ms
+434ms ║RunTime Analysis CS > 19ms > PS > 374ms > PE > 42ms > CE
+437ms ║Runtime (40736 bytes) successfully initialized in 374ms (v0.3.109.20181207) (436ms)
+438ms ║╔Execution stage started
+448ms ║║Comparison (string) Alexa text message Jerry executes (string) Alexa text message Jerry = true (2ms)
+450ms ║║Cancelling condition #2’s schedules…
+451ms ║║Condition #2 evaluated true (7ms)
+452ms ║║Cancelling condition #1’s schedules…
+453ms ║║Condition group #1 evaluated true (state changed) (10ms)
+456ms ║║Cancelling statement #3’s schedules…
+463ms ║║Executed virtual command setVariable (4ms)
+468ms ║║Executed virtual command setVariable (1ms)
+474ms ║║null
+476ms ║║Error executing virtual command [].log: (2ms) groovy.lang.MissingMethodException: No signature of method: physicalgraph.sandbox.TruncatingLoggingListener.#jerry say something bedsides no() is applicable for argument types: (org.codehaus.groovy.runtime.GStringImpl, null) values: [║║ null, null]
+491ms ║║Condition #7 evaluated false (8ms)
+493ms ║║Condition group #6 evaluated false (state did not change) (9ms)
+495ms ║╚Execution stage complete. (57ms)
+496ms ╚Event processed successfully (496m