So the “hard” part of this automation is not triggering lights off when you switch harmony activities. Harmony doesn’t switch activities, she turns one off then turns another activity on. This is why it seems simple but is not .
With webcore you could have a timer or something like, if a harmony activity turns off AND another harmony activity doesn’t turn on within 1 minute, then turn off the lights.
Or how about If no Harmony Activities are On, then turn off the lights? As a webcore code suggestion.
You are over thinking it, the delay is not necessary. I’ve had the piston above working for a long time, and out of the hundreds, if not thousands of times the activities have changed, I can count on one hand the number of times the lights turned off when I did not want them to.
Any Harmony Devices changes
----Any of Harmony Devices are On (Activities that you want involved with turning on Light)
----Then Using Light Turn On
----All of Harmony Devices are Off
----Then Using Light Turn Off
Notice that the two “If” sections with the conditions are under(after) the “Then” after the initial “If” Any “Changes”
For an easier (but initially confusing) setup, Define your devices at the top of the Piston. This way, all you have to do is just select the Physical Variable, which would already contain all of the Devices you defined…After defining, the variable will show up after the actual physical devices in the selection section.
Instant ST update of Harmony Activities:
Make sure in the actual Harmony Activiy ,in the Harmony App, you select the Home Device that matches the activiy to turn on/off. This will give instant updates in the ST App.
Ok I tested this morning. The lights came on instantly (Tp-link socket connected to two low powered spots) then I moved through 5 different activities, out of a possible 26. In each case the lights stayed on as they should. On shut down of system the lights went off after a delay of approx 30 seconds. So all working, but with a delay on the lights.
Any Idea what causes the delay, and if it can be rectified?
Update: since writing this I found the post from Chris Lang and installed his “Harmony Hub Sync” piston, which has dropped it to 2 seconds.
So a big thanks to destructure00 and Chris Lang for both their pistons.
@Montell I don’t think you read the link instructions correctly. Don’t add the lights to the end of the activity in Harmony.
After you’ve linked Harmony to SmartThings through the SmartThings app, and added SmartThings to Harmony through the Harmony app, all of the devices, things, switches, scenes, and routines from SmartThings appear as switches in Harmony. That includes the Harmony activities, because you would have linked them to SmartThings before. So, now you edit the Harmony activity, adding as the last action the SmartThings switch that points back to the same Harmony activity, like a loop. You do that for both the start and end sequence of each Harmony activity. So, as the last step of the Harmony start sequence, you tell it to turn on the SmartThings switch that starts that same Harmony activity. For the last step of the Harmony end sequence you tell it to turn off the SmartThings switch that turns off that same Harmony activity. What that does is it tricks Harmony into sending instant status updates to SmartThings. No more 5 minute delay.
Then within SmartThings app you can create an automation for SmartThings to turn off the lights after the Harmony activity is turned off. You can even set a delay of your choosing using webcore.