CoRE - Get peer assistance here with setting up Pistons

It’s probably the same thing that’s affecting fade to level?

This piston is supposed to lock my kitchen door leading to my garage if the kitchen door lock is not locked and if no one is in the garage (motion sensor) or someone just got out to the garage and left the door open.
This should happen only between 23:00 to 6:00.

For some reason, this piston is not locking the door. Any ideas what did I do wrong. Thoughts for better implementation etc. Thanks.

I would suggest changing Garage Motion Sensor stays inactive for 5 minutes, then just remove the Wait 5 minutes from your tasks.

Also, have you tried webCoRE, it’s easier to help because we can import your piston and share it back after it’s modified.

I had it set like that before, however, I would like to have a 5 min period in case any of the conditions changes (cancel on condition change). That way, if the door was just closed or the lock was just unlocked or the motion sensor just went inactive, the piston will wait 5 min and then lock the door.

I do have all my pistons in WebCoRE as well, however, I like the way that CoRE shows you each condition state with color (red=false blue=true) where WebCoRE aggregates the whole “if” as one condition.
Here is my WebCoRE piston. Thanks.

Got it. Hmm, it’s been a while since I played with CoRE and I’m not sure if this is still true. I don’t see any trigger in your piston, only conditions, there’s nothing to kickstart the piston with when the conditions are met.

If you change the motion to Garage Sensor changes to inactive, the 5 minute timer begins which may be canceled by closing the door or lock being locked.

Hi guys, trying to set up a piston for the pump that control’s my pools solar heater and I am having some trouble. I just want a simple piston to turn on a pump between 9am-6pm if the outside temp is greater than 80. Then turn the pump off at 6:30pm. This is what I set up…

If - Time is between 9am and 6pm AND Bloomsky temp is greater then 80F
Then - Using Pool Outlet Plug - Turn on, Send SMS message, Wait for custom time (6:30PM Mon-Sun), Turn off, Send SMS.

For some reason, it keeps sending the SMS message over and over. If I look at the recently tab within the app for the pump, it is not getting multiple on commands. It’s just the SMS that’s repeating. This happens for both the on and off messages. Any ideas? Is there another way that I should have set up the piston?

Quick question… its been ages since I first installed CoRE (v0.1…) , and now I’m looking to update to the latest version.

Once I do that, will I need to re-recreate (ugh) or rebuild all my existing pistons? I’d like to think not, but wanted to confirm before taking the plunge.

When you change over to WebCore, you’ll need to rewrite your Pistons. I’m in the process of doing that now. WebCore is great and worth the effort.

Sorry if I was unclear - my question was about updating from an older CoRE to the latest CoRE.

I just learned of WebCore, but not clear I want to move to yet another tool (yet). I gather the main advantage is web interface for piston design, are there other functional advantages?

The ability to copy, paste, and move bits of pistons around. Backup of pistons. The ability to import someone else’s pistons instead of having to make your own. There’s definitely plenty of advantages.

CoRE will die at some point. It hit a ceiling to where it couldn’t be developed anymore, I believe. There was no more room for code. webCoRE works outside of that limit.

As far as updating CoRE. Most updates didn’t require a rebuild of pistons… it’s been a bit since I used it and always kept it updated, so I can’t recall if there was some point at which we had to rebuild pistons. I don’t think I ever had to do that though.

Updating CoRE to the most recent version will not require rewriting your pistons.

At some point, probably sooner than later, you should move to WecCoRE. The advantages are many. Sharing, backing up and recovering Pistons; entering and maintaining Pistons on a PC, power and capabilities that are not available on CoRE due to size limitations are some of the advantages I’m aware of.

Just make the move the web core. You won’t be disappointed. A lot of work up front, but worth it.

Hi all, I’m trying to find a way to turn lights on to certain states spending on how they are triggered. I currently trigger my lights 4 different ways, on the app, by switch/button, motion sensor, and through Alexa. Having the trigger be motion or button press is easy enough, IF motion THEN DO… Simple. My problem is when I trigger the lights through the app or with Alexa.

I mostly want to turn the lights on to a certain color depending on the time of day if turned on via switch or voice and turned on to a low night-vision friendly light if triggered by motion and and on the app.

Any ideas what I can do? Thank you in advance.

Hello everyone,

I am trying to set up an alarm entry delay for SHM using CoRE, since SHM doesn’t have one built in. Basically I want to have a siren go off when my back door contact sensor is tripped, but not until 30sec have passed, allowing me time to disarm the system. If disarmed within that period, SHM would not be triggered.

To do this I have set up a virtual contact sensor that “opens” 30sec after the physical one, and the virtual one is what SHM intrusion alarm is triggered by.

My question is, how can I have that delayed open of the virtual contact sensor cancelled if SHM is disarmed within the 30sec?

This is the basic structure I have so far:

IF

-Smart Home Monitor is Armed/Away
AND
-Aeon Labs Door Sensor contact changes to open

THEN

Using Simulated Contact Sensor
-Wait 30 seconds
-Open

So I guess my question is how do I implement the task cancellation only if SHM is disarmed? I know there is the TCP cancel on piston or condition state change option, but does that apply to the whole IF statement block? So both the door sensor and the SHM status? Because I wouldn’t want it to get cancelled if the door closes but SHM is not disarmed.

Thanks in advance for any help in understanding this!

Try using a follow-up piston…

IF home is armed AND contact sensors changes to open

WAIT 30 seconds

DO follow-up piston

Then in your follow-up…

IF home is armed

THEN sound the alarm.

What this will do is allow your first piston to trigger the second, the second then checks if it’s still true and if it is, it’ll run. If you set the second piston as a follow-up, it will not act unless triggered by the first.

Just add the rules in the actually virtual contact sensor and leave SMH the way it is.

Latching Piston in CoRE.

If
Aeon Labs Door Sensor contact changes to open
Then
Using Simulated Contact Sensor
Wait 30 seconds
Open

But-If
Aeon Labs Door Sensor contact changes to close
Then
Using Simulated Contact Sensor
Close

Delay on open, Instant close. SMH will not get the Open if the Door Sensor is closed within 30 seconds.

webCoRE does not have Latching Pistons per se, but you can just use the 2 If scenarios and they will work just the same.

My pistons stopped working. When I go into my apps and select core I get an error we can’t load the screen right now. Then I noticed I can’t load the core apps when I am in the devices as well. Anyone else having this issue?

Why is not this working? I define a time variable (departure_time) and have it set by passing a value from a device attribute:

I then want to use the departure_time in a notification but it shows the date aswell, even though i stripped it in both the definition of the variable, the setting of the variable and in the notification expression, tried not stripping it aswell:

And the notification:

I cant compare the time variable (departure_time) against current time either in a satisfying way since the date is hidden it aswell it seems. i have to reset the variable every day to get the day correct.

The time datatype is a long number that contains the time part of a datetime - it’s really a datetime, but with the date forced to today (at the time you set it). Groovy handles the conversion to string, I’ll have to create some functions to format it or figure out a way to convert that to a string in a different way…

Okey! It would be great not only for getting the string, but comparing pure times aswell. I would like to be able to compare a certain time, without date (e.g 06:50:00) against the current time, e.g "If ‘current time’ is between 2 hours to departure_time and departure_time: Do this and that. Or is it a way to do that without reseting the variable every day? I can live without formatting it to a string.