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

1104 "type is incorrect" error for tuya curtains #224

Closed
jamiehannaford opened this issue Feb 11, 2022 · 6 comments
Closed

1104 "type is incorrect" error for tuya curtains #224

jamiehannaford opened this issue Feb 11, 2022 · 6 comments

Comments

@jamiehannaford
Copy link

Describe the bug

When I try opening or closing a Tuya-controlled curtain in the Homekit app, a 1104 error appears. I can't get the payload to work.

When I go to debug the device in the IOT portal, the following payload works:

[
  {
    "code": "mach_operate",
    "value": "ZZ"
  },
  {
    "code": "opposite",
    "value": false
  },
  {
    "code": "position",
    "value": 0
  }
]

Login request

TuyaOpenAPI request: method = post, endpoint = https://openapi.tuyaeu.com, path = /v1.0/devices/10670875bcddc2b114d3/commands, params = null, body = {"commands":[{"code":"position","value":"100"}]}, headers = {"t":"1644611214886","client_id":"mqythjf9bc4cz5bg9rmx","nonce":"ae5ecbe1-8b77-11ec-aaeb-ff114777ffe5","Signature-Headers":"client_id","sign":"8527755E195944454DF83DB68DBA4647566E909C2D3487433169595C6CF55781","sign_method":"HMAC-SHA256","access_token":"74547bb70170da73e70d10cdebb24194","lang":"en","dev_lang":"javascript","dev_channel":"homebridge","devVersion":"1.5.0"}

TuyaOpenAPI response

{"code":1104,"msg":"type is incorrect","success":false,"t":1644611214988} path = /v1.0/devices/10670875bcddc2b114d3/commands
@jamiehannaford
Copy link
Author

I think the plugin is currently setting the position value as a string, when it should be an integer.

@jamiehannaford
Copy link
Author

This was changed in aafb254#diff-ebd9cffb8f5a32e9dbb8a5e2849694549163ca98137b09226492b77b1ee1732cR95-R97

@Hanh94 any idea why position was changed to a string? The Tuya API does not seem to accept it now, only numbers.

@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.

@jamiehannaford
Copy link
Author

Bump

@alvarezb
Copy link

alvarezb commented May 8, 2022

I ran into the same issue, and created a pull request to resolve it: #241

Thank you for doing all the troubleshooting work @jamiehannaford!

@github-actions
Copy link

github-actions bot commented Jul 7, 2022

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
Projects
None yet
Development

No branches or pull requests

2 participants