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

VirtualCT does not work for RGBCW lights with SetOption92=1 #15337

Closed
13 tasks done
jonschz opened this issue Apr 10, 2022 · 2 comments · Fixed by #18768
Closed
13 tasks done

VirtualCT does not work for RGBCW lights with SetOption92=1 #15337

jonschz opened this issue Apr 10, 2022 · 2 comments · Fixed by #18768
Labels
feature request (devs?) Action - awaiting response from developers stale Action - Issue left behind - Used by the BOT to call for attention

Comments

@jonschz
Copy link
Contributor

jonschz commented Apr 10, 2022

PROBLEM DESCRIPTION

I have an RGBCW LED light (Athom LB01-15W-E27) with the template given here. SetOption92 1 is enabled, which works as expected (RGB and white channels). SetOption68 is off, SetOption37 is set to 0.

I followed the instructions on the pull request introducing the command VirtualCT, and found that it has no effect on my lamp.

According to my understanding of the pull request, VirtualCT should work on my device:

This new version gives fine grain control to drive Colw/Warm white, for RGB, RGBW and RGBCW.

A discussion in Discord on 2021-06-22 starting here discussed a related issue, but did not yield any results.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in discussions
  • Searched the problem in the docs
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): Athom LB01-15W-E27
  • Tasmota binary firmware version number used: 11.0.0
    • Pre-compiled
  • Flashing tools used: [pre-flashed]
  • Provide the output of command: Backlog Template; Module; GPIO 255:
RESULT = {"NAME":"LB01-15W-E27-TAS","GPIO":[0,0,0,0,416,419,0,0,417,452,418,0,0,0],"FLAG":0,"BASE":18}
RESULT = {"Module":{"0":"LB01-15W-E27-TAS"}}
RESULT = {"GPIO0":{"0":"None"},"GPIO1":{"0":"None"},"GPIO2":{"0":"None"},"GPIO3":{"0":"None"},"GPIO4":{"416":"PWM1"},"GPIO5":{"419":"PWM4"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO12":{"417":"PWM2"},"GPIO13":{"452":"PWM_i5"},"GPIO14":{"418":"PWM3"},"GPIO15":{"0":"None"},"GPIO16":{"0":"None"},"GPIO17":{"0":"None"}}
  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
[all rules disabled]
  • Provide the output of this command: Status 0:
17:51:35.878 RSL: STATUS = {"Status":{"Module":0,"DeviceName":"Tasmota","FriendlyName":["Tasmota"],"Topic":"tasmota_CF77D3","ButtonTopic":"0","Power":1,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0}}
17:51:35.904 RSL: STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota/release/tasmota.bin.gz","RestartReason":"External System","Uptime":"0T00:01:39","StartupUTC":"2022-04-10T15:49:56","Sleep":50,"CfgHolder":4617,"BootCount":46,"BCResetTime":"2022-04-06T06:18:17","SaveCount":345,"SaveAddress":"FB000"}}
17:51:35.938 RSL: STATUS2 = {"StatusFWR":{"Version":"11.0.0(tasmota)","BuildDateTime":"2022-02-12T14:13:50","Boot":31,"Core":"2_7_4_9","SDK":"2.2.2-dev(38a443e)","CpuFrequency":80,"Hardware":"ESP8266EX","CR":"365/699"}}
17:51:35.957 RSL: STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["<censored>",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C80001000600003C5A0A190000000000","00000080","01006400","00004000"]}}
17:51:35.989 RSL: STATUS4 = {"StatusMEM":{"ProgramSize":620,"Free":380,"Heap":27,"ProgramFlashSize":1024,"FlashSize":2048,"FlashChipId":"1540A1","FlashFrequency":40,"FlashMode":3,"Features":["00000809","8FDAC787","04368001","000000CF","010013C0","C000F981","00004004","00001000","00000020"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37,45","Sensors":"1,2,3,4,5,6"}}
17:51:35.017 RSL: STATUS5 = {"StatusNET":{"Hostname":"<censored>","IPAddress":"<censored>","Gateway":"<censored>","Subnetmask":"255.255.255.0","DNSServer1":"192.168.178.1","DNSServer2":"0.0.0.0","Mac":"<censored>","Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":17.0}}
17:51:35.044 RSL: STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_CF77D3","MqttUser":"DVES_USER","MqttCount":0,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}}
17:51:35.064 RSL: STATUS7 = {"StatusTIM":{"UTC":"2022-04-10T15:51:35","Local":"2022-04-10T17:51:35","StartDST":"2022-03-27T02:00:00","EndDST":"2022-10-30T03:00:00","Timezone":99,"Sunrise":"07:09","Sunset":"20:33"}}
17:51:35.082 RSL: STATUS10 = {"StatusSNS":{"Time":"2022-04-10T17:51:35"}}
17:51:35.091 RSL: STATUS11 = {"StatusSTS":{"Time":"2022-04-10T17:51:35","Uptime":"0T00:01:39","UptimeSec":99,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":0,"POWER":"ON","Dimmer":1,"Color":"0000000003","HSBColor":"0,0,0","White":1,"CT":500,"Channel":[0,0,0,0,1],"Scheme":0,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"FRITZ!Box 7530 YG 2,4Ghz","BSSId":"98:9B:CB:36:75:88","Channel":6,"Mode":"11n","RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:03"}}}
  • Set weblog to 4 and then, when you experience your issue, provide the output of the Console log:
[nothing of interest beyond what I describe below]
Grp 0, Cmnd 'VIRTUALCT', Idx 1, Len 39, Data '{"153":"00000000FF","500":"000000FF00"}'
CMD: Grp 0, Cmnd 'CT', Idx 1, Len 3, Data '153'
Grp 0, Cmnd 'CT', Idx 1, Len 3, Data '500'

TO REPRODUCE

For testing puproses, I run the following:

SetOption106 1
restart 1

and after the restart:

VirtualCT
RESULT = {"VirtualCT":{"153":"000000FF00","500":"00000000FF"}}
CT 153
RESULT = {"POWER":"ON","Dimmer":100,"Color":"000000FF00","HSBColor":"0,0,0","White":100,"CT":153,"Channel":[0,0,0,100,0]}
CT 500
RESULT = {"POWER":"ON","Dimmer":100,"Color":"00000000FF","HSBColor":"0,0,0","White":100,"CT":500,"Channel":[0,0,0,0,100]}
VirtualCT {"153":"00000000FF","500":"000000FF00"}
RESULT = {"VirtualCT":{"153":"00000000FF","500":"000000FF00"}}
CT 153
RESULT = {"POWER":"ON","Dimmer":100,"Color":"000000FF00","HSBColor":"0,0,0","White":100,"CT":153,"Channel":[0,0,0,100,0]}
CT 500
RESULT = {"POWER":"ON","Dimmer":100,"Color":"00000000FF","HSBColor":"0,0,0","White":100,"CT":500,"Channel":[0,0,0,0,100]}

EXPECTED BEHAVIOUR

After the second VirtualCT call, I would expect cold white and warm white to have flipped (I know that I could achieve this by other means, this is only to demonstrate the problem). However, the second VirtualCT call has no effects whatsoever.

SCREENSHOTS

not applicable

ADDITIONAL CONTEXT

Potential error in the source code?

Edited

It appears that SetOption92 1 causes the computation of VirtualCT to be skipped:

return false; // avoid any interference

Here we return from calcGammaBulbs before the VirtualCT code is executed:

if (Light.virtual_ct && (!white_free_cw) && (LST_RGBW <= Light.subtype)) { // any light with a white channel

Why even use VirtualCT on an RGBCW light?

The warm white of the light is not warm enough for my taste, so I want to mix in some RGB. Furthermore, I only ever use a small portion of the CT slider, as I don't need any cold whites beyond 325. What I would want to use in the end is something like

VirtualCT {"153":"0000007F7F","325":"00000000FF","500":"A080000050"}

(Please, remember to close the issue when the problem has been addressed)

@ascillato2 ascillato2 added the feature request (devs?) Action - awaiting response from developers label Apr 10, 2022
@jonschz jonschz changed the title VirtualCT does not work for RGBCW lights VirtualCT does not work for RGBCW lights with SetOption92=1 Apr 15, 2022
@github-actions
Copy link

This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Action - Issue left behind - Used by the BOT to call for attention label May 10, 2022
@github-actions
Copy link

This issue was automatically closed because of being stale. Feel free to open a new one if you still experience this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request (devs?) Action - awaiting response from developers stale Action - Issue left behind - Used by the BOT to call for attention
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants