CoRE and Piston Rules Engine, first design steps

When I need a manual mode changed, I just have Alexa do it.

1 Like

With Alexa I use virtual switches to activate different modes… “Alexa turn on Cinema/Morning/Day/Night/Sleep” and all the magic is handled by CoRE. And that’s how I was able to eliminate Routines altogether. I suppose Rule Machine provided that same capability but I never used RM as extensively as I have with CoRE!

1 Like

Made progress with Routine “executed” trigger, just need to test it. That concludes “Routines” support. Also made progress with the “Variable” condition/trigger - this will allow full potential of variables be exposed.

Will also add Piston “executed” trigger, thinking of options here.
Will add the Follow-Up piston mode and the Execute piston action as well as the Evaluate piston action.

Then I need to work on the capture/restore of attributes and I am (almost) ready for beta.

Third-axis is still missing, What else to beta?

Here’s a distance function for the xyz map…, using it for my garage door SA.

def getDistance(coord1,coord2){
    if (coord1 && coord2){
    	def dX = coord1.x - coord2.x
    	def dY = coord1.y - coord2.y
    	def dZ = coord1.z - coord2.z
    	def s = Math.pow(dX,2) + Math.pow(dY,2) + Math.pow(dZ,2)
    	def dist = Math.pow(s,0.5)
	return dist.toInteger()
    } else return null 

Actually with the new askAlexa app and integration there are no virtual switches.

I just say, Alexa, ask home to set the mode to night." She responds, “I am setting the smartthings mode to night”

Also, I can do this…

“Alexa, ask home to run the sleep routine”.
She responds, “I am running the smartthings sleep routine”

1 Like

Hmmmm I’m not sure how to do that, but here’s the link to where I found the device handler: CentraLite Keypads

1 Like

Capture and restore… Not sure if that’s available yet.

Here’s how I use it…

Living Room lights are on at one color and 60% level. I only turn on the overhead light when I want it really bright.
So, in RM when the overhead light comes on a rule captures the current state of the lamps, then changes then to daylight color and sets the level to 100%.
When I’m done and turn off the overhead light the lamps are then restored to what they were before.


Oooo and just had another revalation with the if then stuff I can get away with one piston to monitor all of my kodi instances ooooooo

1 Like

Are you using the custom attribute armMode?

Anyone tested multibuttons?

I’m definitely interested in Ask Alexa. However, I really prefer brevity when I speak to Alexa. It also keeps the WAF intact! :grinning:

With my virtual switches I can simply say: “Alexa, turn on Day” or “Alexa, turn on Cinema”. I don’t have to do any “Alexa, ask (name of Echo Skill) to run…”


I’m jumping in to CoRE when we hit Beta, I’ve been in IT long enough to know that this is now considered production :scream: and there is a backup/restore function (or is that possible?)

1 Like

I guess I’m too much of a noob to try to add it. I tried to add it to the database but I couldn’t get it to show up as a device I could select for “if”. When I get home from work I’ll post the code changes I made if that will help

1 Like

You don’t need to modify code. It should show there, provided u selected the keypad and enabled Expert Mode… Use a capability used by the keypad and you should be able to select the keypad…

Very true and I was concerned about that as well. But it grew on my pretty quickly.

I do like the feedback.

I have one where I say, Alexa, ask home to report the last time the dog was fed. And she tells me. The sane with the litterbox cleaning.

I had to eliminate all of my virtual switches about a month ago due to reaching the 100 device type limit. I have almost 100 physical devices that have the switch attribute.

And I kind of like not using them… Even though the limit is 300 now.

1 Like


Those are some pretty interesting use cases! Lol on the litter box one – we could definitely use something like that! I will definitely look into Ask Alexa at some point, but right now I’m full tilt in CoRe land! :slight_smile:

1 Like

Yeah, I have two 16 y/o boys that think they’re to smart for me… So, I just keep proving then wrong…

The conversation goes something like this…

Me - did you clean the litterbox today?
Dumbs - yeah dad, of course I did.
Me - Alexa, ask home to report the last time the litterbox was cleaned.
Alexa - the last time the litterbox was cleaned was yesterday at 4:20 pm.
Me - you’re grounded dumba


Hey Mike is your new garage opener out and I missed the announcement?

[quote=“ady624, post:1618, topic:46546, full:true”]
Anyone tested multibuttons?
[/quote]Not sure if you mean what I think you mean, but… I have tested my minimote push and hold buttons with success.

1 Like

[quote=“ady624, post:1611, topic:46546”]
What else to beta?[/quote]getAttribute ?

1 Like