[OBSOLETE] [BETA MILESTONE 1] CoRE (Community's own Rules Engine)

RGB is a pair of three colors, Red, Green and Blue. Each one has a value between 0 and 255, where 0 means off and 255 full on. Each number is then encoded into two digit hexadecimal representation from 00 (decimal 0) to FF (decimal 255) and simply concatenated with the prefix #.

Red for example is R=255, G=0, B=0, or in hexadecimal format FF, 00, 00. In RGB that is #FF0000

1 Like


When I use the setcolor method of a hue light in a piston, it also change the level of my light. Is it normal?


Yes, setColor is in fact equivalent to setHue + setSaturation + setLevel. All three in one go.

While on the topic of color. I tried Transition to color Random in 10s but the Random or any color I pick gets dropped. I tried it on a Hue bulb. Bug or feature to stop my from messing with it? :wink:

I’ve been working with my hue bulbs quite a bit lately, and I can’t get them to behave reliably. Usually, the first time I rune a piston that I built to change colors it works pretty well, although it certainly seems to work better with only one or two lights…not many more. After the first cycle, it seems I really only get the last color to come up. I’ve tried both SetColor and manually setting hue, sat and level…it doesn’t seem to matter. I feel like this is probably more of a hue->ST->CoRE issue that anything else. Maybe just too many moving parts. It sounds like some folks are having success…but not me.

@ady624 is this good or bad??? :fearful:

I’ve been getting similar results - first time it gives correct color… second sometimes… third unlikley.
I seemed to have more luck when i used the Reset action first. Also using seperate commands for setHue/Sat/Level seemed a little more consistent… but its ST-HUE intergration i guess that causes the issues. I know some folks have had some success with linking the lights directly with ST hub rather than Via the Hue hub, but if the internet goes down the ST hub is currently pretty redundant. so your lights become so as well :confused: a Rule system should be one of the few local processes on the ST Hub.

Ady624 - thanks for the info, so juust use Hex for color input :slight_smile:

Will find out. And if it affects CoRE I will send an army of minions to fix CoRE :wink:


I see you have control over lowSpeed, medSpeed, and highSpeed in the app, I have a custom device type for lights and fans and would like to see if I can code them to work for these?

Same thing, it’s not working. I suspect the DH… anyone can confirm the transition to color is working?

What DTH are you using? Can I see the transition color routine? i think it is called setAdjustedColor

Sorry, are you asking me? Not following you, can you please rephrase the question?

@ady624 I’ve noticed that some of my time events often become past due and require that I go into the design of the Piston then hit “Done” in order to reset the timer. Have you noticed this problem? Any possible solution to prevent time events from getting past due, or if after being past due for x amount of time, reset the counter (as a user option or inherent)?

I am on the latest version as of 9:30 pm 7/11/2016. Not sure if this is resolved in this version, but if so, sorry for the trouble.

1 Like

I am trying to design a piston and would appreciate some help. My requirement is that if the mailbox opens for the first time in the day, I’d like to be notified that the mailman has delivered mail. For subsequent opens, I want a different notification stating that “someone opened the mailbox”. The way I am thinking this is that I will use a variable (never used one before). For the first time, the mailbox opens, the variable value should be 0, which will inform me that the mailman has opened the mailbox. The piston will then increment the variable by 1. Each subsequent time will check for the variable value and if it is greater than or equal to 1, I will have a different message show up. My question is; is this the correct/simplest approach? Also, is there a way to reset the variable to zero at the start of each day?

I have a piston of mine that runs every 1 minute, changing colors on my lights. Failed about twice in month. If you could gather some logs… please.

Okay, I will check the logs when it gets past due again. Do you need the log before or after it’s past due?

Would be great if you have them at the time when it should run…

I have a custom device type I created with low/med/high. Do I have to code them with a specific word to use the lowSpeed, medSped, and highSpeed?

I am pretty sure the failed timed events are NOT the fault of CoRE. This problem started cropping up a few weeks ago and it the same issues were happening with Rule Machine. I think this is an old problem coming back to haunt us and I think it has everything to do with the amount of load being put on the back end.

It would seem so, but OTOH, my personal experience and all the reports I’ve noticed are related to timed events. Wouldn’t a general scheduler issue be more democratic in what gets lost?