CoRE and Piston Rules Engine, first design steps

Just the state

1 Like

Adding the “But If” may have solved my some of my issues. Thanks for the help.

1 Like

Have you tried with a Simple piston and no BUT IF? A latching piston without a BUT IF would always stay true, thus never canceling any scheduled tasks because there is no piston state change. Ever.

Are you saying I’ve over complicated again!!! I need to back away for a few weeks and come back at my entire setup with a fresh mind maybe…

1 Like

Has anyone got these files working in a CoRE Piston?
I have tried to add in the URI (play and play track) but cannot get the audio out …
Piston is set up correctly - as when i try play text and add some test text in " it spits out the text as audio perfectly.

I used a lot of the sonos notify sounds files previously and am trying to transition over to CoRE.

Please tell me I’m missing something simple here. It’s 10:50pm but the condition that says time between 7:15am and sunset is showing true while the condition that says time between sunset and 7:15am shows false. The morning actions ran at sunset instead of the evening actions. Is Between set up as start <= X <= end, so I’m getting the exact moment of sunset and the exact moment of 7:15am making both conditions true at the same time?

Did you negate the condition (and that’s not showing in the dashboard)?

No, I checked to be sure and neither time condition is negated. I think there was a brief moment where both time conditions were true. I adjusted the time so there’s no overlap.

I was also thinking… In an Else If piston, is the secondary if block only evaluated when the primary is false? If so, I could change this from latching to else if and then just remove the time condition from the secondary if block.

Else if is only evaluated after primary evaluated as false, won’t subscribe to any events on its own. Short answer: yes. :smiley:

1 Like

Another question for you. Does “time is after” evaluate as current time > selected time, or current time >= selected time? Wondering if I would have the overlap issue on this one as well since primary if block uses time between sunrise and sunset, and secondary if block uses time after sunset.

The general rule I used is that the thresholds are at second 00 because that’s when the event is expected to happen. So the beginning of any interval is inclusive of that minute, while the end is exclusive.

Time is between 7:31am and 8:47pm means from 7:31:00 am through 8:46:59 pm inclusive. 8:47:00pm would be outside the range.

Time is between 11pm and 5:12am means from 11:00:00pm to 5:11:59am next morning

Time is after is the exact equivalent of time is between threshold and midnight. Same rules as above, time is after 6:17pm means 6:17:00pm through 11:59:59pm inclusive.

Similarly, time is before 7:42pm means between 12:00:00am and 7:41:59pm inclusive.

Note that midnight has a special meaning. When used at the beginning of the range, it means >= 12:00:00am but when used at the end of the range it means <= 11:59:59pm

Time is between midnight and 5am means 12:00:00am through 4:59:59am inclusive
Time is between 5am and midnight means 5:00:00am through 11:59:59pm inclusive.

Another way you can look at it is the first parameter in a range uses >= whereas the second/last parameter in a range uses <

Hope I didn’t confuse you more :wink:

5 Likes

Well SmartRules is starting to fail.

Is CoRE is still supported?
How often do you have to remake all your rules with updates to CoRE?

1 Like

Very actively supported, I’ve never had to rebuild, been on-board since the first month.

1 Like

How is SmartRules starting to fail?

Anything time related stopped working after the most recent hub update.
Deleting and remaking rules solved it though.
I also have SmartRules fail often.

I need some “help/info” with this >

The problem is some times (and this happen with another pistons) the speak message doens´t start or if starts doens’t finish.

Can someone please tell me why this happen? Is some thing to do with the CoRE or is ST problem.

Thanks.

What kind is speaker are you using?

My speakers are Wi-Fi and cut of the beginning of the message so I just add … At the beginning of the text.

Im using Sonos (Wi-Fi), and yes some times, it cuts the beginning of the message (and another times doens’t say anything).

The changes you made are

“I have turn off the lights” > " …I have turn off the ligths" ?

Yes, I either foo it that way out I add in words.

I’ve done this…

“Excuse me Jason, I have turned off the lights”

And excuse me Jason gets cut off.

Just experiment with it till it works right

lol
ok…but why this happens?

The problem is that some times, it says every thing and another it doens´t.

Because of ST, the wi-fi connection?