0x5e / homebridge-tuya-platform

Make homebridge-tuya-platform great again.
MIT License
206 stars 58 forks source link

Tuya Smart Lock With camera unsupported #363

Open tomzt opened 10 months ago

tomzt commented 10 months ago

Prerequisite

Cache

Version

v1.7.0-beta.49

Device Infomation JSON File

{
  "active_time": 1692445743,
  "biz_type": 18,
  "category": "jtmspro",
  "create_time": 1692445743,
  "icon": "smart/icon/ay1547457421489gOxPi/b1ba3fa16c281af8cf2fc0f38b83136e.png",
  "id": "ebd3-------gha",
  "ip": "49.---.---.193",
  "lat": "",
  "local_key": "3K--------K",
  "lon": "",
  "model": "",
  "name": "ประตูหน้า",
  "online": true,
  "owner_id": "14-------55",
  "product_id": "8ho----------naa",
  "product_name": "sLOCK-CAP",
  "status": [
    {
      "code": "unlock_fingerprint",
      "value": 1
    },
    {
      "code": "unlock_password",
      "value": 2
    },
    {
      "code": "unlock_temporary",
      "value": 0
    },
    {
      "code": "unlock_dynamic",
      "value": 0
    },
    {
      "code": "unlock_card",
      "value": 0
    },
    {
      "code": "unlock_face",
      "value": 0
    },
    {
      "code": "alarm_lock",
      "value": "wrong_finger"
    },
    {
      "code": "unlock_request",
      "value": 0
    },
    {
      "code": "battery_state",
      "value": "medium"
    },
    {
      "code": "unlock_app",
      "value": 970
    },
    {
      "code": "hijack",
      "value": false
    },
    {
      "code": "doorbell",
      "value": false
    },
    {
      "code": "unlock_hand",
      "value": 0
    },
    {
      "code": "unlock_finger_vein",
      "value": 0
    },
    {
      "code": "unlock_offline_pd",
      "value": ""
    },
    {
      "code": "unlock_offline_clear",
      "value": ""
    },
    {
      "code": "lock_allow_delete",
      "value": false
    },
    {
      "code": "remote_no_pd_setkey",
      "value": "AAAB"
    },
    {
      "code": "remote_no_dp_key",
      "value": "AAAB"
    },
    {
      "code": "video_request_realtime",
      "value": ""
    },
    {
      "code": "initiative_message",
      "value": "eyJ2IjoiNS4wIiwiZmlsZXMiOlt7ImRhdGEiOiIyOWY3NGU0ZjQ3MGNjZWNiMjYwODVlN2M0MmE1NmIxNWViM2U2NTMwMjQwZTRiZjJiZGIwZGRhZDIzZDVhZDc4MGY4ZjUxNzJkNTk4ZTUwYjc2NTAyMDQ4MGE5ODg2ZWQ3YmU5NmIyNGQ3NDJkOWY1ODY3NzkzZGVmYzYzYzUxZjI3NzBhNjdmNG-------iN2QwN2RlODI1NzJmMjVlN2RlNjAyMTBjMTkzNjc5ZDYzNjBlMjVkYWEyYTc0YTY4ODA3ODZlYjEzMWNlMTE3ODA3Yjg3ZDgyN2VmZTI5NDI1MDI5NmFmZjVjNjNjNGJkZTgwYWY4Iiwia2V5SWQiOiJkZWZhdWx0IiwiaXYiOiI3NTQ3OGZhYjRiZDJlZWYyNzU0NjljNGFjYTllYTBiNSJ9XSwiY21kIjoiZG9vcl9sb2NrX3ZpZGVvX2NvdmVyIiwidHlwZSI6ImltYWdlIn0="
    }
  ],

Device Control Mode

DP Instruction

Logs

21/2023, 9:41:39 PM] [Tuya] Restoring existing accessory from cache: sLOCK-CAP
[8/21/2023, 9:41:39 PM] [Tuya] [ประตูหน้า] Product Category: jtmspro
[8/21/2023, 9:41:39 PM] [Tuya] [ประตูหน้า] Missing one of the required schema: [ 'open_close', 'closed_opened', 'lock_motor_state' ]
[8/21/2023, 9:41:39 PM] [Tuya] [ประตูหน้า] Please switch device control mode to "DP Insctrution", and set `deviceOverrides` manually.
[8/21/2023, 9:41:39 PM] [Tuya] [ประตูหน้า] Detail information: https://github.com/0x5e/homebridge-tuya-platform#faq
[8/21/2023, 9:41:39 PM] [Tuya] [ประตูหน้า] Existing schema: [
  {
    code: 'alarm_lock',
    mode: 'ro',
    type: 'Enum',
    property: {
      range: [
        'wrong_finger',  'wrong_password',
        'wrong_card',    'wrong_face',
        'tongue_bad',    'too_hot',
        'unclosed_time', 'tongue_not_out',
        'pry',           'key_in',
        'low_battery',   'power_off',
        'shock',         [length]: 13
      ]
    }
  },
  {
    code: 'battery_state',
    mode: 'ro',
    type: 'Enum',
    property: { range: [ 'high', 'medium', 'low', 'poweroff', [length]: 4 ] }
  },
  { code: 'doorbell', mode: 'ro', type: 'Boolean', property: {} },
  { code: 'hijack', mode: 'ro', type: 'Boolean', property: {} },
  { code: 'initiative_message', mode: 'ro', type: 'Raw', property: {} },
  {
    code: 'lock_allow_delete',
    mode: 'ro',
    type: 'Boolean',
    property: {}
  },
  { code: 'photo_again', mode: 'wo', type: 'Boolean', property: {} },
  { code: 'remote_no_dp_key', mode: 'rw', type: 'Raw', property: {} },
  {
    code: 'remote_no_pd_setkey',
    mode: 'rw',
    type: 'Raw',
    property: {}
  },
  {
    code: 'reply_unlock_request',
    mode: 'wo',
    type: 'Boolean',
    property: {}
  },
  {
    code: 'unlock_app',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 999, scale: 0, step: 1 }
  },
  {
    code: 'unlock_card',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 999, scale: 0, step: 1 }
  },
  {
    code: 'unlock_dynamic',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 999, scale: 0, step: 1 }
  },
  {
    code: 'unlock_face',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 999, scale: 0, step: 1 }
  },
  {
    code: 'unlock_finger_vein',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 999, scale: 0, step: 1 }
  },
  {
    code: 'unlock_fingerprint',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 999, scale: 0, step: 1 }
  },
  {
    code: 'unlock_hand',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 999, scale: 0, step: 1 }
  },
  {
    code: 'unlock_offline_clear',
    mode: 'ro',
    type: 'Raw',
    property: {}
  },
  { code: 'unlock_offline_pd', mode: 'ro', type: 'Raw', property: {} },
  {
    code: 'unlock_password',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 999, scale: 0, step: 1 }
  },
  {
    code: 'unlock_request',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 90, scale: 0, step: 1 }
  },
  {
    code: 'unlock_temporary',
    mode: 'ro',
    type: 'Integer',
    property: { min: 0, max: 999, scale: 0, step: 1 }
  },
  {
    code: 'video_request_realtime',
    mode: 'rw',
    type: 'Raw',
    property: {}
  },
  [length]: 23
]
[8/21/2023, 9:41:39 PM] [Tuya] Unsupported device: ประตูหน้า.

Other Infomations

Product https://shopee.co.th/Digital-door-lock-กลอนประตูดิจิตอลกันน้ำ-IP65-สมาร์ทล็อค-smart-door-lock-ใช้ได้ทั้งบานเลื่อน-สวิง-S05HD-S05CA-i.41279122.19669048091

appvitor commented 10 months ago

I believe that #363 #315 #303 and #266 are all the same. Any developments on this? I would love to help anyway as possible.

0x5e commented 10 months ago

Lock, Camera, IR/RF, these categories are special, they are not using dp based api, tuya have lock api, camera api, ir api doing the things. If these products are not supported (which means the cloud api are not compatible with your product), please consider submit the ticket with your device information to tuya platform, I'm afraid I can't help :( @appvitor