rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.84k stars 545 forks source link

Light is on cool white instead of bright warm white #200

Closed KTibow closed 3 years ago

KTibow commented 3 years ago

In the Tuya app, when I set my NiteBird bulb to white, it turns to a bright warm white. In this integration, it's a cool white. I tried enabling the color temperature section, and when I do it, any setting makes it a warm white.

ultratoto14 commented 3 years ago

Can you dump your DPs using this ? And also dump your light configuration here please.

KTibow commented 3 years ago
AVAILABLE DPS ARE [{'20': True, '21': 'white', '22': 1000, '24': '0041000003e8', '25': '000e0d0000000000000000c803e8', '26': 0}]

And here's the full log:

INFO:localtuya:localtuya version 1.0.0
INFO:localtuya:Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec  7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32
INFO:localtuya:Using pytuya version '8.1.0'
INFO:localtuya:Detecting list of available DPS of device 58747402d8bfc0efaa13 [192.168.1.49], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"58747402d8bfc0efaa13","devId":"58747402d8bfc0efaa13"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b'\x81\xc8\x994\xb1=B\xf0\x82&9\xa9\x8c\x7f\xab\xcb\x00\xd0\xa9\xbd86\xf8M\x99t\xde8Kr\xee\x8ak{A\xf7\x0c\x93NS\x96\xaf\x08Q\xee\t4S\x0b\xd7\xfd`P\xc1#\x14e\xe5\x81\x99\xbfs\xde\xf3\xfdU\x7f\x83\x89\xe1\xd6\xe8)\xf9*\x96[\xb0-\xd5\xbb\xba8\x07\x8a.\xe0\x89\x10\xa9\x90\x81\xc9?q\x94e?\x7f\x94\xae\x83\xd2\x9aQ=\x1c\xc8<\xb3\xb3\xeeQ\xf0\xb8\x04\x0f\xc7D9\xd5\xc7Y\x85?\x94\x92\xb2z\xc3\x12\x90\xfcq\x96\xf8i\x9c\xbc\xf2JVH\xc2'
DEBUG:localtuya.pytuya:decrypted result='{"devId":"58747402d8bfc0efaa13","dps":{"20":true,"21":"white","22":1000,"24":"016803e801f4","25":"000e0d0000000000000000c803e8","26":0}}'
AVAILABLE DPS ARE [{'20': True, '21': 'white', '22': 1000, '24': '016803e801f4', '25': '000e0d0000000000000000c803e8', '26': 0}]
INFO:localtuya:COMPLETE response from device 58747402d8bfc0efaa13 [192.168.1.49].
INFO:localtuya:Detecting list of available DPS of device 58747402d8bfc0efaa13 [192.168.1.49], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"58747402d8bfc0efaa13","devId":"58747402d8bfc0efaa13"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b'\x81\xc8\x994\xb1=B\xf0\x82&9\xa9\x8c\x7f\xab\xcb\x00\xd0\xa9\xbd86\xf8M\x99t\xde8Kr\xee\x8ak{A\xf7\x0c\x93NS\x96\xaf\x08Q\xee\t4S\x0b\xd7\xfd`P\xc1#\x14e\xe5\x81\x99\xbfs\xde\xf3\xfdU\x7f\x83\x89\xe1\xd6\xe8)\xf9*\x96[\xb0-\xd5\xbb\xba8\x07\x8a.\xe0\x89\x10\xa9\x90\x81\xc9?q\x94e?\x7f\x94\xae\x83\xd2\x9aQ=\x1c\xc8<\xb3\xb3\xeeQ\xf0\xb8\x04\x0f\xc7D9\xd5\xc7Y\x85?\x94\x92\xb2z\xc3\x12\x90\xfcq\x96\xf8i\x9c\xbc\xf2JVH\xc2'
DEBUG:localtuya.pytuya:decrypted result='{"devId":"58747402d8bfc0efaa13","dps":{"20":true,"21":"white","22":1000,"24":"016803e801f4","25":"000e0d0000000000000000c803e8","26":0}}'
AVAILABLE DPS ARE [{'20': True, '21': 'white', '22': 1000, '24': '016803e801f4', '25': '000e0d0000000000000000c803e8', '26': 0}]
INFO:localtuya:COMPLETE response from device 58747402d8bfc0efaa13 [192.168.1.49].
INFO:localtuya:Detecting list of available DPS of device 58747402d8bfc0efaa13 [192.168.1.49], protocol 3.3.
DEBUG:localtuya.pytuya:Sending command status (device type: type_0a)
DEBUG:localtuya.pytuya:paylod=b'{"gwId":"58747402d8bfc0efaa13","devId":"58747402d8bfc0efaa13"}'
DEBUG:localtuya.pytuya:DATA RECEIVED!
DEBUG:localtuya.pytuya:decode payload=b'\x81\xc8\x994\xb1=B\xf0\x82&9\xa9\x8c\x7f\xab\xcb\x00\xd0\xa9\xbd86\xf8M\x99t\xde8Kr\xee\x8ak{A\xf7\x0c\x93NS\x96\xaf\x08Q\xee\t4S\x0b\xd7\xfd`P\xc1#\x14e\xe5\x81\x99\xbfs\xde\xf3\xfdU\x7f\x83\x89\xe1\xd6\xe8)\xf9*\x96[\xb0-\xd5\xbb\xba8\x07\x8a.\xe0\x89\x10\xa9\x90\x81\xc9?q\x94e?\x7f\x94\xae\x83\xd2\x9aQ=\x1c\xc8<\xb3\xb3\xeeQ\xf0\xb8\x04\x0f\xc7D9\xd5\xc7Y\x85?\x94\x92\xb2z\xc3\x12\x90\xfcq\x96\xf8i\x9c\xbc\xf2JVH\xc2'
DEBUG:localtuya.pytuya:decrypted result='{"devId":"58747402d8bfc0efaa13","dps":{"20":true,"21":"white","22":1000,"24":"016803e801f4","25":"000e0d0000000000000000c803e8","26":0}}'
AVAILABLE DPS ARE [{'20': True, '21': 'white', '22': 1000, '24': '016803e801f4', '25': '000e0d0000000000000000c803e8', '26': 0}]
INFO:localtuya:COMPLETE response from device 58747402d8bfc0efaa13 [192.168.1.49].
INFO:localtuya:TIMEOUT: No response from device 58747402d8bfc0efaa13 [192.168.1.49] after 2 attempts.

Did you forget to linkify

here please

?

ultratoto14 commented 3 years ago

@KTibow Just want to know how you set up your light in localtuya yaml configuration or if you used the config flow, then go into integration -> localtuya -> your device -> option and put snapshot here.

KTibow commented 3 years ago

Sorry for being slow, here's my config: image

KTibow commented 3 years ago

I've added a bit more by now, here it is: image

KTibow commented 3 years ago

And this shows up in the Tuya app: Screenshot_20201230-141503_TuyaSmart

ultratoto14 commented 3 years ago

Is your builb able to control the color temperature for white ? Can you try master (reinstall the integration and choose master as version) as some changes have been made that may fix your issue ?

KTibow commented 3 years ago

able to control the color temperature for white

Nope, there's no option for that in the Tuya app, except for the "White" section which is warm white.

KTibow commented 3 years ago

It fixed it! I want to do some more troubleshooting before I close.

ultratoto14 commented 3 years ago

If you do not have a white temperature setting in tuya, do not set the color temperature like you did to 26 here

It should work ok when you hit the center in the color picker, it should switch your light to white on master. Have a nice new year party !

KTibow commented 3 years ago

Which commit fixed it?