CoRE - Get peer assistance here with setting up Pistons

I tried disabling command optimizations but that didn’t help any. I did add another action that sets the color temperature to 2705 (in addition to already having set the color temperature to 2703). This guarantees that the “color temperature” setting on the bulb will change. What I’ve noticed while looking in the IDE is that the latest color temperature setting and the latest hue/saturation (aka color) settings are stored separately. So after setting the bulb to, say, red the bulb still retains the 2703 color temperature setting. So by setting the color temperature twice in the piston to slightly different values, the bulb will get forced to change the color temperature setting and therefore change to white light instead of a color.

Here’s what the piston looks like now:

I have been able to solve my problem with timers on my Self-Locking Door piston. By adding in a “Cancel all pending Local tasks” in the second section of my piston, it now works great.

Thought I would share the final result.

1 Like

I’m going to chime in and see if I can assist you with your fireplace motion sensor and temperature trigger questions.

The first thing I see you can do is move the most important test, the time test between 4am and 8am to the outermost part of the piston. Under Piston Restrictions, place your time restrictions there. You find this on the first card of the piston if you scroll down. If not there, you may need to enable expert mode in settings.

Second, I can not find a reason you are in need of a flag in your program. If as you have written you wish to turn on the fireplace with time/motion/temperature triggers, I see no need to flag this.

Here is an example of what I came up with:

The IF statement is a composite statement that makes sure we are testing the temperature AND the motion. In your example, you also using in your motion test ‘is active’ where in this case, you want to keep a watch out for the change while we already know our temperature test has been achieved.

Give this a shot.
Cheers.

The goal of the variable to ensure that the piston fires only once per day. It seems to be working correctly for that. I’ve changed the piston restrictions so that time is not part of my if statement. Is there a way to restrict it to once per day without a variable that I am missing? Thanks a lot for the help

Seems like your piston is correct. Seems like you are not getting a reading from your temp. Try raising it instead of lowering it. :slight_smile:

I have a recirculation system on my hot water. I prefer to manually turn it on and off as opposed to a set timed schedule. I have a piston that watches for it to be on > 2 hours then sends a notification. This works - but. I’d prefer this:

if hot water stays on > 2 hours
then send notification
and then repeat the notification every 30 minutes until it is turned off

anyone have a solution?

wait 30 minutes
follow up with piston

You could use variables to start counting the actual hours.

Hmmm, so added tasks:
Wait 30 minutes
Follow up with piston “Hot Water On 2 Hours” after 30 minutes.

Seems like that would wait an hour maybe?

Yep. You can set the delay as low as you like though. I use many naggers like this but I actually just write it out like such:

If
blah blah stays on for blah blah blah
Then
send notification
Blah blah blah
Wait
XXX
send notification
Blah Blah Blah
Wait
XXX
send notification
Blah Blah Blah

Cancel on Piston State Change

This way my messages are creative and gets increasingly annoying. Lights starts flashing. TVs start turning off. Computers start turning off, Wifi gets cut and so on.

Muhahahahaha

So now it is

Follow up with piston “Hot Water On 2 Hours” after 1 second.

That will give me 30 minutes in the “wait” task and one more second to run the piston, right?

Yep, I edited post above. In regards to messages and actions.

I don’t believe there is a direct way to run the piston once per day. You would have to add something as you have.

Noob question.

Can anyone advise, I have my whole house automated using CoRE. I find it very impressive with what it can do.
I was just wondering if it is better to use lots of simple pistons with few conditions and triggers to meet my needs for each room. Or is it better to use a big complicated piston for one entire room.

Just a quick example.

I have a room which has Speakers controlled and lights controlled and presence controlled.

At first I set up 3 pistons for that room to control each item.
Now I’ve set up 1 piston to manage all three items.

Both work fine I’m just not sure if it’s best to use the 1 large complicated piston to manage the whole room or to use all 3 smaller simple pistons to do the same tasks as the 1 large piston.

Any advice on this would be appreciated.

Thanks in advance.

Multiple

I use complicated pistons for complicated scenarios.
Basic Pistons or SmartLighting for simple stuff.

Trying to figure out a Piston for the following: Using contact sensor on door and Motion sensor to turn on a light. in the following situation .
If Contact sensor is active FOLLOWED by Motion Sensor is active Then Turn on LIGHT BUT IF Motion Sensor is active FOLLOWED by Contact Sensor is active then Do Nothing.

I believe I have found a simple answer for you. Use the FOLLOW BY test. In the example below, the first trigger fires off, then ‘followed by’ the second trigger. Yet, if you trigger the second trigger first followed by the first, nothing happens. Hope this helps.

I’m trying to attach CoRe to a button, so some bulbs to dim/brighten them.

Using the adjustLevel function with +20 and -20 - the CoRe logs show it executed fine;

“Executing virtual command adjustLevel (135ms)”

But the bulbs receive multiple levels, so the bulbs were set to 10% here; and I was triggering “Adjust +20”

Press Button
10:17:00 AM: debug Setting level to 0
10:17:01 AM: debug Setting level to 20

Press Button
10:17:49 AM: debug Setting level to 5
10:17:49 AM: debug Setting level to 25

Press Button
10:18:00 AM: debug Setting level to 10
10:18:00 AM: debug Setting level to 30

Press Second Button (-20)
10:18:34 AM: debug Setting level to 40
10:18:34 AM: debug Setting level to 20

Any suggestions on what I might be doing wrong? It does this on virtual devices as well as live ones.

EDIT: Deleted the Piston and rebuilt it from the ground up appears to have resolved this. Still not sure what was causing it though.

Hi everyone, I dont suppose anybody has some thoughts on this? I am still at a loss?
Nick

Thanks. I created​ virtual contacts and used those in SHM instead of the physical ones. When a door opens the vital switch will open 20 sec. later giving a bit of delay for my presence sensor to update which in turns update SHM. If a door stays open so will the virtual switch so that I can see it correctly in SHM. The vital switch will only close 10 sec. after the physical contact closes.

If an intruder quickly opens and closes the door the 20 sec. delay should still trigger since I did not set a cancellation​ policy.

I have installed a HS-WS100+ z-wave switch to control a whole house hot water circulating pump. I want the pump to run during certain hours of the day (when we are home) but not other hours (when the house is empty). I do not have presence sensors to automate that, so for now will use basic times (5:30-8:30 in AM, 4:30-11:30pm), M-F and all day on weekends (maybe excluding nights). I think I can do this fairly easily with just a lighting smartapp, but here’s the catch: I also want the switch to be turned on for 5 minutes, then off for 15 minutes and repeat that 20-min cycle during the active time.

I have read some of the documentation on CoRE, but haven’t used it. Would CoRE be a good way to accomplish what I am trying to do here? If so, some basic starter info (like which piston type, etc) would be helpful.

Thanks in advance!