CoRE - Get peer assistance here with setting up Pistons

Try a latching piston type.

Thanks. I’m still getting my head around how the different kinds of pistons work.

1 Like

I’ve been doing good for a while but I am finally stuck again.

I am looking to make a piston that follows the following rules:

-If bed switch IS on, and time is Between Sunset and 8:00, and Motion CHANGES to active
*Turn on a light
-When motion CHANGES to inactive
*Turn off a light

-but If bed switch IS off, and time is Between Sunset and 8:00, and Motion CHANGES to active
*Turn on a group of lights
-When motion CHANGES to inactive

  • Turn off a group of lights

I can get the first part to work great but I am having issues with the but if part :frowning:

I could split it into two pistons, but I really want it to work with one

Hi Adrian - I’m checking in to see if you have expanded the options so that Was can go past 60 minutes. In my case I’m looking for 240 minutes.

On a related note, I’m confused why Was is currently limited to 60 minutes, whereas Did Not Change goes to 360 minutes…?

BTW as a temporary work around for now having Was go past 60 minutes, I tried a rule that said if the door sensor is open and it did not change in past 240 minutes (meaning that it hadn’t been open, since the door is usually shut) then… However this doesn’t work. Anyway no need to focus on that because it is much cleaner to do Was with 240 minutes, Thanks!

@HDGuy - should be addressed in v0.3.168.20161220 - RC - Fixed a bug with loading attributes coolingSetpoint and heatingSetpoint from variables, thank you @bridaus for pointing it out, also extended conditional time options to 360 minutes

@Kevin_Neberman sorry for the delay, try with v0.3.168.20161220 - RC - Fixed a bug with loading attributes coolingSetpoint and heatingSetpoint from variables, thank you @bridaus for pointing it out, also extended conditional time options to 360 minutes

I am trying to use another device in between the capture and the restore. Putting all the actions in the same block will not allow for this. I will try playing with the task cancellation policy settings. Thanks for the response. I will try that also to make sure it’s working.

I am trying to send a notification and my location is grayed out. Does anyone know why I can’t select it?

I’m at a complete loss (3 days working on this piston) and hoping @ady624 or some other intelligent person can help me.
I’m trying to get notifications for a washing machine AND a bread maker on a single Fibaro smart plug.
Luckily the bread maker part is easy as it takes 4 hours, but it’s the washing machine that’s tricky (although it finishes at 3W for 2 minutes), but none of the laundry apps work because the bread maker drops to 1W multiple times.
I have a latching piston.

IF
Smart plug is greater than 200W
THEN
Using Smart plug
Wait 4 hours
Using Smart plug
Send push notification “Bread is ready”.
BUT IF
Smart plug is greater than 200W
FOLLOWED BY
Smart plug stays equal to 3W for 2 minutes
THEN
Using Smart plug
Send Push notification “Washing is ready”.

What am I doing wrong?

Just downloaded CoRE and am trying to set up 1st pistons…

Would love to know how to set up an, Armed/away once all cell presence have left home, to set off siren and turn on light switch. Also, Disarm/home when any of the cell presence return home…

Thx

This is my washer monitor, maybe this will give you an idea.

@eibyer thanks very much for the reply but your piston " stays greater than 8W for 5 minutes" would also trigger the bread maker, therein lies my problem.
I’m trying to get
IF power greater than 8W
After 4 hours send notification "Bread"
BUT IF
Power is better than 8W
And Then (there isn’t an And Then, so Followed By"
Stays equal to 3W for 2 minutes
Then send notification “Laundry”.

So as the bread maker never sits at 3W I would get a laundry notification, and cancel the bread maker notification, and vice versa, at least in my mind that would happen, but it doesn’t!
If this is possible with CoRe, could someone kindly build it for me, and send me a screenshot please?
Thanks in advance.

So I played with the task cancellation and it turns out that I needed to set the capture and restore to “none”, then it worked perfectly. I guess this is because I’m asking the same devices to do 2 different things at the same time.

Understand about the extra device, but captures and restores need to be together to function properly. However, depending on what you want that extra device to do, you can add it in a separate action block - remembering that those actions start simultaneously so you can add waits, etc. to adjust timing to be what you want.

In my example below, The ‘Stop Dupe…’ section and 'Using Chandelier…" section both start at the same time. But the capture and restore are in the same section, so they work properly.

Let me know how yours works out.

Yes, that makes complete sense. I don’t know why I was so focused on putting the capture/restore in different action blocks, smh. I kept thinking about it like lines of code. Thanks so much. So it is working with the action cancellation st to none, but I prefer to leave it as the default local. I will set it up how you have it in your piston.

I setup a core piston to do the following after I say “Alexa turn on bedtime” (bedtime is virtual switch):
-turn off downstatirs lights and bedtime switch
-run ‘good night’ routine, basically put SHM in Armed Home
-if any door is open, flash a light 3 times (I have no hue or sonos to notify)

So it all seems to be working except for one light will not turn off via this piston :confused:. It will turn off via “alexa turn off cabinet lights”. It is a GE Outdoor Light Module 12718 I tried removing the switches in the piston and re-adding them, same result. Other ideas?

Update: I found that if I add a separate action, a delayed turnoff for the cabinet light, it works. Adding an additional plain turnoff action did not work however.

Wait, you’re using one measuring device for both?

Is there a group of examples somewhere I can refer to? I am attempting to rewrite several of my Rule Machine automations into CoRE and having trouble finding the right way to do so. I believe this is mostly just trying to learn where things are located in CoRE. Three examples:

  1. 5 Min after Switch A is turned off, turn off Switch B. (Bathroom fan)
  2. When motion is detected turn on a light, after 2 min of no motion turn off the light. (Closet and Bathroom light)
  3. If Switch C is on, every 30 seconds increase Dimmer level by 5

Possibly add a few basic step by step examples to the Wiki? (http://thingsthataresmart.wiki/index.php?title=CoRE)

Thanks!

Great! Good luck.

BTW, seeing the logic in the Piston that I posted to you reminded me that I’ve been planning to remove the virtual switch I was using as a flag to prevent duplicate starts (which would ruin the captured data), and replace it with a variable for a long time. So, I just did it. :wink:

This may help you.

1 Like