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

homekit光色映射与tuya platform不一致/homekit color temperature map not match with tuya platform #136

Closed
XiaoTonyLuo opened this issue Oct 24, 2021 · 6 comments
Labels
bug Something isn't working no-issue-activity

Comments

@XiaoTonyLuo
Copy link

Describe the bug
homekit中调节光色时,tuya-homebridge发送的色温范围仅从0(6300K白光)至255(2700K黄光),而设备定义的色温范围在0(黄光)-1000(白光),导致从homekit中只能调节为黄光。

When change color temperature in Homekit, tuya-homebridge send color-temp request with range 0 (which is demonstrated as 6300K white in Homekit) and 255 (which is demonstrated as 2700K warm yellow in Homekit), which the device accepts color temperature with range 0 (2700K warm yellow in tuya app) and 1000 (6300K white in tuya app), hence in homekit, the color could only been adjusted as warm yellow.

Expected behavior
设备光色应当能在Homekit中完整调节。

The color temperature should be fully adjustable in Homekit.
Screenshots
If applicable, add screenshots to help explain your problem.

Device info (please complete the following information, which can be found in log):
request path = /v1.0/iot-01/associated-users/devices

path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands

device model:
image

Device functions (please complete the following information, which can be found in log):
request path = /v1.0/devices/functions
Same device Id, like this:

"commands":[{"code":"temp_value","value":0}]}

Additional context
full log (some sensitive data was removed):

TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyacn.com, path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands, params = null, body = {"commands":[{"code":"temp_value","value":241}]}, headers = {"t":"1635049344850","client_id":"","nonce":"8b7b03d0-346c-11ec-b345-b3fc3343cac3","Signature-Headers":"client_id","sign":"","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.4.2"}
TuyaOpenAPI response: {"result":true,"success":true,"t":1635049345050} path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyacn.com, path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands, params = null, body = {"commands":[{"code":"temp_value","value":247}]}, headers = {"t":"1635049345162","client_id":"
","nonce":"8b7b03d0-346c-11ec-b345-b3fc3343cac3","Signature-Headers":"client_id","sign":"","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.4.2"}
TuyaOpenMQ onMessage: topic = cloud/token/in/c92dc2016ec72fb05c446ab32cfe2b15, message = {"data":{"dataId":"bed14273-9239-42ff-a783-b4cd952fb866","devId":"6ce506708ec1125e7fbdr2","productKey":"ygmlkb8h","status":[{"4":241,"code":"temp_value","t":"1635049344","value":241}]},"protocol":4,"pv":"2.0","sign":"
","t":1635049344}
TuyaOpenAPI response: {"result":true,"success":true,"t":1635049345380} path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyacn.com, path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands, params = null, body = {"commands":[{"code":"temp_value","value":251}]}, headers = {"t":"1635049345420","client_id":"
","nonce":"8b7b03d0-346c-11ec-b345-b3fc3343cac3","Signature-Headers":"client_id","sign":"","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.4.2"}
TuyaOpenAPI response: {"result":true,"success":true,"t":1635049345676} path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands
TuyaOpenMQ onMessage: topic = cloud/token/in/c92dc2016ec72fb05c446ab32cfe2b15, message = {"data":{"dataId":"0c05bcb5-b701-4562-9049-671918429645","devId":"6ce506708ec1125e7fbdr2","productKey":"ygmlkb8h","status":[{"4":247,"code":"temp_value","t":"1635049344","value":247}]},"protocol":4,"pv":"2.0","sign":"
","t":1635049344}
TuyaOpenMQ onMessage: topic = cloud/token/in/c92dc2016ec72fb05c446ab32cfe2b15, message = {"data":{"dataId":"7c67fc47-5296-4d66-922a-a651bbdab8c1","devId":"6ce506708ec1125e7fbdr2","productKey":"ygmlkb8h","status":[{"4":251,"code":"temp_value","t":"1635049345","value":251}]},"protocol":4,"pv":"2.0","sign":"","t":1635049345}
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyacn.com, path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands, params = null, body = {"commands":[{"code":"temp_value","value":6}]}, headers = {"t":"1635049347588","client_id":"
","nonce":"8b7b03d0-346c-11ec-b345-b3fc3343cac3","Signature-Headers":"client_id","sign":"","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.4.2"}
TuyaOpenAPI response: {"result":true,"success":true,"t":1635049347772} path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyacn.com, path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands, params = null, body = {"commands":[{"code":"temp_value","value":0}]}, headers = {"t":"1635049347887","client_id":"
","nonce":"8b7b03d0-346c-11ec-b345-b3fc3343cac3","Signature-Headers":"client_id","sign":"","sign_method":"HMAC-SHA256","access_token":"","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.4.2"}
TuyaOpenMQ onMessage: topic = cloud/token/in/c92dc2016ec72fb05c446ab32cfe2b15, message = {"data":{"dataId":"691c2c33-f3cc-4f6d-b67b-0ac72015198a","devId":"6ce506708ec1125e7fbdr2","productKey":"ygmlkb8h","status":[{"4":6,"code":"temp_value","t":"1635049347","value":6}]},"protocol":4,"pv":"2.0","sign":"
","t":1635049347}
TuyaOpenAPI response: {"result":true,"success":true,"t":1635049348082} path = /v1.0/devices/6ce506708ec1125e7fbdr2/commands
TuyaOpenMQ onMessage: topic = cloud/token/in/c92dc2016ec72fb05c446ab32cfe2b15, message = {"data":{"dataId":"1521ffd9-8636-47f4-8b00-b0809a1f2575","devId":"6ce506708ec1125e7fbdr2","productKey":"ygmlkb8h","status":[{"4":0,"code":"temp_value","t":"1635049347","value":0}]},"protocol":4,"pv":"2.0","sign":"***","t":1635049347}

@XiaoTonyLuo XiaoTonyLuo added the bug Something isn't working label Oct 24, 2021
@github-actions
Copy link

Thank you for your feedback, we will solve this issue soon

@XiaoTonyLuo XiaoTonyLuo changed the title homekit光色映射与tuya platform不一致/homekit color map not match with tuya platform homekit光色映射与tuya platform不一致/homekit color temperature map not match with tuya platform Oct 24, 2021
@XiaoTonyLuo
Copy link
Author

XiaoTonyLuo commented Oct 24, 2021

补充:在tuya iot platform上看到此设备类别是"dj",而代码中"dj"的色温范围是0-255
image
image
tuya platform设备调试信息
image

@XiaoTonyLuo
Copy link
Author

继续update:
在iot_platform中dj类别有两种色温状态/指令集:temp_value,取值0-255和temp_value_v2,取值0-1000,此设备在平台上的色温指令集为temp_value,但取值为0-1000,请问是否是这个设备在平台上的模型有问题吗?应该怎样修改呢?

image

image

@Hanh94
Copy link
Contributor

Hanh94 commented Nov 2, 2021

Hi @XiaoTonyLuo , Sorry for the late reply.
We are aware of your problem. The dp code set on your device is not the standard dp in the standard instruction set due to historical reasons.
please create a Tuya technical support ticket , we will assist you to modify the corresponding information of the device.

@XiaoTonyLuo
Copy link
Author

Hi @XiaoTonyLuo , Sorry for the late reply. We are aware of your problem. The dp code set on your device is not the standard dp in the standard instruction set due to historical reasons. please create a Tuya technical support ticket , we will assist you to modify the corresponding information of the device.

Hi @Hanh94 , I have created a ticket, please check it and there is also a problem with color temperature and I already created a PR, please take a look as well. Thanks!

@github-actions
Copy link

Stale issue. we will close the issue soon. If this issue has not been resolved, please update the issue and contact us in time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity
Projects
None yet
Development

No branches or pull requests

2 participants