Control segments with ir remote

Hello,

is it possible to control segments with the ir remote?

what i want is to press a button to activate segment 1 and then press the red color button on the remote to change the color of segement 1 but not of segment 2, 3 … i have 4 different segments and i want change the color of each segment individually with the remote.

what i tried is to load a preset with only segment 1 enabled when i press the button, that works, but if i press the red color button the segment 2 is changed to red as well.

can you help me please

This may only work if you write Your Own MOD and compile
BUT you can use your IR to set different playlist up to 8 are suported look to IR input

Ignore @Magig_Wled, they’re totally off base here.

An IR remote can be programmed to input (almost) everything you can do from the Web GUI.
What I’d suggest is that you experiment with creating some presets in the GUI that do what you want.
The key for multiple segments that Don’t interact with each other is to make sure you are careful to only select the segments you want to save (put a check beside only that segment before you save the preset). In the preset you’re saving, make sure to check “Checked segments only” and (probably) uncheck “Save segment bounds”.

Once you save the single segment state in a preset , it can be restored independently of any other presets that might be up and running.

Once you get the hang of how that works in the GUI, it’s pretty simple to attach your created presets to IR buttons.

Another way is to create custom IR JSON file and modify API commands in it.

In such case any API is possible to attach to any button on IR remote.

Caveat: You’ll need to determine IR codes sent from remote. To speed up the process you can re-use existing examples available in source or KB.

thanks for your help, but i still haven’t got it right

@divsys
i have tried so much, but i can’t get it to separate the segments. i create all segments, activate segment 1 and save the preset 1. then i deactivate segment 1 and activate segment 2 and save it to preset 2. after i have loaded preset 2, segment 1 still changes

@blazoncek
i haven’t looked at the api yet, but if i can’t do it with presets, will it be different with the api?

Removed by author - look ahead 2 posts

Presets store API calls.

Looking back, I realized I had an error in those 4 sets of Preset API’s that might not work with your setup.

I redid them here so that they should work fine.
To use them, copy each one from the opening (and including) “{” to the ending “}”
Create a new preset but uncheck “Use current state”
You’ll get an empty box where you can paste the API entry.
Save each with a different name (for eg: Test1,Test2, etc.)
Try them out

Here’s 4 preset API’s you should be able to add to your setup for testing

Preset-1 40 LEDs in two segments of 20 all one colour

{"on":true,"bri":118,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":20,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"set":0,"n":"Seg1","col":[[255,0,255,0],[0,0,0,0],[0,0,0,0]],"fx":0,"sx":128,"ix":128,"pal":0,"c1":128,"c2":128,"c3":16,"sel":true,"rev":false,"mi":false,"o1":false,"o2":false,"o3":false,"si":0,"m12":0},{"id":1,"start":20,"stop":40,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"set":0,"n":"Seg2","col":[[255,0,255,0],[0,0,0,0],[0,0,0,0]],"fx":0,"sx":128,"ix":128,"pal":0,"c1":128,"c2":128,"c3":16,"sel":true,"rev":false,"mi":false,"o1":false,"o2":false,"o3":false,"si":0,"m12":0}]}

Preset-2 40 LEDs in two segments of 20 1st and 2nd different colours

{"on":true,"bri":118,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":20,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"set":0,"n":"Seg1","col":[[8,255,0,0],[0,0,0,0],[0,0,0,0]],"fx":0,"sx":128,"ix":128,"pal":0,"c1":128,"c2":128,"c3":16,"sel":true,"rev":false,"mi":false,"o1":false,"o2":false,"o3":false,"si":0,"m12":0},{"id":1,"start":20,"stop":40,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"set":0,"n":"Seg2","col":[[255,224,160,0],[0,0,0,0],[0,0,0,0]],"fx":0,"sx":128,"ix":128,"pal":0,"c1":128,"c2":128,"c3":16,"sel":true,"rev":false,"mi":false,"o1":false,"o2":false,"o3":false,"si":0,"m12":0}]}

Preset-3 20 LEDs in 1st segment of 20, different colour

{"on":true,"bri":118,"transition":7,"mainseg":0,"seg":[{"id":0,"start":0,"stop":20,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"set":0,"n":"Seg1","col":[[255,0,0,0],[0,0,0,0],[0,0,0,0]],"fx":0,"sx":128,"ix":128,"pal":0,"c1":128,"c2":128,"c3":16,"sel":true,"rev":false,"mi":false,"o1":false,"o2":false,"o3":false,"si":0,"m12":0}]}

Preset-4 20 LEDs in 2nd segment of 20, different colour

{"on":true,"bri":118,"transition":7,"mainseg":0,"seg":[{"id":1,"start":20,"stop":40,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"set":0,"n":"Seg2","col":[[0,0,255,0],[0,0,0,0],[0,0,0,0]],"fx":0,"sx":128,"ix":128,"pal":0,"c1":128,"c2":128,"c3":16,"sel":true,"rev":false,"mi":false,"o1":false,"o2":false,"o3":false,"si":0,"m12":0}]}

Bonus 5th preset - runs 2 different effects in the separate segments

{"on":true,"bri":118,"transition":7,"mainseg":1,"seg":[{"id":0,"start":0,"stop":20,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"set":0,"n":"Seg1","col":[[255,0,13,0],[0,0,0,0],[0,0,0,0]],"fx":92,"sx":213,"ix":255,"pal":0,"c1":128,"c2":128,"c3":16,"sel":true,"rev":false,"mi":false,"o1":false,"o2":false,"o3":false,"si":0,"m12":0},{"id":1,"start":20,"stop":40,"grp":1,"spc":0,"of":0,"on":true,"frz":false,"bri":255,"cct":127,"set":0,"n":"Seg2","col":[[0,0,255,0],[0,0,0,0],[0,0,0,0]],"fx":90,"sx":128,"ix":128,"pal":11,"c1":128,"c2":128,"c3":16,"sel":true,"rev":false,"mi":false,"o1":false,"o2":false,"o3":false,"si":1,"m12":2}]}
1 Like

wow thank you so much for your effort.

but i have still the same problem.
your presets work perfectly. but when i activate preset 4, for example, the color of the second segment changes as specified in the preset. now i would like to change the color of preset 4 (i.e. segment 2) via the ir remote control. but when i press the blue button on the remote control, both segments change again.

i realize that i could adjust this via the app / web interface. but the project is intended for older people and i think that the gui is a bit too complicated for them

again, thank you so much for your help

What I was trying to show is that presets can change different segments individually.
As you noted, they can.

Now presets are just a collection of API calls collected into one convenient set.
Click on a preset and all the API items are “played out”.

IR remote buttons do much the same thing, they’re completely programmable.
One of the simplest things you can do is just program the remote buttons to fire up a particular preset.
Or to put it another way, if you create all the presets you need in the GUI, you can just link each button of the remote to a preset.

That’s not the only way to do it,but it’s pretty simple to debug.

1 Like

of course i understand the possibility of connecting the ir remote control to the presets. but my led setup currently has 6 segments that i want to control individually. the ir remote control has 15 predefined colors and a few effects. just to control the colors i would need 90 buttons and would then have 6 times red, blue, …

that’s why i thought i could activate individual segments via the remote control but also keep them active until i activate / deactivate other segments

you can do that using API

  • set main segment and keep it selected (unselect others)
  • set color (it will apply only to selected segments)
  • repeat above for any segment

can you please give me an example of how to activate only 1 segment and deselect everything else until i want to change the active segment. just like the presets above, i can only load the preset with the active segment, but when i press a color button on the ir remote, the every segment is changed.

deselect all: "seg":{"sel":false}
select segment 2: "seg":[{"id":2,"sel":true}]

if you want to select one segment and deselect all others you need to specify all

"seg":[{"id":0,"sel":false},{"id":1,"sel":false},{"id":2,"sel":true},{"id":3,"sel":false},...]

1 Like

Please read KB.

thank you so much. editing the presets and manually deselect all the other segments in the api command did the job for me.

again, thank you all so much for your help :+1: