Making Alexa run 2 Harmony Activities Consecutively with WebCore


#1

1) Give a description of the problem
I have an Amazon Echo, Harmony Elite w/Hub, and Smartthings. I have many virtual switches to trigger a lot of my Harmony activities via Alexa voice commands. I created a “Commercial Skip” virtual switch for Alexa. My “Commercial Skip” Harmony Activity activates an activity startup sequence that calls for the TiVo to use the commercial skip function on the DVR for the current commercial break.

Ideally, I would like the Alexa command to turn on the “Commercial Skip” activity, then immediately afterwards resume my normal “Watch TV” Harmony Activity, that way I can retain my favorite channels quicklaunch buttons on my Elite remote.

2) What is the expected behaviour?
The Alexa trigger should turn on “Commercial Skip”, wait 10 seconds (to account for a bit of a lag between Harmony/Smartthings triggers), then turn on/resume my “Watch TV” activity.

3) What is happening/not happening?
My “Commercial Skip” activity turns on and stays on. “Commercial Skip” should turn on, then after 10 seconds the “Watch TV” should turn on (and “Commercial Skip” should turn off).

This used to work for me in CoRE but became unreliable recently, so I upgraded to WebCore and tried to replicate the piston. Linked below is my previous post on the Smartthings forum which led me to my original CoRE piston.

Making Alexa run 2 Harmony Activities consecutively?

4) Post a Green Snapshot of the pistonimage

*Note in the image above that “Switch 2” is my “Commercial Skip” switch, and “Switch 15” is my normal “Watch TV” switch.

5) Attach logs after turning logging level to Full
7/20/2019, 12:08:18 PM +618ms
+1ms ╔Received event [z1 - Commercial Skip].switch = off with a delay of 42ms
+66ms ║RunTime Analysis CS > 14ms > PS > 38ms > PE > 14ms > CE
+68ms ║Runtime (36694 bytes) successfully initialized in 38ms (v0.3.10e.20190628) (66ms)
+69ms ║╔Execution stage started
+77ms ║║Comparison (enum) off changes_to (string) on = false (1ms)
+79ms ║║Condition #2 evaluated false (4ms)
+79ms ║║Condition group #1 evaluated false (state did not change) (5ms)
+81ms ║╚Execution stage complete. (12ms)
+83ms ╚Event processed successfully (82ms)

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


#2

The log you posted shows “Commercial Skip” turning off, not on.
This means that the condition evaluated false, so no commands should have been sent.


#3

Also, if you’re using virtual switches to trigger the “commercial skip” Piston when turned on , you’re going to have to turn those virtual switches back off with another piston command. Otherwise the virtual switch will stay on and the next time you say the Alexa command it won’t turn on the virtual switch to trigger the piston because the switch will have been left on from the last command.