1) Give a description of the problem
I am trying to populate a Global Variable Device via a piston with the most recently spoken to Echo dot. I am using two pistons.
- “Set Last Alexa Spoken to” (see below) to capture the device name most recently used and then it populates a Global Variable Device called “@WhichEcho” with that device’s name.
- “Echo Response Test” is a test piston to make sure when I speak to a specific Echo it responds back.
The result of my test is that after executing the “Echo Response Test” piston, the response is being played on the previous Echo used.
For testing
- I speak to a dissimilar Echo just to set the Global Variable Device different from the one I am testing on.
- I wait between one to two minutes before speaking to the test Echo.
- I speak to the Echo I want to respond.
I have setup a few Log to Console comments to see what is happening, it I am reading them correctly it appears that the name of the device is not changing fast enough to capture the last one used.
Please Note:
I have looked at other older responses to issues somewhat similar to this in the WebCore Forums. I have tried adopting those pistons, but I get the same result, the response is being played on the previous Echo used not the one I just spoke to.
2) What is the expected behaviour?
The goal is to use this Global Variable Device in a number of different pistons.
When I ask Alexa to execute a piston (currently via IFTTT) a response will play back on the original Echo that was spoken to.
3) What is happening/not happening?
The response is being played on the previous Echo used not the most recent one spoken to.
**4) Post a Green Snapshot of the piston!
5) Attach logs after turning logging level to Full
3/11/2020, 4:22:20 PM +107ms
+132ms ╔Stopping piston…
+562ms ╚Piston successfully stopped (430ms)
3/11/2020, 4:22:12 PM +910ms
+1ms ╔Received event [Echo - Media Room Echo Dot].wasLastSpokenToDevice = true with a delay of 159ms
+81ms ║RunTime Analysis CS > 19ms > PS > 48ms > PE > 14ms > CE
+83ms ║Runtime (42303 bytes) successfully initialized in 48ms (v0.3.110.20191009) (81ms)
+84ms ║╔Execution stage started
+117ms ║║Comparison (string) false is (boolean) true = false (2ms)
+119ms ║║Comparison (string) false is (boolean) true = false (2ms)
+121ms ║║Comparison (string) false is (boolean) true = false (1ms)
+123ms ║║Comparison (string) true is (boolean) true = true (1ms)
+124ms ║║Comparison (string) false is (boolean) true = false (1ms)
+126ms ║║Comparison (string) false is (boolean) true = false (1ms)
+131ms ║║Cancelling condition #2’s schedules…
+131ms ║║Condition #2 evaluated true (43ms)
+132ms ║║Cancelling condition #1’s schedules…
+133ms ║║Condition group #1 evaluated true (state changed) (46ms)
+135ms ║║Cancelling statement #3’s schedules…
+141ms ║║Calculating (string) The Echo Used before + (string) Echo - Spare Room Echo Dot >> (string) The Echo Used before Echo - Spare Room Echo Dot
+144ms ║║The Echo Used before Echo - Spare Room Echo Dot
+145ms ║║Executed virtual command log (1ms)
+148ms ║║Executed virtual command setVariable (1ms)
+153ms ║║Calculating (string) The Echo Used After + (string) Echo - Media Room Echo Dot >> (string) The Echo Used AfterEcho - Media Room Echo Dot
+156ms ║║The Echo Used AfterEcho - Media Room Echo Dot
+157ms ║║Executed virtual command log (1ms)
+159ms ║╚Execution stage complete. (75ms)
+160ms ╚Event processed successfully (160ms)
3/11/2020, 4:22:10 PM +898ms
+1ms ╔Received event [Echo - Spare Room Echo Dot].wasLastSpokenToDevice = false with a delay of 72ms
+65ms ║RunTime Analysis CS > 17ms > PS > 37ms > PE > 11ms > CE
+67ms ║Runtime (42331 bytes) successfully initialized in 37ms (v0.3.110.20191009) (65ms)
+68ms ║╔Execution stage started
+100ms ║║Comparison (string) false is (boolean) true = false (1ms)
+103ms ║║Comparison (string) false is (boolean) true = false (1ms)
+105ms ║║Comparison (string) false is (boolean) true = false (2ms)
+107ms ║║Comparison (string) false is (boolean) true = false (2ms)
+109ms ║║Comparison (string) false is (boolean) true = false (1ms)
+111ms ║║Comparison (string) false is (boolean) true = false (1ms)
+115ms ║║Cancelling condition #2’s schedules…
+115ms ║║Condition #2 evaluated false (43ms)
+116ms ║║Cancelling condition #1’s schedules…
+117ms ║║Condition group #1 evaluated false (state changed) (45ms)
+119ms ║╚Execution stage complete. (51ms)
+120ms ╚Event processed successfully (120ms)
3/11/2020, 4:19:06 PM +880ms
+1ms ╔Received event [Echo - Spare Room Echo Dot].wasLastSpokenToDevice = true with a delay of 167ms
+85ms ║RunTime Analysis CS > 27ms > PS > 45ms > PE > 12ms > CE
+87ms ║Runtime (42303 bytes) successfully initialized in 45ms (v0.3.110.20191009) (85ms)
+88ms ║╔Execution stage started
+123ms ║║Comparison (string) false is (boolean) true = false (1ms)
+124ms ║║Comparison (string) false is (boolean) true = false (1ms)
+126ms ║║Comparison (string) false is (boolean) true = false (1ms)
+128ms ║║Comparison (string) false is (boolean) true = false (1ms)
+130ms ║║Comparison (string) false is (boolean) true = false (1ms)
+132ms ║║Comparison (string) true is (boolean) true = true (1ms)
+136ms ║║Cancelling condition #2’s schedules…
+137ms ║║Condition #2 evaluated true (46ms)
+138ms ║║Cancelling condition #1’s schedules…
+139ms ║║Condition group #1 evaluated true (state changed) (47ms)
+140ms ║║Cancelling statement #3’s schedules…
+146ms ║║Calculating (string) The Echo Used before + (string) Echo - Spare Room Echo Dot >> (string) The Echo Used before Echo - Spare Room Echo Dot
+149ms ║║The Echo Used before Echo - Spare Room Echo Dot
+150ms ║║Executed virtual command log (1ms)
+153ms ║║Executed virtual command setVariable (1ms)
+158ms ║║Calculating (string) The Echo Used After + (string) Echo - Spare Room Echo Dot >> (string) The Echo Used AfterEcho - Spare Room Echo Dot
+161ms ║║The Echo Used AfterEcho - Spare Room Echo Dot
+162ms ║║Executed virtual command log (1ms)
+164ms ║╚Execution stage complete. (77ms)
+165ms ╚Event processed successfully (165ms)
3/11/2020, 4:19:06 PM +104ms
+1ms ╔Received event [Echo - Kitchen Echo Dot].wasLastSpokenToDevice = false with a delay of 165ms
+104ms ║RunTime Analysis CS > 25ms > PS > 55ms > PE > 25ms > CE
+107ms ║Runtime (42327 bytes) successfully initialized in 55ms (v0.3.110.20191009) (105ms)
+108ms ║╔Execution stage started
+142ms ║║Comparison (string) false is (boolean) true = false (1ms)
+144ms ║║Comparison (string) false is (boolean) true = false (2ms)
+146ms ║║Comparison (string) false is (boolean) true = false (2ms)
+148ms ║║Comparison (string) false is (boolean) true = false (1ms)
+150ms ║║Comparison (string) false is (boolean) true = false (1ms)
+152ms ║║Comparison (string) false is (boolean) true = false (1ms)
+156ms ║║Cancelling condition #2’s schedules…
+157ms ║║Condition #2 evaluated false (45ms)
+158ms ║║Cancelling condition #1’s schedules…
+159ms ║║Condition group #1 evaluated false (state changed) (48ms)
+161ms ║╚Execution stage complete. (54ms)
+162ms ╚Event processed successfully (162ms)
3/11/2020, 4:22:14 PM +144ms
+87ms ╔Stopping piston…
+403ms ╚Piston successfully stopped (317ms)
3/11/2020, 4:21:29 PM +789ms
+0ms ╔Received event [My home].ifttt = its_quiet with a delay of 146ms
+77ms ║RunTime Analysis CS > 19ms > PS > 47ms > PE > 11ms > CE
+79ms ║Runtime (40898 bytes) successfully initialized in 47ms (v0.3.110.20191009) (78ms)
+80ms ║╔Execution stage started
+87ms ║║Comparison (string) its_quiet executes (string) its_quiet = true (2ms)
+88ms ║║Cancelling condition #2’s schedules…
+89ms ║║Condition #2 evaluated true (5ms)
+90ms ║║Cancelling condition #1’s schedules…
+90ms ║║Condition group #1 evaluated true (state changed) (6ms)
+92ms ║║Cancelling statement #5’s schedules…
+516ms ║║Calculating (string) The Echo used in the test + (string) Echo - Spare Room Echo Dot >> (string) The Echo used in the test Echo - Spare Room Echo Dot
+519ms ║║The Echo used in the test Echo - Spare Room Echo Dot
+520ms ║║Executed virtual command log (1ms)
+522ms ║║Cancelling statement #3’s schedules…
+527ms ║║Calculating (string) The last spoken to Echo was + (string) Echo - Spare Room Echo Dot >> (string) The last spoken to Echo was Echo - Spare Room Echo Dot
+1062ms ║║Executed physical command [Echo - Spare Room Echo Dot].playText([The last spoken to Echo was Echo - Spare Room Echo Dot]) (529ms)
+1062ms ║║Executed [Echo - Spare Room Echo Dot].playText (530ms)
+1065ms ║║Cancelling statement #7’s schedules…
+1070ms ║║Calculating (string) Echo in use after the test + (string) Echo - Spare Room Echo Dot >> (string) Echo in use after the test Echo - Spare Room Echo Dot
+1073ms ║║Echo in use after the test Echo - Spare Room Echo Dot
+1074ms ║║Executed virtual command log (1ms)
+1076ms ║╚Execution stage complete. (996ms)
+1261ms ╚Event processed successfully (1261ms)
REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.