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

Kt adapter #150

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Kt adapter #150

wants to merge 4 commits into from

Conversation

whenyoucan
Copy link

add support for air conditioner type (category: kt)

@imeSven
Copy link

imeSven commented Jul 13, 2022

hello, does this work ? i have a kt air conditioner but not works :( tried all

[7/13/2022, 9:47:41 PM] Homebridge v1.5.0 (HAP v0.10.2) (Homebridge 7696) is running on port 51017.
TuyaOpenAPI response: {"result":{"access_token":"c0a1b63a527a45a87440adc4436dc23c","expire_time":7200,"platform_url":"https://openapi.tuyaeu.com","refresh_token":"5bb9c4f8ce78edb0df03e586166230be","uid":"eu1656951052981jZMqh"},"success":true,"t":1657738061997,"tid":"46a0415402dc11edbf837eeb5c0b2a19"} path = /v1.0/iot-01/associated-users/actions/authorized-login
TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaeu.com, path = /v1.0/iot-01/associated-users/devices, params = {"size":100}, body = null, headers = {"t":"1657738062021","client_id":"j8e4tuc77yck3ktgr7xd","nonce":"467f6c50-02dc-11ed-886e-cfc85787cf5e","Signature-Headers":"client_id","sign":"2C26B76541C184BD6660D85CB94AA56B10829AF4AAA40CC0562483D582062711","sign_method":"HMAC-SHA256","access_token":"c0a1b63a527a45a87440adc4436dc23c","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}
TuyaOpenAPI response: {"result":{"devices":[{"active_time":1656959850,"biz_type":0,"category":"kt","create_time":1655497697,"icon":"smart/icon/ay1490665601168Tqur3/cea094c0a0387f788198597b1f74a5b1.png","id":"bff3e73608102d58dcdnv0","ip":"86.121.75.93","lat":"44.4843","local_key":"17d34597d7ad22a5","lon":"26.0984","model":"","name":"Air conditioner living ","online":true,"owner_id":"60478870","product_id":"u9jjsaluqe1trtxv","product_name":"TCL 外销USB转接板","status":[{"code":"switch","value":true},{"code":"temp_set","value":260},{"code":"temp_current","value":26},{"code":"mode","value":"cold"},{"code":"humidity_current","value":0},{"code":"temp_set_f","value":61}],"sub":false,"time_zone":"+03:00","uid":"eu1656951052981jZMqh","update_time":1656959873,"uuid":"cb987d99ea3bb431"}],"has_more":false,"last_row_key":"A1C68A4C582452EC4050B8767B61FB11","total":1},"success":true,"t":1657738062197,"tid":"46c282c402dc11ed8210daf929f70cab"} path = /v1.0/iot-01/associated-users/devices
TuyaOpenAPI request: method = get, endpoint = https://openapi.tuyaeu.com, path = /v1.0/devices/functions, params = {"device_ids":"bff3e73608102d58dcdnv0"}, body = null, headers = {"t":"1657738062220","client_id":"j8e4tuc77yck3ktgr7xd","nonce":"467f6c50-02dc-11ed-886e-cfc85787cf5e","Signature-Headers":"client_id","sign":"6CA7B93AC10FA0A170D3831AE40A2CB8F2D106BAC840A1AF3163CED5C7315F7D","sign_method":"HMAC-SHA256","access_token":"c0a1b63a527a45a87440adc4436dc23c","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}
TuyaOpenAPI response: {"result":[{"category":"kt","devices":["bff3e73608102d58dcdnv0"],"functions":[{"code":"switch","desc":"switch","name":"switch","type":"Boolean","values":"{}"},{"code":"temp_set","desc":"temp set","name":"temp set","type":"Integer","values":"{"unit":"℃","min":160,"max":880,"scale":1,"step":5}"},{"code":"mode","desc":"mode","name":"mode","type":"Enum","values":"{"range":["cold","hot","wet","wind","auto"]}"},{"code":"temp_set_f","desc":"temp set f","name":"temp set f","type":"Integer","values":"{"unit":"℉","min":61,"max":88,"scale":0,"step":1}"}],"product_id":"u9jjsaluqe1trtxv"}],"success":true,"t":1657738062333,"tid":"46db312b02dc11ed88969287a6a8350d"} path = /v1.0/devices/functions
Adding: Air conditioner living (kt / bff3e73608102d58dcdnv0)
TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaeu.com, path = /v1.0/iot-03/open-hub/access-config, params = null, body = {"uid":"eu1656951052981jZMqh","link_id":"4687a9b0-02dc-11ed-886e-cfc85787cf5e","link_type":"mqtt","topics":"device","msg_encrypted_version":"1.0"}, headers = {"t":"1657738062354","client_id":"j8e4tuc77yck3ktgr7xd","nonce":"467f6c50-02dc-11ed-886e-cfc85787cf5e","Signature-Headers":"client_id","sign":"849DCB43F1CE3A1356D4B5EED0C627192EB2125D667C3897B7F92983F8EA52F1","sign_method":"HMAC-SHA256","access_token":"c0a1b63a527a45a87440adc4436dc23c","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}
TuyaOpenAPI response: {"result":{"client_id":"cloud_c3d1c26ce6ef6d7d8a4efc45ef9917ef","expire_time":7200,"password":"f5ba536280e068b8bae725f4fa772658","sink_topic":{"device":"cloud/token/out/{device_id}"},"source_topic":{"device":"cloud/token/in/bcc3cffbbfac7f581de15050a72dac17"},"url":"ssl://m1.tuyaeu.com:8883","username":"cloud_bcc3cffbbfac7f581de15050a72dac17"},"success":true,"t":1657738062475,"tid":"46ef841602dc11ed88969287a6a8350d"} path = /v1.0/iot-03/open-hub/access-config
TuyaOpenMQ connecting: ssl://m1.tuyaeu.com:8883
TuyaOpenMQ connected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants