CoRE - Get peer assistance here with setting up Pistons

This is not really an answer to your question, but check out this link it may be pertinent.

I currently use this option with IFT TT to set my LIFX to certain colors, but not turn them on until motion is detected.