Currently, I am developing an integration between a Tuya Smart Lock and my SaaS using the IoT Core API.
However, I am encountering an issue:
- The device pairs normally via the Tuya Smart Life app.
- I linked the Smart Life account to the App Authorization under the Devices tab in the Tuya Developer Dashboard to sync the device to my project's device
- I have already subscribed to both IoT Core and Smart Home Basic Service API services in my Tuya Cloud project.
- However, after transferring space for the device, when I try to execute the "Operate Smart Lock" command via the API endpoint:
Code: Select all
POST /v1.1/devices/{device_id}/door-lock/password-free/open-door - The API returns a user not exist error.
This happens even though the user (the projectId configured in my Tuya API SDK environment) has already been linked to the Smart Life account.
Could this error be caused by managing the device using the /v2.0/cloud/space APIs? Do I need to explicitly bind the device to a specific room (bind to room) within that space for the user permissions to take effect?