CoRE - Get peer assistance here with setting up Pistons

Hi,
I’m not being obstructive or anything but you have posted in the CoRE thread as opposed to the webCore thread.
Might be better to post there and you will get all the webCoRE guru’s looking and able to advise.
Good luck.
EDIT: From my limited knowledge I think you may need to change your ‘IF’ statements to run async.

Use the preset time Sunset, not the variable $sunset. Same for $sunrise, use the preset Sunrise instead

how come the first 3 conditions run using the variables without issue, but when it gets to the ones that are asking lights to fade, they don’t run?

Apologize if this has been asked earlier and seems like a dumb question - tried search and could not find.

i am trying to make a ‘new instance of CoRe’ in my smartapps list, e.g.
CoRE - living room
CoRE - bedroom
etc.
etc.

with their own respective Smart Apps instead of ONE single CoRE with many pistons.

I have tried going to Marketplace tab > custom app (pasted Code, no Github integration) > CoRe, but it jumps to a random piston instead of starting up a new blank CoRe.

There is a line in the SmartApp that you need to change in the IDE. Can’t remember exactly but I know it was around line 55. Find the word true and change it to false.

Edit: I moved my post to webCoRE thread as it was mistakenly posted in CoRE.Moved post

Is anyone able to control a furnace fan via Nest and ST? I can get the fan to turn on but cannot get it to cancel or turn off. This may be because the Nest wants it to run for a specified period of time. I assume it must need a cancel command or something to stop the fan.

Any help would be appreciated.

Here is what I need to do if anyone can help me…

If at sunset (trigger) I’m at home (presence)

Then open light

Else

Wait 10 minutes and check again if I’m home… if I am open the light, if not loop.

I think I now how I could to do using 2 pistons, but I can’t figure out how to do it using just one.

Need help with creating a piston. I want to have every light turn on in the house based on a mode (I have this accomplished) whenever its sunset to sunrise, but what I want to have happen afterward is whats boggling my mind. I want every light to turn off after 10 minutes except for the light in the room that’s detecting motion.

Any ideas on how I can get this done?

@ady624 The last update broke something. Im passing a string to a piston which is in a time format (2017-06-16T20:08:58.000+0200). Before this update i could convert it to a time-value and set a variable with the expression: time(string([Motorvärmare:image])), where the image attribute holds the time stamp. This expression now sets my variable to current time instead of the passed time. i dont understand why i needed the string() function but it did not work earlier without it. The datetime() function returns 0.

Am i doing something wrong or is something broken?

Use datetime() - it was broken and returning 0. time() returns just the time portion - it was returning it all and that was wrong too

tried that. Datetime returns 0 for me now after update. time() worked great for me before update, it returned just the time.



worked perfectly, thank you @rontalley

1 Like

To convert a string to datetime, the datetime() function information says it accept common formats. What is a common format? I could try to format it in the DH.

EDIT: Nevermind, found a way to solve it. Formatted it with the timeToday() function in the DH. And voila. datetime() recognised it! Sorry for bothering you.

I was wondering if someone could help me. I have a piston on core which works as a vacation Lighting mode when I’m away from the house between certain times. It works great however I have moved it over to webcore and it seems to run each THEN action after each other ran that simultaneously. Here is the piston, have a missed something out? I should also mention that I’ve tried changing between synchronous and asynchronous but it doesn’t have any effect. Thanks.

Click on each with block and make its execution method Asynchronous.

Thanks! I’ll give it a go.

Wow. You must have lights turning on and off all over the place at pretty regular intervals.

Lol Yeah I’ve still to tweak it a bit, I just want to simulate as if someone is home and moving between rooms as such.

1 Like

So I loaded CoRE recently and so far its been wonderful but I have run into a couple of items I would be interested on getting a bit more clarification on. One particular one is the ability to add a wait option in the piston. Can some one explain to me how to properly use the wait piston functionality? What I mean by this is the scenario I have goes like this:

If user unlocks door
Then:
action 1: Turn on Lights
action 2: wait 5 seconds set SMH to disarm
action 3: stop siren
action 4: set thermostat
action 5: announce entry

I am expecting the behavior of the piston to perform action 1, then perform action 2, and then 3 and so on . So between action 1 and 2 there is a delay and then precedence of the actions. But this is not how things are working. Each action seems to be performed at the same time and the only thing being delayed is the SMH disarm action. How can you setup a piston to operate in the behavior I am expecting? Is it possible? With the current behavior the only way I can think to do something like I am looking for is to create pistons that perform actions and then call the other pistons using a single long action with multiple steps with in that action as I have not found a method for combining location and convenience items into a single action step.