CoRE - Get peer assistance here with setting up Pistons

You mixed triggers and conditions which means conditions do not subscribe to events. Only the lines with an orange bolt to their left make the piston run. I would make the illuminance condition into a trigger : raises above 300 lux. But you need to figure out what events can turn the lights off. Time? Illuminance? Anything else?

There is no trigger for the morning turn off, notice the orange bolt in line 27, that indicates the piston subscribing to that time event.

Try adjusting the illuminance condition to a trigger ā€œchanges toā€.

Edit: oops what he said

I see it now, had to scroll down, and that bring another question,
If illuminance Roses above 300 at 7:00 am, does it trigger when the Time reaches 8:05 as I have it set?
The situation happens if we lose power for split second, some of my switches comes on and I want a piston to turn them off during the day if illuminance is more than 300.

Hi all, Iā€™m wanting a piston that alerts me every 30 minutes that my garage door is open. I made this piston several months ago and I swear it worked correctly but I recently learned how to use variables so now in my push notification I can actually update how long the door has been open. However, I only get a notification the first 30 minutes that the door has been open. Is this the correct format for what Iā€™m trying to do?

Thanks in advance!

Any idea why this piston isnt triggering the color changes.

No, that piston will only trigger once. There may be a way to have a loop run while the door is open and alert after 30 minutes, wait and do it againā€¦ The door changing to closed will stop the loop.

Has anyone successfully setup reminders for when Guest Mode is running? Iā€™d like to receive a reminder every 6 hours after Guest Mode is activated.

I donā€™t seem to have that functionality from a condition when selecting Routine or Modeā€¦

Does this work

instead of this

You could have it check on a schedule, i.e.

daily at 8AM, 2PM, 8PM 
If GUEST is true then 
    Send SMS
Endif

If you want to do this in webCoRE, itā€™s easier. This will cancel itself when mode changes away from Guest.

If $locationMode = Guest
  Send notification or SMS
  Wait 6 hours
  Execute piston name_of_this_piston
End if

Anyone know if itā€™s possible to core and the core IFTTT function to use Google assistant to change modes ? Home , movie time ect

Can you help me pls to realice a logic in core.
i need a piston to turn a switch on every 4 days.
i have found:
ā€œtrigger happens at 4 am every 4 daysā€ but this didnt work

thanks :slight_smile:

I am having an issue with a CoRE piston and wondering how to fix this. I have 3 motion sensors along a long hallway. I have a rule that says if any of the 3 sensors see motion then turn the lights on. That works just fine.

The issue is with another piston that says ā€œif Any of the motion sensors stay inactive for 5 minutesā€ then turn off the hall lights. The issue is that if you are at one end of the hall and moving around the lights will still turn off on you, since the other motions have not see movement even tho the one motion sensor does see movement within past 5 minutes.

This creates an issue fairly often, where someone is in the hallway by motion 1, and motion 3 has not seen you for 5 minutes and turns the lights off on someone who is then in the dark.

So what is really needed I suppose is a rule like ā€œIf ALL of the motion sensors stay inactive for 5 minutesā€. However I did not know how to do this with an ā€œallā€, only an ā€œanyā€. Am I missing something obvious here? What do you guys recommend for a solution? Thanks!

Thanks for the help! Iā€™ve got it working most of the time, but periodically seeing the Spot Lights turning off and the under cabinet remaining on. Canā€™t quite figure out why, wondered if it was the TCP setting although still trying to understand its usage.

Instead of a Screen Shot, Use the image button to take a Screen Shot of the entire Piston, then hold the image and press save. This will add it to your pictures. This way we can see past just whats on your screen.

TCP-Cancel on Piston State Change is used in this case because you have a timer. Without the TC Policy, as soon as the motion is inactive, the Piston will Wait 60 seconds and then turn off the lights whether or not there is motion again. In other words, without the Cancel on Piston State Change, the timer has no way of restarting. With it on, as soon as motion starts again, the Wait period will cancel and restart once motion is Inactive again.

Weird, that one light will stay onā€¦Take a SS as described above so I can see if there is something else going on that is causing a conflict.

You could also consider grouping the lights and only have 1 switch to deal with to control them all. This can be done via a Virtual Switch and a CoRE Piston. There is also a cool app called Trend Setter. It will group the lights and create the Virtual Switch for you! It will also turn the switch on/off even if only one light is on/off. I can control dim levels as well. Check it Out!

Try

If
All motion is inactive
Then
Wait 5 Minutes
Turn off
Cancel on Piston State Change

Since Stays is a trigger, you canā€™t use it for multiple motions as it will not work.

This should work. Post the piston so we can see where the error is.

Thanks for the colour, Iā€™ll definitely checkout Trend Setter.

Attached is a more useful screenshot, thanks for the tip! Iā€™m a little confused how the two timers on the different conditions from the prior screenshot were active simultaneouslyā€¦

The $locationMode will not subscribe to location mode events, so the notification will be sent at random times after location mode changed (it runs every 6 hours, so whenever that 6 hours elapse, it checks). Use the virtual device Location Mode to get your loop synchronized with location mode. And use a whileā€¦

while
   Location Mode is Guest
do
   send notification
   wait 6 hours;
end while;
1 Like

The only 2 potential issue here I see are:

  1. ā€œStaysā€ is a trigger. Triggers have precedence over conditions. Shouldnā€™t matter much in your piston but lets get rid of the trigger in the 2nd Or.
  2. You donā€™t need the Turn On And Set Levelā€¦You just need to say Set Level to 100% which automatically turns the lights on.

If
Kitchen Motion Sensor IS Active
When True
Using Kitchen Spot 1 and Kitchen Spot 2
Wait 1 Minute
Set Level to 100%
Cancel on Piston State Change

The Wait timer will count all the way downā€¦but once it gets to then end, it will evaluate whether or not the Piston State has Changed. If so then it cancels the action. If not then it executes the action. Thatā€™s why you saw 2 timers in the SS above.

Pssstā€¦We are migrating over to webCoREā€¦