CoRE - Get peer assistance here with setting up Pistons

Will add $sunset ans $sunrise

1 Like

Since they are different pistons they do not overlap each other unless you use Global TOS which does not work yet.

Am i right in thinking though you cant have a trigger with all the conditions, was going to add

OR

(Presence changes to present

AND

Time is sunset-75 and 120mins after midnight)

-----> when true
Hall Light on
wait 10
Hall Light off

quickly tried last night and when i activated motion nothing happened, then seemed to remember similar issue i had with a trigger being mixed with conditions. Its no big deal to have 2 pistons, but i have an urge(correct or not) to have as few pistons as possible!!

If you have a trigger, then only events relates to your trigger will evaluate your piston, so you are right when you said you cannot combine them because of the trigger

1 Like

But you could turn all the motion conditions in each OR to triggers? That means only presence and motion will initiate your actions. Way it is right now, time can also initiate an action, if the other conditions are true at the right time (when the time interval starts). Is this intended?

To make it clearer:

Me changes to present and Time is between X and Y
Results in:
Action only executed when I arrive, IF between X and Y

Me is present and Time is between X and Y
Results in:
Action executes either when I arrive between X and Y, OR at X, if I am already home.

Get the subtle difference?

3 Likes

Yes want the times to be part of the piston as dont need light to come on all the time

Need some help with the following:

If: Mode Changes from Night to Home, before noon,
Then: Any time before noon if kitchen, living, office or foyer motion is active, use speech synthesis.

Now, I’ve got everything down except for the any time before noon. I might not be seeing something since I’ve setup far more complicated pistons with no problem. My head can’t seem to wrap around this idea however (running on a lot of caffeine might be why :laughing:)

Also any way I can use current day’s weather in core, well specifically when using speech synthesis. All suggestions are welcome.

You could try restricting that part if the piston to a certain time frame.

thanks, what you said just made me remember the then-if piston which does the job
 Thirty mins of over complicating a piston to only realize I forgot the then-if piston :neutral_face:

BTW any ideas on bringing in weather info to core?

edit - solved

I’m trying to set up a simple timer to turn off the toilet exhaust fan 15 minutes after the toilet light is switched off (set to 15 seconds right now for testing). It’s set up as a Basic piston, if toilet light switch changes to off, then I want to wait 15 minutes and then turn Toilet Fan switch off. In the Action section, I turned on the Using location
 option and set up the Wait interval. The part I’m missing is under the “And then” section
I don’t have an option to turn a switch off. I tried a workaround of setting up another piston to just turn off the fan, but it’s always false since I don’t have anything under If, so it doesn’t run. What am I doing wrong?

@destructure00

This is the piston I use for one of my bathroom fans.
It fires based on the door and motion.

When the door is closed and mutton remains active for two minutes, the fan comes on. This is when a person goes in and has a seat.

If a person goes in, close the door, washed their hands our just stand there a bit, then leaves, the fan does NOT come on.

If a person opens the door, leaves it open and just washes their hands, it does NOT come on.

The fan goes off five minutes after motion stops.

This works very well and I’ve not had any problems.

Mutton? You have sheep in the house?! :laughing:

2 Likes

Ahhhh I got it, I was putting the Wait in the wrong section, under location instead of under the switch. Durrrrr.

btw, how would I go about saving the last execution date of a piston and comparing against the value to make sure the piston only runs again the next day?

Why does the following always change the variable by 2 instead of 1 when I open the sensor? Help!

I think you should set the range to 0-3. The piston resets at zero, but with the first open it is feed+1 plus the open +1.

So after the first open it is feed = 2. It basically starts at 1. Just kind of fluke since it is sound itself to itself.

But I still don’t understand why it’s consistently +2. On each open, it goes to 2, 4, 6, 8, 10
etc
 If there is only a single +1 rule, why does the update always add 2?

Thanks

edit - I’m on v0.1.09e.20160617 It has always been doing this.

I think I found it. Not sure why the live log shows it open twice. I tested by opening and leaving it open. Strange.

edit - in the log, that was the only time it showed the dual event from: Dog Food, value:open. In every other test, it only showed that message once. I also updated SHM to remove the sensor, it had “all sensors” so I undid that. It is now what you would expect. Just one open, but it still counts twice.

Thanks

Ummmmmm
 ? Sorry, I’m clueless on that one