[RELEASE CANDIDATE] CoRE (Community's own Rule Engine)


Hi @ady624

I think I’ve stumbled upon a bug, maybe after a recent update but I cannot be 100% sure, (since githib integration came to the UK I update more frequently). I have this piston:

(copied from a great example that you gave to me)

It was working just perfectly. Recently it comes on just fine, but then the countdown keeps resetting every time my hue lights refresh their state. The counter gets to 4.40 (sometimes more, sometimes less), then jumps back to 5.00. All the time the Piston does not change state, the only thing that happens is the hue lights refresh.

I use the custom DTH from @infofiend, but I’ve not made any changes there. ([UPDATED 4/19/17] Hue B Smart (Smart and FAST Hue Lighting))

Any help would be much appreciated as this is really messing with everything! I tried recreating the Piston from scratch, I’ve restarted the hub, I don’t know what else to try…

Best regards,

In the ‘THEN’ enable ‘Only execute on condition state change’. This is what I do and it stops the counter resetting.

As an aside. You stated that we have Github integration in the UK. When did that happen?

1 Like

Thanks so much @bobbles Where do you mean? I the TCP options or somewhere else?

Do you mean on ‘Piston state change’?

I enabled it month or so ago, I’ll find the link…

Yes. The very top option in your screenshot. Slide the button across.
Are you in UK on a V1 or V2 hub?

Thanks, will try it now. Am in the UK, v2.

Here is the link I used to kick Github off again:

Thats great.
I raised the lack of github integration with ST support 6 months ago.
They replied that is was never going to be provided on the UK server.
Oh well. I will give it a try.
Thanks for the info.

You’re welcome. Thank YOU for the info in fact. This totally solved my problem, and I leave my TCP in place to allow it to flip/flop. I wonder why this suddenly became a problem though…

It’s strange the contradictory answers people have received re: UK Github integrated. There is no clean way to get in to activate it, apart from that I just supplied. Odd. Also the OP mentioned that it was ST support who had provided it!

Many thanks once again, you rescued me from a (finally) almost accepting family.

Possible bug found.
I have installed the latest version - v0.3.163.20161102 (which in the smartapp reports as v0.3.162.20161028) but the bug I have found is based on not being able to choose PM for a Custom time on a simple piston:
-new piston
-condition 1 - nest thermostat heating set point less than or equal to 22°C

  • condition 2 - and time between 5:30pm and 10:30pm

The problem is, when you choose pm on the iOS time slider, it always saves as am. Regardless of what device invokes the piston and time type:

Try to change to am and back to pm? Unfortunately, that is an UI problem, not sure how CoRE can create/fix it

I tried that ady. And leaving it on pm and clicking done but the screen back up shows am again. It occurs every time I setup Time on basic as an IF

Hi all

One issue I have regularly come across was after defining a new CoRE Piston.
I am currently using CoRE via GitHub and on iOS client v2.2.1 (1336). UK based as well

The Piston appears and is associated with the devices it uses for condition/trigger.
It can be seem on the appropriate SmartApps tab for the device.
But everytime I go back to CoRE, via Marketplace->My Apps->CoRE, then the last CoRE Piston is showed to me, and not the screen to access the CoRE Dashboard or any of the defined Pistons.

Does anyone have any ideas why?

You need to access CoRE from the Automations tab, not the Marketplace.

Thank you for this obvious point :wink:

1 Like

I’m having a heck of a time adding pistons. it seems every time i try and add a piston and i complete it and click done it takes me back to my marketplace screen but when i click on CoRE again it takes me back into the piston i was just creating and not to the main menu so i can’t add anymore. sometimes if i delete it and log out and back in i can get back to the main screen

See ady624s post above.
Make sure you access via the Automations tab.

Hi all again

I have an automation challenge I think CoRE can help me with but I am a beginner (see above as example).
The Use Case I want to implement is as follows -

We have a 3 story house & I want to activate the lights on the top floor (3rd), our master bedroom, when
the Motion Sensor, at the bottom of the stairs up to the 3rd floor activates
the switch connected to a pressure pad & installed on the bottom stair of the staircase up to the 3rd floor is closed
AND (within a timeframe)
the switch connected to a pressure pad & installed on the top stair of the staircase up to the 3rd floor is closed.

This sequence of events means someone is going up to the 3rd floor

Any ideas?

Hi, ran into a problem that appears to have come up once or twice in the past, but not much info came out of it and the solution (from Beta Milestone 1:link to post) doesn’t seem to do anything.

Basically, I’ve got a piston that (I can’t for the life of me remember what I was doing when it basically crashed the app - Android BTW) won’t let me edit or remove it. I get: “You are not authorized to perform the requested operation” in a red box when I open it in the app, and in the log I see:

    groovy.lang.MissingMethodException: No signature of method: java.lang.String.abs() is applicable for argument types: () values: []
Possible solutions: any(), is(java.lang.Object), any(groovy.lang.Closure), wait(), wait(long), use([Ljava.lang.Object;) @ line 9541

When I try to load it up in the IDE and open the simulator as suggested in that link, none of the pistons show up for a given location. I used to be able to actually see it in the dashboard in the app, but now it just sits their with the spinning loading gear. I can pause it and un-pause it from the dash, but thats about it. I can also see it if I go to the ‘Installed Smart Apps’ section under ‘My Locations’ and get a dump of whats in it - though the device it references still exists and is in use by other stuff. The only option I have though is the ‘child app discovery’ box (which is cheked). I can copy/paste it somewhere or screenshot it - just didn’t want to clutter this thread.

@ady624 or @davew44, any ideas? (I linked you Dave since you had this happen before)

Can you please look into CoRE source code’s and copy&paste a few of the lines around the error line? I am not at the home and can’t look it up right now, sorry

Sure - looks like its in the middle of an ‘if’ statement:

if (comparison.contains("around")) {
    def range = i == 1 ? condition.o1 : condition.o2
    val += " ± $range minute${range > 1 ? "s" : ""}"
    } else {
    if ((!preciseTime) && (!recurring)) {
        def offset = i == 1 ? condition.o1 : condition.o2
	if (offset == null) {
	    offset = 0
	def after = offset >= 0
	offset = offset.abs()
	if (offset != 0) {
	    result = result.replace("happens at", "happens")
	    val = "${offset} minute${offset > 1 ? "s" : ""} ${after ? "after" : "before"} $val"

I pulled some tabs out of the paste so it’d be a bit easier to read :stuck_out_tongue: