athombv / com.tuya

Tuya app for Homey
https://homey.app/a/com.tuya
17 stars 12 forks source link

[Device request]: Doorbell #176

Closed backmanfredrik closed 1 month ago

backmanfredrik commented 2 months ago

Homey version

Homey Pro (Early 2023) 12.0.1

Tuya app version

v1.2.3

App diagnostics report ID

9c71e19e-fd4c-4483-8095-d9c39e4ef378

Description

I have 2 doorbells that looks exactly as the pictures shows for the tuya app. The devices is however not recognized in the tuya app for homey when i choose "doorbell", the devices is only found if i choose device "other" when adding them in the tuya app for homey.

I've tried both tuya and smart life as "host" app but the problem is the same regardless of what app i use before trying to add them in the homey app. At the moment thet are added through smart life as "host app"

Device specification

The first doorbell has the following device specification:

{
  "device": {
    "active_time": 1720527929,
    "biz_type": 18,
    "category": "sp",
    "create_time": 1720526315,
    "icon": "smart/icon/bay1620273299168sFU6/22d77cf8026d2af52c3bd3b8c2a49214.png",
    "id": "bfd358b7607af7d7bbjarp",
    "ip": "<redacted>",
    "lat": "<redacted>",
    "local_key": "<redacted>",
    "lon": "<redacted>",
    "model": "",
    "name": "Groventré",
    "online": true,
    "owner_id": "<redacted>",
    "product_id": "uv2un0vblqqdaahw",
    "product_name": "Intelligent Doorbell",
    "status": [
      {
        "code": "basic_nightvision",
        "value": "0"
      },
      {
        "code": "sd_storge",
        "value": "100|0|100"
      },
      {
        "code": "sd_status",
        "value": 5
      },
      {
        "code": "sd_format",
        "value": false
      },
      {
        "code": "sd_format_state",
        "value": -20000
      },
      {
        "code": "wireless_electricity",
        "value": 100
      },
      {
        "code": "wireless_lowpower",
        "value": 10
      },
      {
        "code": "record_switch",
        "value": true
      },
      {
        "code": "record_mode",
        "value": "1"
      },
      {
        "code": "doorbell_pic",
        "value": ""
      },
      {
        "code": "initiative_message",
        "value": "eyJ2IjoiNC4wIiwiZmlsZXMiOlt7ImRhdGEiOiJjMWZjYWY0MmJlZDIzYjk2YzQ4YjU5MzQxMDYzMTk4NjQ3MTlhZDczYzJhMmE2YzQ1N2VjOWJjMjdmMmMwNmYzNWYwMWU0NmMxMzM4ZWU5MTNmYTg5OGZjMDkyZGJjODkwNmEyYTA0MjhlNDY0NDM2ZTdjMDY4YTBmNzY5YTc3MmUyYTFhNGI2YTUwNzE4ZmEzMTY0MDlkODBkNmRjZjNhZTU1MDEzMDU1OWFlMWZjNzVmZDM4ODNlNjhkMDUwYTQ4NDIzOGI4MDEyNzljYWIyYjYzYTE5ZDc0OTdhNTQxODFmZWM0NzdiMjE2ZjFlZTc4Y2JiZGU5YTk3ZWI4Yjg3Iiwia2V5SWQiOiJkZWZhdWx0IiwiaXYiOiI0NTIwMTBlYzI4NWNkZjFiNzczNmE0OTJlNjQwMDRiMyJ9XSwiY21kIjoiaXBjX3VuY29ubmVjdGVkIiwidHlwZSI6ImltYWdlIn0="
      }
    ],
    "sub": false,
    "time_zone": "+02:00",
    "uid": "<redacted>",
    "update_time": 1723284755,
    "uuid": "<redacted>"
  },
  "specifications": {
    "category": "sp",
    "functions": [
      {
        "code": "basic_nightvision",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "sd_format",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "wireless_lowpower",
        "type": "Integer",
        "values": "{\"unit\":\"\",\"min\":10,\"max\":20,\"scale\":0,\"step\":1}"
      },
      {
        "code": "record_switch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_mode",
        "type": "Enum",
        "values": "{\"range\":[\"1\"]}"
      }
    ],
    "status": [
      {
        "code": "basic_nightvision",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "sd_storge",
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "sd_status",
        "type": "Integer",
        "values": "{\"min\":1,\"max\":5,\"scale\":0,\"step\":1}"
      },
      {
        "code": "sd_format",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "sd_format_state",
        "type": "Integer",
        "values": "{\"min\":-20000,\"max\":200000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "wireless_electricity",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "wireless_lowpower",
        "type": "Integer",
        "values": "{\"unit\":\"\",\"min\":10,\"max\":20,\"scale\":0,\"step\":1}"
      },
      {
        "code": "record_switch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_mode",
        "type": "Enum",
        "values": "{\"range\":[\"1\"]}"
      },
      {
        "code": "doorbell_pic",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "initiative_message",
        "type": "Raw",
        "values": "{}"
      }
    ]
  },
  "data_points": [
    {
      "code": "basic_nightvision",
      "custom_name": "",
      "dp_id": 108,
      "time": 1720527936275,
      "type": "enum",
      "value": "0"
    },
    {
      "code": "sd_storge",
      "custom_name": "",
      "dp_id": 109,
      "time": 1723284759401,
      "type": "string",
      "value": "100|0|100"
    },
    {
      "code": "sd_status",
      "custom_name": "",
      "dp_id": 110,
      "time": 1723284757404,
      "type": "value",
      "value": 5
    },
    {
      "code": "sd_format",
      "custom_name": "",
      "dp_id": 111,
      "time": 1720526315793,
      "type": "bool",
      "value": false
    },
    {
      "code": "sd_format_state",
      "custom_name": "",
      "dp_id": 117,
      "time": 1720526315793,
      "type": "value",
      "value": -20000
    },
    {
      "code": "wireless_electricity",
      "custom_name": "",
      "dp_id": 145,
      "time": 1723284759439,
      "type": "value",
      "value": 100
    },
    {
      "code": "wireless_lowpower",
      "custom_name": "",
      "dp_id": 147,
      "time": 1720527937000,
      "type": "value",
      "value": 10
    },
    {
      "code": "record_switch",
      "custom_name": "",
      "dp_id": 150,
      "time": 1720527936000,
      "type": "bool",
      "value": true
    },
    {
      "code": "record_mode",
      "custom_name": "",
      "dp_id": 151,
      "time": 1720527937000,
      "type": "enum",
      "value": "1"
    },
    {
      "code": "doorbell_pic",
      "custom_name": "",
      "dp_id": 154,
      "time": 1720527929021,
      "type": "raw"
    },
    {
      "code": "initiative_message",
      "custom_name": "",
      "dp_id": 212,
      "time": 1723284782848,
      "type": "raw",
      "value": "eyJ2IjoiNC4wIiwiYnVja2V0IjoidHktZXUtc3RvcmFnZTYwIiwiY21kIjoiaXBjX3VuY29ubmVjdGVkIiwidHlwZSI6ImltYWdlIiwid2l0aCI6InJlc291cmNlIiwiYWxhcm0iOnRydWUsInRpbWUiOjE3MjMyODQ3ODEsImZpbGVzIjpbWyIvNjliMzgyLTE5NzM1NjUzNC0zYWNkYTRlNjllZmY4YzZmL2NvbW1vbi8xNzIzMjg0NzgyMjYwXzE3MjMyODQ3ODEuanBlZyIsImVhMzU3OWNjNWU1NzQ4ZjciXV19"
    },
    {
      "code": "ipc_recording_time",
      "custom_name": "",
      "dp_id": 231,
      "time": 1720526315793,
      "type": "enum",
      "value": "0"
    },
    {
      "code": "ipc_bk_active",
      "custom_name": "",
      "dp_id": 232,
      "time": 1723284786952,
      "type": "bool",
      "value": false
    },
    {
      "code": "ipc_bk_doorbell",
      "custom_name": "",
      "dp_id": 233,
      "time": 1720527937000,
      "type": "bool",
      "value": false
    },
    {
      "code": "ipc_float_osd",
      "custom_name": "",
      "dp_id": 235,
      "time": 1720526315793,
      "type": "bool",
      "value": false
    },
    {
      "code": "ipc_doorbell_singletalk",
      "custom_name": "",
      "dp_id": 237,
      "time": 1720526315793,
      "type": "bool",
      "value": false
    },
    {
      "code": "offline_show_set",
      "custom_name": "",
      "dp_id": 242,
      "time": 1720526315793,
      "type": "bool",
      "value": false
    },
    {
      "code": "ipc_save_percent",
      "custom_name": "",
      "dp_id": 243,
      "time": 1720526315793,
      "type": "bool",
      "value": false
    }
  ]
}

The second doorbell has the following device specification:

{
  "device": {
    "active_time": 1720528020,
    "biz_type": 18,
    "category": "sp",
    "create_time": 1720516392,
    "icon": "smart/icon/bay1620273299168sFU6/22d77cf8026d2af52c3bd3b8c2a49214.png",
    "id": "bf7e32408694c1f5afcwvt",
    "ip": "<redacted>",
    "lat": "<redacted>",
    "local_key": "<redacted>",
    "lon": "<redacted>",
    "model": "",
    "name": "Huvudentré",
    "online": true,
    "owner_id": "<redacted>",
    "product_id": "uv2un0vblqqdaahw",
    "product_name": "Intelligent Doorbell",
    "status": [
      {
        "code": "basic_nightvision",
        "value": "0"
      },
      {
        "code": "sd_storge",
        "value": "100|0|100"
      },
      {
        "code": "sd_status",
        "value": 5
      },
      {
        "code": "sd_format",
        "value": false
      },
      {
        "code": "sd_format_state",
        "value": -20000
      },
      {
        "code": "wireless_electricity",
        "value": 100
      },
      {
        "code": "wireless_lowpower",
        "value": 10
      },
      {
        "code": "record_switch",
        "value": true
      },
      {
        "code": "record_mode",
        "value": "1"
      },
      {
        "code": "doorbell_pic",
        "value": ""
      },
      {
        "code": "initiative_message",
        "value": "eyJ2IjoiNC4wIiwiZmlsZXMiOlt7ImRhdGEiOiIwMmM2YTc1MWRlYWYxZTU0NDdmMTljMDI1MjBmNThhZTg5MjI3YTQ5YWY4Y2Q3OTY5NDE2YjU5ODJlZjM5ZDQ2MjQ1MzI0MTA2MWI5ODNiMmUxYTY2NjQ1NDRlYWJlZjAyYjc0NTU0ZjE3YWEzMzJlZTMyZjMxNzA2YzE2YzNlZmU3YjJmYWM1NTU5NGFkNjU0MzQ0ZDUxZmJjY2ZhNTY1MmUyMjgzYjc5Njk2MjcxYjY5M2ZlODI0YzM5YmJlMWI4MDgxM2VlYWFjMzNmNGViZjIxMGYzNTc1MjhlZGU3ZTY5OTg1ZjEyZTA0N2I2NzI3NzQ4ZTAwM2ViYzA5Y2EyIiwia2V5SWQiOiJkZWZhdWx0IiwiaXYiOiI0MDNlYWVkMTVhNDc3ZDNlMzA5OWI0MWM3OWRmMWFlMCJ9XSwiY21kIjoiaXBjX3VuY29ubmVjdGVkIiwidHlwZSI6ImltYWdlIn0="
      }
    ],
    "sub": false,
    "time_zone": "+02:00",
    "uid": "<redacted>",
    "update_time": 1720528287,
    "uuid": "<redacted>"
  },
  "specifications": {
    "category": "sp",
    "functions": [
      {
        "code": "basic_nightvision",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "sd_format",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "wireless_lowpower",
        "type": "Integer",
        "values": "{\"unit\":\"\",\"min\":10,\"max\":20,\"scale\":0,\"step\":1}"
      },
      {
        "code": "record_switch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_mode",
        "type": "Enum",
        "values": "{\"range\":[\"1\"]}"
      }
    ],
    "status": [
      {
        "code": "basic_nightvision",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "sd_storge",
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "sd_status",
        "type": "Integer",
        "values": "{\"min\":1,\"max\":5,\"scale\":0,\"step\":1}"
      },
      {
        "code": "sd_format",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "sd_format_state",
        "type": "Integer",
        "values": "{\"min\":-20000,\"max\":200000,\"scale\":0,\"step\":1}"
      },
      {
        "code": "wireless_electricity",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "wireless_lowpower",
        "type": "Integer",
        "values": "{\"unit\":\"\",\"min\":10,\"max\":20,\"scale\":0,\"step\":1}"
      },
      {
        "code": "record_switch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "record_mode",
        "type": "Enum",
        "values": "{\"range\":[\"1\"]}"
      },
      {
        "code": "doorbell_pic",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "initiative_message",
        "type": "Raw",
        "values": "{}"
      }
    ]
  },
  "data_points": [
    {
      "code": "basic_nightvision",
      "custom_name": "",
      "dp_id": 108,
      "time": 1720528027725,
      "type": "enum",
      "value": "0"
    },
    {
      "code": "sd_storge",
      "custom_name": "",
      "dp_id": 109,
      "time": 1720528290565,
      "type": "string",
      "value": "100|0|100"
    },
    {
      "code": "sd_status",
      "custom_name": "",
      "dp_id": 110,
      "time": 1720528289191,
      "type": "value",
      "value": 5
    },
    {
      "code": "sd_format",
      "custom_name": "",
      "dp_id": 111,
      "time": 1720516392210,
      "type": "bool",
      "value": false
    },
    {
      "code": "sd_format_state",
      "custom_name": "",
      "dp_id": 117,
      "time": 1720516392210,
      "type": "value",
      "value": -20000
    },
    {
      "code": "wireless_electricity",
      "custom_name": "",
      "dp_id": 145,
      "time": 1720528290604,
      "type": "value",
      "value": 100
    },
    {
      "code": "wireless_lowpower",
      "custom_name": "",
      "dp_id": 147,
      "time": 1720528029000,
      "type": "value",
      "value": 10
    },
    {
      "code": "record_switch",
      "custom_name": "",
      "dp_id": 150,
      "time": 1720528028000,
      "type": "bool",
      "value": true
    },
    {
      "code": "record_mode",
      "custom_name": "",
      "dp_id": 151,
      "time": 1720528029000,
      "type": "enum",
      "value": "1"
    },
    {
      "code": "doorbell_pic",
      "custom_name": "",
      "dp_id": 154,
      "time": 1720528020167,
      "type": "raw"
    },
    {
      "code": "initiative_message",
      "custom_name": "",
      "dp_id": 212,
      "time": 1720528340272,
      "type": "raw",
      "value": "eyJ2IjoiNC4wIiwiYnVja2V0IjoidHktZXUtc3RvcmFnZTYwIiwiY21kIjoiaXBjX3VuY29ubmVjdGVkIiwidHlwZSI6ImltYWdlIiwid2l0aCI6InJlc291cmNlIiwiYWxhcm0iOnRydWUsInRpbWUiOjE3MjA1MjgzMzksImZpbGVzIjpbWyIvOTFkNWI5LTE5NzM1NjUzNC1hOWI0NzFlNWIyNjU0Nzk3L2NvbW1vbi8xNzIwNTI4MzM5Nzc1XzE3MjA1MjgzMzkuanBlZyIsImY3MDhhZTNmM2I2NTRlYWUiXV19"
    },
    {
      "code": "ipc_recording_time",
      "custom_name": "",
      "dp_id": 231,
      "time": 1720516392210,
      "type": "enum",
      "value": "0"
    },
    {
      "code": "ipc_bk_active",
      "custom_name": "",
      "dp_id": 232,
      "time": 1720528363783,
      "type": "bool",
      "value": false
    },
    {
      "code": "ipc_bk_doorbell",
      "custom_name": "",
      "dp_id": 233,
      "time": 1720528029000,
      "type": "bool",
      "value": false
    },
    {
      "code": "ipc_float_osd",
      "custom_name": "",
      "dp_id": 235,
      "time": 1720516392210,
      "type": "bool",
      "value": false
    },
    {
      "code": "ipc_doorbell_singletalk",
      "custom_name": "",
      "dp_id": 237,
      "time": 1720516392210,
      "type": "bool",
      "value": false
    },
    {
      "code": "offline_show_set",
      "custom_name": "",
      "dp_id": 242,
      "time": 1720516392210,
      "type": "bool",
      "value": false
    },
    {
      "code": "ipc_save_percent",
      "custom_name": "",
      "dp_id": 243,
      "time": 1720516392210,
      "type": "bool",
      "value": false
    }
  ]
}
bobvandevijver commented 2 months ago

From the log you submitted I can see that they were shown when you tried to add a doorbell (please make sure to wait for a couple of seconds until either the devices are shown, of a message is shown that no new devices have been found).

backmanfredrik commented 2 months ago

@bobvandevijver thats not the case. They arent found as doorbells, they are only discovered if i try to add them as other.

attached some prt.screens.

"picture 1" - this is whats shown when trying to add them as doorbells "picture 2" - this is showing that i choose "other" "picture 3" - the devices are found when searching for other

The text is in swedish but hopefully it shows that they are found when searching for other and not doorbell picture 3 picture 2 picture 1

bobvandevijver commented 2 months ago

I see, I was a bit trigger happy. The issue here is that your doorbell does not have the doorbell_active state, which means that it wouldn't work with the current doorbell. We will need to investigate this and how we can properly support these.