Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix better control of RGB/White when SetOption37 >128, added Dimmer1 and Dimmer2 commands #6799

Merged
merged 2 commits into from
Oct 31, 2019

Conversation

s-hadinger
Copy link
Collaborator

Description:

  • Better control of RGB/White when SetOption37 >128. Now you see two disctinct devices that you can power on/off with Power1 and Power2.
  • I added Dimmer2 command to change only dimmer of white channels. Dimmer or Dimmer1 will only change RGB brightness.
  • Changes to SetOption37 will trigger a reboot, it is required in most cases.
  • Also added Channel<x> + and Channel<x> - to add/substract 10 to brightness channel (range is still 0..100). This is an old request from @jziolkowski

I didn't add sliders for the two separate dimmers. @RoadRunnr would you be kind enough to look at it?

Related issue (if applicable): fixes #6714

Checklist:

  • The pull request is done against the latest dev branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR.
  • The code change is tested and works on core pre-2.6
  • The code change pass travis tests. Your PR cannot be merged unless tests pass
  • I accept the CLA.

@arendst arendst merged commit 8b9d157 into arendst:development Oct 31, 2019
@ascillato2 ascillato2 added this to the v7.1.0 milestone Nov 1, 2019
@ascillato2 ascillato2 added enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended labels Nov 1, 2019
@jziolkowski
Copy link
Contributor

@RoadRunnr the WebUI doesn't update the slider positions while the change comes from outside the UI. Also I beg you, please make the "c1" etc uppercase :)

@arendst
Copy link
Owner

arendst commented Nov 2, 2019

It is not a roadrunner issue.
It is as designed and there will not be any life update of sliders in the near future. Sliders have never been life.

s-hadinger added a commit to s-hadinger/Tasmota that referenced this pull request Nov 2, 2019
arendst added a commit that referenced this pull request Nov 2, 2019
Fix wrong Dimmer behavior introduced with #6799 when SetOption37 < 128
@Montreal666
Copy link

Montreal666 commented Nov 5, 2019

Works flawlessly, thank you; Just out of curiosity, is there any way to send a "Color" command in the RR,GG,BB form that would not reset Channel4 (white) to 0 ? Since it's currently the case, I am forced to use HSBcolor to avoid resetting Channel4. Thx.

@s-hadinger
Copy link
Collaborator Author

Thanks for the feedback. It's currently not possible but I believe the code change would be small. Let me take a look.

@Montreal666
Copy link

After further testing, I found the following bugs; let me know if I should open a separate issue or if this can be handled from this thread; Thanks again!

(1) --- "Dimmer2" is not reflected in MQT, therefore any changes to "dimmer 2" or "channel 4" is reflected on "dimmer 1" instead:

17:57:13 CMD: dimmer 33
17:57:13 MQT: tele/RGBW1/STATE = {"Time":"2019-11-24T17:57:13","Uptime":"0T00:25:53","UptimeSec":1553,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":127,"MqttCount":1,"POWER1":"HOLD","Dimmer":33,"Color":"84,10,10,26","HSBColor":"0,88,33","Channel":[33,4,4,10],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SALON","BSSId":"B4:75:0E:39:C1:4E","Channel":11,"RSSI":78,"LinkCount":1,"Downtime":"0T00:00:06"}}
17:57:13 MQT: stat/RGBW1/RESULT = {"POWER1":"HOLD","Dimmer":33,"Color":"84,10,10,26","HSBColor":"0,88,33","Channel":[33,4,4,10]}
17:57:22 CMD: dimmer2 55
17:57:22 MQT: tele/RGBW1/STATE = {"Time":"2019-11-24T17:57:22","Uptime":"0T00:26:02","UptimeSec":1562,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":1,"POWER1":"HOLD","Dimmer":55,"Color":"84,10,10,140","HSBColor":"0,88,33","Channel":[33,4,4,55],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SALON","BSSId":"B4:75:0E:39:C1:4E","Channel":11,"RSSI":74,"LinkCount":1,"Downtime":"0T00:00:06"}}
17:57:22 MQT: stat/RGBW1/RESULT = {"POWER1":"HOLD","Dimmer":55,"Color":"84,10,10,140","HSBColor":"0,88,33","Channel":[33,4,4,55]}
17:58:55 CMD: channel4 100
17:58:55 MQT: tele/RGBW1/STATE = {"Time":"2019-11-24T17:58:55","Uptime":"0T00:27:35","UptimeSec":1655,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":1,"POWER1":"HOLD","Dimmer":100,"Color":"255,10,10,255","HSBColor":"0,96,100","Channel":[100,4,4,100],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SALON","BSSId":"B4:75:0E:39:C1:4E","Channel":11,"RSSI":74,"LinkCount":1,"Downtime":"0T00:00:06"}}
17:58:55 MQT: stat/RGBW1/RESULT = {"POWER1":"HOLD","Dimmer":100,"Color":"255,10,10,255","HSBColor":"0,96,100","Channel":[100,4,4,100]}

(2) --- Once "power2" is set to off, Any changes to hsbcolor, color etc. powers ON "POWER2"

18:03:51 MQT: stat/RGBW1/POWER2 = OFF
18:03:55 CMD: power2
18:03:55 MQT: stat/RGBW1/RESULT = {"POWER2":"OFF"}
18:03:55 MQT: stat/RGBW1/POWER2 = OFF
18:04:13 CMD: hsbcolor1 44
18:04:13 MQT: tele/RGBW1/STATE = {"Time":"2019-11-24T18:04:13","Uptime":"0T00:32:53","UptimeSec":1973,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":1,"POWER1":"HOLD","Dimmer":89,"Color":"227,191,93,99","HSBColor":"44,59,89","Channel":[89,75,36,39],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SALON","BSSId":"B4:75:0E:39:C1:4E","Channel":11,"RSSI":76,"LinkCount":1,"Downtime":"0T00:00:06"}}
18:04:13 MQT: stat/RGBW1/RESULT = {"POWER1":"HOLD","Dimmer":89,"Color":"227,191,93,99","HSBColor":"44,59,89","Channel":[89,75,36,39]}
18:04:13 MQT: stat/RGBW1/RESULT = {"POWER1":"HOLD","Dimmer":89,"Color":"227,191,93,99","HSBColor":"44,59,89","Channel":[89,75,36,39]}
18:04:22 CMD: power2
18:04:22 MQT: stat/RGBW1/RESULT = {"POWER2":"ON"}
18:04:22 MQT: stat/RGBW1/POWER2 = ON

(3) --- and vice versa: Once "power1" is set to off, Any changes to channel4 powers ON "POWER1"

18:04:55 CMD: power1 off
18:04:56 MQT: tele/RGBW1/STATE = {"Time":"2019-11-24T18:04:55","Uptime":"0T00:33:35","UptimeSec":2015,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":119,"MqttCount":1,"POWER1":"TOGGLE","Dimmer":89,"Color":"227,191,93,99","HSBColor":"44,59,89","Channel":[89,75,36,39],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SALON","BSSId":"B4:75:0E:39:C1:4E","Channel":11,"RSSI":74,"LinkCount":1,"Downtime":"0T00:00:06"}}
18:04:56 MQT: stat/RGBW1/RESULT = {"POWER1":"OFF"}
18:04:56 MQT: stat/RGBW1/POWER1 = OFF
18:04:59 CMD: power1
18:04:59 MQT: stat/RGBW1/RESULT = {"POWER1":"OFF"}
18:04:59 MQT: stat/RGBW1/POWER1 = OFF
18:05:17 CMD: channel4 10
18:05:17 MQT: tele/RGBW1/STATE = {"Time":"2019-11-24T18:05:17","Uptime":"0T00:33:57","UptimeSec":2037,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":1,"POWER1":"HOLD","Dimmer":89,"Color":"227,191,93,26","HSBColor":"44,59,89","Channel":[89,75,36,10],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SALON","BSSId":"B4:75:0E:39:C1:4E","Channel":11,"RSSI":76,"LinkCount":1,"Downtime":"0T00:00:06"}}
18:05:17 MQT: stat/RGBW1/RESULT = {"POWER1":"HOLD","Dimmer":89,"Color":"227,191,93,26","HSBColor":"44,59,89","Channel":[89,75,36,10]}
18:05:27 CMD: power1
18:05:27 MQT: stat/RGBW1/RESULT = {"POWER1":"ON"}
18:05:27 MQT: stat/RGBW1/POWER1 = ON

@s-hadinger
Copy link
Collaborator Author

Bug confirmed. Will work on it.

@s-hadinger s-hadinger mentioned this pull request Nov 24, 2019
6 tasks
@s-hadinger s-hadinger deleted the fix_so37 branch November 24, 2019 21:24
@s-hadinger
Copy link
Collaborator Author

@homeseer666 fixed in #7020

@Montreal666
Copy link

Thank you, much appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setoption68 2 = RGB+W option ( Treat PWM1-3 and 4 as two separate channels.
5 participants