CoRE - Get peer assistance here with setting up Pistons

where is that?

in the IDE > Live Logging > (select the name of the webCoRE parent app, when it shows up)

50a2ba25-0e42-4e95-b850-0bf86292dbd1 2:23:25 PM: debug Settings global vars to [@WakeUp:[v:1494083700000, t:time], @TimeOut:[v:40, t:integer], @WestLow:[v:0, t:integer], @TimeOut2:[v:72, t:integer], @WestHigh:[v:10, t:integer], @EastHigh:[v:10, t:integer], @EastLow:[v:0, t:integer]] (piston)

50a2ba25-0e42-4e95-b850-0bf86292dbd1 2:24:19 PM: debug Settings global vars to [@WakeUp:[v:1494083700000, t:time], @TimeOut:[v:40, t:integer], @WestLow:[v:0, t:integer], @TimeOut2:[v:72, t:integer], @WestHigh:[v:30, t:integer], @EastHigh:[v:0, t:integer], @EastLow:[v:0, t:integer]] (piston)

50a2ba25-0e42-4e95-b850-0bf86292dbd1 2:25:33 PM: debug Settings global vars to [@WakeUp:[v:1494083700000, t:time], @TimeOut:[v:480, t:integer], @WestLow:[v:0, t:integer], @TimeOut2:[v:97, t:integer], @WestHigh:[v:10, t:integer], @EastHigh:[v:0, t:integer], @EastLow:[v:0, t:integer]] (piston)
50a2ba25-0e42-4e95-b850-0bf86292dbd1 2:25:34 PM: debug Settings global vars to [@WakeUp:[v:1494083700000, t:time], @TimeOut:[v:480, t:integer], @WestLow:[v:0, t:integer], @TimeOut2:[v:97, t:integer], @WestHigh:[v:30, t:integer], @EastHigh:[v:0, t:integer], @EastLow:[v:0, t:integer]] (piston)

Dashboard is still showing:

Looks like two writes at the same time, fixed that, letā€™s upgrade the child app now pleaseā€¦ and run them again, there should only be ONE write for each run

Is the piston that sets @TimeOut2 running twice each time by any chance?

IIt looks like its just writing once now:

50a2ba25-0e42-4e95-b850-0bf86292dbd1 2:38:28 PM: debug Settings global vars to [@WakeUp:[v:1494083700000, t:time], @WestLow:[v:0, t:integer], @TimeOut:[v:480, t:integer], @WestHigh:[v:30, t:integer], @TimeOut2:[v:48, t:integer], @EastLow:[v:0, t:integer], @EastHigh:[v:0, t:integer]] (piston)

haha! Dashboard updated properly this time too!

So let me check one thing, am I finalizing the event twice, 'cause it makes no sense otherwiseā€¦

this makes NO senseā€¦ piston starts off with executeHandler (since youā€™re executing it by means of another piston) which executes handleEvents when then runs the whole logic and at the end runs finalizeEvent and then ā€¦ well, ends. How does finalizeEvent run twice?! Are you sure your piston doesnā€™t run twice?

Ok, are you by any chance executing it in a loop? or twice? You can also check the location events in the IDE to find the events that cause the piston to execute - are they two?

Yeah sorry, I tried to rig up a virtual switch to test the piston more easily. Itā€™s possible its also causing something else to trigger it again, but I thought I paused that.

It does look like its still being triggered twice.

Well, try and figure it out, felt like race conditionsā€¦ :smiley: thatā€™s treacherous waters right thereā€¦

yeah wow. Iā€™ll look into it but I have no clue where its coming from.

welpā€¦ Iā€™m fried. 7 hours working on this is enough for me.

I still have old CoRE pistons. I still have routinesā€¦ I canā€™t map the interaction between all of them. Live logging doesnā€™t seem to give enough info. Iā€™m just going to scrap it all and start over someday. Until then Iā€™ll just live with the brokeness, cuz, you know, smartthings.

Enable logs on all pistons, one by one. The logs are disabled by default

Wellā€¦ ok solved I think.

seems the pistons with the switch statements needed to have automatic piston state on.

Also, I needed to turn my night mode piston back to ā€œisā€ night not ā€œchanges toā€. Now everything is behaving properly.

Iā€™d be happier about it if I didnā€™t just waste an entire sunny Saturday on it.

I really am grateful for all the help from @ady624. That was above and beyond.

1 Like

Hey one more question guys. Iā€™ve moved on to implementing the remaining pistons that I delete out of CoRE.

I have one using a 3d sensor for the garage door. Under CoRE there was an ā€œorientationā€ value, but its not available under WebCoRE.

Yet to come?

Not available yet, will be

1 Like

thank you!

Hello all
I need help with a piston not turning the lights off in the morning, tried both Core and webcore same result.


Am I missing something? Thanks.