Importing a piston using an import code


#1

1) Give a description of the problem
Hello All! Newbie here…I’m trying to import a piston with an import code. When I click on “Restore a piston using a backup code”, I’m getting an unpopulated piston. What am I doing incorrectly?

2) What is the expected behaviour?
(PUT YOUR INFO HERE)

3) What is happening/not happening?
(PUT YOUR INFO HERE)

4) Post a Green Snapshot of the pistonimage
(UPLOAD YOUR IMAGE HERE)

5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)

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


#2

Does this happen on all codes?


#3

Excellent question! I didn’t think to try another code. I did so and they worked. I informed the author of a possible issue with his import code. Thanks!


#4

So I created a new piston. Is it supposed to work once I’ve saved it, or am I supposed to upload it into my Smartthings EDI? If the later, how do I do that?


#5

It will work as long as you saved it and it is not paused. No need to upload.


#6

When importing a piston, it is probably also worth taking a few moments to make sure your devices got inserted in the right location. Without referencing the original, it may be tough to know which device goes where…


#7

So here’s my newbie piston. I have a GE z-wave motion sensor dimmer wall switch. Had to use a device handler from MichaelS, a Smartthings Published Contributor, to get ST to recognize it as a motion sensor (it’s apparently not yet a recognized ST device). Now trying to automate the device with this piston. What I want to do is have the motion sensor turn on a light at 10% only between the hours of 9pm and sunrise and do nothing (except manual use) between sunrise and 9pm. Haven’t gotten it to work yet.


#8

Hi
I think you need to un-nest the if that checks for inactive motion.

The piston will run top to bottom whenever there is a trigger. So when motion is detected, it will run, turning the light on. However, when it hits the “if motion inactive” that will evaluate to false and the piston will complete. When it gets triggered again, when motion goes inactive, the first if (motion active) will be false, so the second if will never be executed.


#9

How would I get the device to turn off after 5 seconds of inactivity?


#10

Try using the “stays” condition rather than “changes to” you can then specify how many seconds/minutes it should stay as inactive before triggering the piston.


#11

Tried that. The piston doesn’t seem to be working at all. The motion sensor/light switch is still activating at all times. Likely my error somehow, but can’t seem to figure it out. Probably time to just get an apporved ST light switch and motion sensor.


#12

For us to help, we’d need to see the logs during an error, and a green snapshot with Trace turned on…


#13

Here you go…


#14

For starters, drag all of the other IFs outside of the first one so you end up with 3 separate IF statements. Test the piston.