Skip to content

Add support for v2.0 Device Control API #49

Description

@asafhas

The current version of the SDK only supports v1.0 APIs.
Some new devices require support for v2.0 APIs to have full control.
I've tried to add the support in the code, but it looks like these APIs are not mapped in the Tuya gateway server. So we may need help from Tuya team. Opened ticket to Tuya support team, and they suggested to take it to here, to @shihuimiao .

In my case, I am trying to add full control for a video doorbell intercom.
We've recently added support in Home-Assistant to receive incoming call events (thanks to @epenet).
However, remotely opening the door cannot be done with the standard DPs.
I was able to get it working from the Tuya Cloud API Explorer like this:

  1. Query the device properties: /v2.0/cloud/thing/{device_id}/shadow/properties
    Received these properties:
    {
       "code": "accessory_lock",
       "custom_name": "",
       "dp_id": 148,
       "time": 1766402042441,
       "type": "bool",
       "value": false
    },
    {
       "code": "accessory_lock2",
       "custom_name": "",
       "dp_id": 232,
       "time": 1766401468234,
       "type": "bool",
       "value": false
    }
  1. Open the device video stream. For some reason, this was only needed for lock#1 and not for lock#2.
  2. Send new property value: /v2.0/cloud/thing/{device_id}/shadow/properties/issue
{
  "properties": "{\"accessory_lock\":true}"
}

The request here is to add a mapping of the above APIs in the Tuya server, so we can add the support to the SDK, and then to Home-Assistant.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions