Ikea 5 button remote piston for brightness and color spectrum


#1

1) Give a description of the problem
Just need some design help.

I have an Ikea Tradfri 5 button controller and am struggling with two behaviors I want to achieve. They are:

Toggling the light between off and on with a specific brightness level.
Continuous/gradual dim or brighten by holding a button.

2) What is the expected behaviour?
I’m trying to achieve the following behaviors with my 5 button Tradfri remote:

Button 1: (top)
Push - Increase brightness by 5%
Hold - Continuously increase brightness in 5% increments until button is released

Button 3: (Bottom) - Inverse of Button 1.

Button 2 (Left Side) -
Push: Reduce color temperature with 3 presets - 2700k, 4000k, 5000k

Button 4 (Right side) - Inverse of Button 2

Button 5 :center)
Push - Toggle on/off and set brightness to 25% when turning on.
Hold - Toggle on/off and set brightness to 100% when turning on.

I’m struggling with how to set up… well, pretty much everything except for the button 1/3 push functionality.

Can anyone give me some help here?


#2

On most buttons, a “Hold” is only seen once per press…
So no matter how long you hold it down, ST only sees one action.


#3

I thought that was probably the case. That simplifies one issue. I’ll just make the hold function a bigger increase, like 25%,


#4

A good rule of thumb:

  • Use “Hold” for rarely use commands…
  • Use “Push” for often used commands…

In other words, I would not place a level adjustment in the “Hold” slot.
It will take forever to ramp it up more than twice


#5

That’s why I’m thinking of making it a big change. If I have the center button turning on to 25% or 100% with push/hold, a single long press up gets you to 50% and a single long press down gets to 75%.

I also don’t think the brightness on this lamp is going to get changed much. My wife just wants it bright for when she’s getting ready for bed, dim for bedtime, and dim when she gets up in the morning (hence why I made the push function the dimmer setting).

I think she’ll change the color temperature far more than brightness, which is why I want to set the 3 easy setpoints there.


#6

One other tidbit for consideration:
You can program webCoRE to change the levels & color temps of those lights automatically based on time of day, and day of week. So once you discover your wife’s perfect level of brightness for those events, webCoRE can handle it all seamlessly behind-the-scenes.

Once I started coding this way, it is very rare that I manually change the levels


#7

I’m contemplating doing that as well. For both brightness and color temp.

I’m just thinking that since it’s a 5 button remote, it’d be nice to have full control via the remote and not need to ever grab the phone or use the Google home to change it. But maybe it would make more sense to give her on/off on her lamp with the center button and use the other buttons to give her control over my lamp, the ceiling light, the ceiling fan speed, and maybe the bathroom light.


#8

Good thinking!

You can also make each “Push” or “Hold” flip a Simulated Switch… and let webCoRE monitor that SimSwitch… and kick off a whole scene each time that button is pressed.

IE: Movie time, Dinner time, Reading time, etc…
WebCoRE can control dozens of devices with a single button press.


#9

So here’s another question: Does WebCoRE have a dusk/dawn variable programmed tied to a sunrise/sunset calendar? I’d like to have all of my color spectrum bulbs throughout the house change based on daylight factors.

And one more: Can you recommend a good tutorial to help figure out some of the intracasies of Webcore? I’ve read the wiki and watched a fair amount of youtube, but it seems that the Wiki is more targeted at either the very basic or showing off just how crazy you can get, and most youtube videos I’ve found are more targeted at a specific implementation, rather than exploring concepts.


#10

If you are referring to the dusk/dawn times that are slightly different than the sunset/sunrise times, then no, not directly.

An easy workaround is to program:
Every day at sunset -20 minutes
or something similar.

temp


This forum is (hands down) the best source of collective knowledge.
Most topics are broken down into specifics, and most threads we can all learn a thing or two from…


So far, I have read:
temp
…and there is still more to learn…


#11

Nope, sunrise/sunset works for me as a trigger. Like you said, I can adjust an offset if they’re not quite close enough. I just hadn’t ever seen them in my tinkering.

Totally agreed. I just hate asking questions that are redundant/seemingly obvious. I’m sure someone out there has made a solid series on learning webcore, to help me get my feet under me a little more than they are now. Right now, I get an idea, sit down to start a piston, and hit a wall within about 8 minutes, haha. It’d be nice to get to the point of creating “intermediate” level pistons without needing to post here.


#12

The people here on this forum are some of the best and most helpful people on the planet. We’ve all been in your shoes at one point or another… (and of course, an expert in one area, can still learn in another)

So please, don’t hesitate to ask for help. Especially if you have tried ahead of time.

One thing that does help is to code in stages… and test often.
Before “complexifying” any code, just start small. It is easier to catch issues when the structure is barebones.

When you have issues, it also helps to try to create a tiny piston to highlight that issue. It lets you test variations in a few seconds time, without having to jump thru a bunch of hoops.


I also recommend that you turn logging to Full on testing pistons, and keep Trace turned on. This way, the numbers in the log align with the numbers in your piston. It makes catching problems much easier…


#13

Thanks for the reassurance. I have found your statements to be very true in the few posts/threads I’ve participated in. It’s one of the few places online where I’ve never run into the RTFM police or anyone being heckled for asking questions that have been asked before. Even so, I hate to be that guy who has to ask something as basic as how to set schedules, etc.


#14

*knocks on wood*

Thankfully, we’ve never needed any mods here.
This forum is filled with intelligent & mature people

If you want to keep topics to a minimum, a good rule of thumb would be to try the search button in the top right before creating a new topic.


With no official manual out yet, nobody can ever tell you to RTFM here… :joy:


#15

For the record:
Add a new statement > Add a timer > Choose parameters > Add a statement > Add an action > Choose device(s) or leave it at location > Add a task > Please select a command > Add

Afterwards, you can add additional tasks for the same device(s) by clicking on “Add a new task”


#16

So I have a question on setting up scheduled dimming… I built the following simple piston, and I’m wondering if there’s a more elegant/seamless way to set it up.

The problem I have is this: If I don’t have the “already on” qualifier in the timer block, the light gets turned on to 20% if it’s not on. To fix that, I used the if statement tied to switch state, but that turns the light on at it’s previous brightness for 1-2 seconds until WebCoRE processes the update. So if I went to the kitchen for a midnight snack, I’d get blinded and then the light would dim.

Is there any way to have it change the dimming level in the background (I’m assuming no)?

The devices here is a Zooz Zen27 Dimmer switch, but I had the same behavior with an Osram Lightify full color bulb.


#17

Most bulbs will turn on at the exact same color and level as it was when it last turned off.
(if a level command was sent, it will adjust a moment later)

One work-around for your scenario is:
In your “Good Night” piston, add the following:

With ProblemBulb
Do
    Set level to 10%  (or your nighttime preference)
    Wait 200 ms
    Turn off
END WITH

This essentially dims the bulb at the perfect time, and prepares it for the late night munchies. You could do something similar in the morning to “reset” it back to your daytime preferences.
(for example, motion active after 6am)


If you do not have a “Good Night” piston yet, you can make a tiny piston:
Every day at 11pm (Set level to 10%, Wait 200ms, Turn off)


#18

I was thinking that might be the best/only workaround. Having a light blip on for just a moment is probably better than getting blinded for a couple seconds in the middle of the night.

My nights aren’t really on a routine though, so some nights I’ll be up till 2am (like last night) and others, I’m in bed by 11. I have a manually triggered good night routine and could add this to it, but I’m wondering about adding it to the piston I created.

How hard would it be to achieve the following behavior:

At sunset + 2 hours, poll all the lights I want to dim’s switch status.
If they are turned on, set level to x%
If they are not on, set level, wait 200ms, turn off.

I’m assuming this is a fairly easy piston for a single light, and I could simply make a piston for each light individually, but how much more difficult would it be to do in a single piston for multiple lights that may be in different states?


#19

If you hard code a time (such as sunset + 2 hours), that piston will only have a single trigger. (this is good) You can combine as many lights as you want, but I would add an extra 100ms Wait per light. This just helps assure that the first command is fully processed before turning off the lights.

Personally, I think it best to just add it to your good night piston in webCoRE. That way, you can stay up late, or go to bed early, and your lights will adjust at the perfect time. As an added bonus, your code will be simplified, because nothing needs to be checked, and you can jump right into the commands.


#20

Hello, have hav bought an ikea 5 button and want the same function as you described on your frist post, except the hold function. Can you please help me, I’m new at this and don’t know where to start.