Open orpa7 opened 1 year ago
Is it reversed in Tuya App? And have you set the 'reverse mode' on in the App?
'cl' and 'clkg' are using exactly the same code, so the issue may caused by one of the reason:
works fine in the smartlife App, "open" and "close" work correctly, but clkg shows 100% when open, cl shows 0% when open. I cant see where to set a "reverse mode" in the app. Thanks for the fast answer!
The device control panel in Tuya App is product-related, different product in one category can have different control panels. The panel is developed by tuya or device manufactor. But the plugin here is category-related, I need to write one code to support all of the products in the same category, that requires the products having the same behavior (schema).
Can you upload the device info and homebridge debug logs? Please see readme troubleshooting section. and do some actions like open and close during collecting the logs. I'm not 100% sure if the problem is from the plugin code, or your device's schema definition is wrong.
clkg-TuyaDeviceList.{uid}.json.txt cl-TuyaDeviceList.{uid}.json.txt
by the way, just for curtains I use another plugin, which is compatible and capable of hiding all other devices:: TuyaWebPlatform @milo526/homebridge-tuya-web v1.1.2 this plugin recognizes cl and clkg correctly (not reversed)
Can you upload the homebridge debug logs too? Do some actions open and close during collecting the logs.
beta.17 adds the reverse mode detection. if there's the reverse setting on the app, it will automaticly adapted. if not, you can use advanced option to reverse the state, example here: https://github.com/0x5e/homebridge-tuya-platform/blob/develop_1.7.0/ADVANCED_OPTIONS.md#reverse-curtain-motors-onoff-state
Yes, curtain cl can be reversed with manual override. Open stat is ok, opening and closing work. Just when totally closed it tells "closing...". I think that can maybe corrected with manual setting of range values. Here is my override setting:
"deviceOverrides": [
{
"id": "global",
"category": "cl",
"schema": [
{
"oldCode": "percent_control",
"code": "percent_control",
"type": "Integer",
"onGet": "(100 - value)",
"onSet": "(100 - value)"
},
{
"oldCode": "percent_state",
"code": "percent_state",
"type": "Integer",
"onGet": "(100 - value)",
"onSet": "(100 - value)"
}
]
}
You mean fully open status is ok, and fully closed status is always closing? can you post these two different status from device json? you can fully opened the curtain, then restart homebridge, after plugin log shows the device json path, get status from json. and fully close the curtain , do the same thing again..
curtain switch (cl) is working reversed (open=closed and closed=open) curtain switch (clkg) is ok normal behavior