Open VinneyUK opened 1 year ago
There are two type of blinds wich conflict definition, type A defines 0%-100% as close precent, type B defined 0%-100% as open precent, and I couldn't find the way to differ them. Why tuya app can differ them is because type A and type B are using different device panel, different implementation code, but plugin only have one implementation code.
Currently one of them have to manually add configs to reverse the state: https://github.com/0x5e/homebridge-tuya-platform/blob/develop_1.7.0/ADVANCED_OPTIONS.md#reverse-curtain-motors-onoff-state
edit your JSON config, I followed the advice on the main post. my config: ( Insert your own device ID's of course ) { "options": { "projectType": "2", "accessId": "xxx", "accessKey": "xxx", "countryCode": 1, "username": "xxx", "password": "xxx", "appSchema": "tuyaSmart", "deviceOverrides": [ { "id": "eb912a59fe2a7341e5flwn", "schema": [ { "code": "percent_control", "onGet": "(100 - value)", "onSet": "(100 - value)" }, { "code": "percent_state", "onGet": "(100 - value)", "onSet": "(100 - value)" } ] }, { "id": "eb3cbf158968e5f9f0kt4b", "schema": [ { "code": "percent_control", "onGet": "(100 - value)", "onSet": "(100 - value)" }, { "code": "percent_state", "onGet": "(100 - value)", "onSet": "(100 - value)" } ] }, { "id": "eb72a257f0708a9f44zpns", "schema": [ { "code": "percent_control", "onGet": "(100 - value)", "onSet": "(100 - value)" }, { "code": "percent_state", "onGet": "(100 - value)", "onSet": "(100 - value)" } ] }, { "id": "ebd51697eae7f16748vxwd", "schema": [ { "code": "percent_control", "onGet": "(100 - value)", "onSet": "(100 - value)" }, { "code": "percent_state", "onGet": "(100 - value)", "onSet": "(100 - value)" } ] }, { "id": "eb1da0dd43d1c0eb15bzxe", "category": "hidden", "schema": [ { "type": "Boolean" } ] } ] }, "_bridge": { "username": "0E:11:B5:66:6B:2B", "port": 43176 }, "platform": "TuyaPlatform" }
Describe the bug Blind in HomeKit say CLOSED (when actual blind is CLOSED) but in TUPA app says OPEN
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Device info
[2/19/2023, 3:14:10 PM] [TuyaPlatform] [Office Blinds] [WindowCovering/undefined/CurrentPosition] Update value: 0 => 100 [2/19/2023, 3:14:10 PM] [TuyaPlatform] [Office Blinds] [WindowCovering/undefined/PositionState] Update value: 1 => 2 [2/19/2023, 3:14:12 PM] [Hue] Philips hue: request 15: GET /lights [2/19/2023, 3:14:12 PM] [Hue] Philips hue: request 15: 200 OK [2/19/2023, 3:14:16 PM] [TuyaPlatform] [TuyaOpenAPI] Request: method = post endpoint = https://openapi.tuyaeu.com path = /v1.0/devices/0006317224a160234f1c/commands query = null headers = { "t": "1676819656995", "client_id": "rkwsnttnr8f7scu8g5fw", "nonce": "667d66b6-ca48-426d-af84-2bd8f71490c2", "Signature-Headers": "client_id", "sign": "7AEE0BE177B7D7E458EEF9BE0E0BEEBFFDF05995D84B1D144903058EB9AE11E3", "sign_method": "HMAC-SHA256", "access_token": "908e6a907e9b64b7bd20f149c143b5ba", "lang": "en", "dev_lang": "javascript", "dev_channel": "homebridge", "devVersion": "1.7.0-beta.28" } body = { "commands": [ { "code": "percent_control", "value": 0 } ] } [2/19/2023, 3:14:17 PM] [TuyaPlatform] [TuyaOpenAPI] Response: path = /v1.0/devices/0006317224a160234f1c/commands data = { "result": true, "success": true, "t": 1676819657152, "tid": "13a48c76b06811edaee5be2f74bef187" } [2/19/2023, 3:14:17 PM] [TuyaPlatform] [TuyaOpenMQ] onMessage: topic = cloud/token/in/2d60bcb0032580266a1f2fae28afe9ca protocol = 4 message = { "dataId": "621fff8e-7ff3-450a-a994-2039c563f456", "devId": "0006317224a160234f1c", "productKey": "djgodnktzcudfrlb", "status": [ { "2": 0, "code": "percent_control", "t": "1676819656", "value": 0 } ] } t = 1676819656 [2/19/2023, 3:14:17 PM] [TuyaPlatform] [Office Blinds] [WindowCovering/undefined/PositionState] Update value: 2 => 0 [2/19/2023, 3:14:17 PM] [TuyaPlatform] [TuyaOpenMQ] onMessage: topic = cloud/token/in/2d60bcb0032580266a1f2fae28afe9ca protocol = 4 message = { "dataId": "83a74241-97ae-4fe7-a9bf-03bc4b3cebbb", "devId": "0006317224a160234f1c", "productKey": "djgodnktzcudfrlb", "status": [ { "7": "opening", "code": "work_state", "t": "1676819656", "value": "opening" } ] } t = 1676819656 [2/19/2023, 3:14:17 PM] [Hue] Philips hue: request 16: GET /lights [2/19/2023, 3:14:17 PM] [Hue] Philips hue: request 16: 200 OK [2/19/2023, 3:14:19 PM] [TuyaPlatform] [TuyaOpenMQ] onMessage: topic = cloud/token/in/2d60bcb0032580266a1f2fae28afe9ca protocol = 4 message = { "dataId": "055c3ecb-d0d2-4498-8afd-416e61725363", "devId": "0006317224a160234f1c", "productKey": "djgodnktzcudfrlb", "status": [ { "3": 0, "code": "percent_state", "t": "1676819659", "value": 0 } ] } t = 1676819659 [2/19/2023, 3:14:19 PM] [TuyaPlatform] [Office Blinds] [WindowCovering/undefined/CurrentPosition] Update value: 100 => 0 [2/19/2023, 3:14:19 PM] [TuyaPlatform] [Office Blinds] [WindowCovering/undefined/PositionState] Update value: 0 => 2 [2/19/2023, 3:14:22 PM] [Hue] Philips hue: request 17: GET /lights [2/19/2023, 3:14:22 PM] [Hue] Philips hue: request 17: 200 OK