CoRE - Get peer assistance here with setting up Pistons

Oh I see. Agreed.
By the way, regarding the If 187 Mont… is Away condition, would it be already Away anyway?

I could also be in Evening mode.

It looks like I have it now, thanks.

You’ll have to actively install the published version, it won’t be a “oh crap they updated it!” situation. So don’t fret, you’ll know and have all the time in the world to cap each piston!

1 Like

I am looking for an optimized CoRE set up for this logic (Home Theater Lighting)…

tvSwitch and appletvSwitch – 2 virtual switches
motion is a virtual ZMM sensor

If motion is active {
     if all of tvSwitch, appletvSwitch is off {
          set light dim level to 0
          fade Dimmer to 100% over 5 seconds  
     } else {
          do nothing
     }
} else {
     if any of tvSwitch, appletvSwitch is on {
          do nothing
     } else {
          wait 5 min
          turn off
          (TCP - cancel on piston state change), TOS - Local
     }
}

a) What piston type is best? and can this logic be simplified/shrinked? (it feels verbose)

Addl questions
b) I have TCP so that I want the turn off action to reset in case motion becomes active again. I think I have this right.
c) What’s the difference between turning dimmer ON and set fade to 100% vs set level to 0% then fade to 100%?

TIA!

I think it could be simplified to:

If all of tvSwitch, appletvSwitch is off
{

If motion is active
{
    set light dim level to 0
    fade Dimmer to 100% over 5 seconds
} else
    {
     wait 5 min
     turn off
     (TCP - cancel on piston state change), TOS - Local
    }

}

Do I get it right?

trying to set the colour on my Osram kitchen lights as i want the standard light look after i made have set a scene.

I like the standard look which you can see in the picture however the colours in core dont seem to match up to my osram bulbs , is there a way to set the colour with the #code rather then “yellow” ?

I can’t tell if someone answered your LIFX question…

It is because CoRE is going directly against the LIFX cloud bypassing the local DH. The LIFX device handlers suck.

I removed all of my LIFX bulbs from ST and just use LIFX Group of Groups to manage the groups. They have the same problem, but you can configure a group to check it’s status every x minutes in the DH so it updates if you change the state of the group by another means…

If you want to just control a bulb, I have this also.

GitHub - ericvitale/ST-Better-LIFX-BULB: Custom device handler for the LIFX bulb. <— Not released officially but I use it.

Just hit “Add Condition” on the second screen after hitting add group. You are adding conditions to the group…

Group (condition 1 AND condition 2)

OR

Group (condition 3 AND condition 4)

OR

condition 5
1 Like

I’ll this a shot! Thanks

If you know the Hex you can convert it to RGB. CoRE will accept RGB.

However, if you want soft white, don’t sent the hue and saturation, just set the level and color = soft white. You likely won’t even need to set it on as setLevel should do that for you.

1 Like

This might be of use

https://www.google.com/search?q=frgb+to+hex&oq=frgb+to+hex&aqs=chrome..69i57.1420j0j9&sourceid=chrome&ie=UTF-8

1 Like

Quick question here, just as verification really…

I have a piston set up to put my house in night mode based on motion sensors and the outlet my TV is plugged into…

Now, it works fine. It’s just that based on that power meter outlet, the piston is trying to run several times a second, so my notifications are completely flooded.

I wouldn’t mind getting it to stop flooding my notifications, but that’s not super essential. Really, I just wanted to see if it’s bad to have a piston like that always triggering? Does it impact anything? If so, is there a better way to do what I’m doing?

Thanks!

Not sure. This is where a bit of what is a trigger? and what is a condition? sort of thing gets me…and also I wonder if the else {} routine gets triggered continuously (when tv stuff is off and empty HT, this condition is matched EVERY 5 min)…

Hopefully others will chime in and edumacate…

Not sure if this would cause your problem but did you enable OAuth when you install CoRE?

We are getting somewhere Michael but still a little problem. The light came on at 5:00 am this morning and set to 50%. However, at 5:36 am there was motion so it set the light to 100%. I actually want the light to stay on at 50% between 5:00-5:59am (too bright for morning):smirk:. I think that the OR Motion is detected and Hall Light is ON after the first WHEN TRUE is causing this. What do you think?


Here is the recent activity for the Hall Light

Yes, OAuth is enabled. I am able to see a CoRE dashboard.

Try changing your power meter to a trigger, drops to or below 5w possibly.

Edit:

Also what dth are you using for your plug?

ok so now i have managed to set my default colour using the RGB hex my next issue if if a scene is set or colour is manually set when core runs it gets overwritten by the previous scene or manual colour. as you can see if the picture

I had a hard time trying to get a colour set when using CoRE also. I eventually just used the set colour = blue or whatever colour you want instead of using the code.

In addition to what you already have in the IF clause add…

IF (
    (
     Any of Living Room Motion, Gym Motion, or Bowflex motion changes to inactive
     AND
     All of Living Room Motion, Gym Motion, or Bowflex motion is not active
     AND 
     TV Outlet is than or equal to 5W
     )

   OR

    (
     All of Living Room Motion, Gym Motion, or Bowflex motion is not active
     AND 
     TV Outlet drops below 5W
    )
)

This way the piston will only fire when the power drops below 5W or any of the motion sensors change to inactive. However, don’t worry, the first clause won’t return true unless all are inactive even if one become inactive.