make-all / tuya-local

Local support for Tuya devices in Home Assistant
MIT License
1.33k stars 519 forks source link

Request support for BSTUOKEY WiFi Access Control Keypad #1152

Closed mprobber closed 8 months ago

mprobber commented 1 year ago

Log Message

Device matches ceres_plus_petfeeder with quality of 29%. DPS: {"updated_at": 1696693098.6076167, "26": "low", "30": true, "31": 5, "34": 60, "101": true, "102": true, "104": false}

Information about DPS mappings

{
  "modelId": "0000036ng5",
  "services": [
    {
      "actions": [],
      "code": "",
      "description": "",
      "events": [],
      "name": "默认服务", // Default Service
      "properties": [
        {
          "abilityId": 1,
          "accessMode": "rw",
          "code": "unlock_method_create",
          "description": "【必选】配网完成后的正常网络连接状态,进行开门方式的创建操作,支持人脸、指纹、密码、卡、遥控等方式的创建(有物理开门方式必选)\nAPP中添加各种开锁方式", // [Required] The normal network connection state after the distribution network is completed, the creation operation of the door opening method, support the creation of face, fingerprint, password, card, remote control and other methods (must be selected if there is a physical door opening method)\nAdd various unlocking methods in the APP
          "extensions": {
            "iconName": "icon-a_up",
            "attribute": "1888"
          },
          "name": "添加开门方式", // Add a way to open the door
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 2,
          "accessMode": "rw",
          "code": "unlock_method_delete",
          "description": "【必选】配网完成后的正常网络连接状态,进行开门方式的删除操作,支持指纹、密码、卡等方式的删除(有物理开门方式必选)\nAPP中删除各种开锁方式", // [Required] The normal network connection state after the network distribution is completed, delete the door opening method, support the deletion of fingerprints, passwords, cards and other methods (must be selected for physical door opening the door)\nAPP to delete various unlocking methods
          "extensions": {
            "iconName": "icon-dp_rabbish",
            "attribute": "1888"
          },
          "name": "删除开门方式",
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 3,
          "accessMode": "rw",
          "code": "unlock_method_modify",
          "description": "【必选】配网完成后的正常网络连接状态,进行开门方式的修改操作,支持指纹、密码、卡等名称的修改,以及密码内容的修改(有物理开门方式必选)\nAPP中修改各种开锁方式的名称的修改", // [Required] The normal network connection state after the distribution is completed, modify the door opening method, support the modification of fingerprints, passwords, cards and other names, and the modification of password content (must be selected if there is a physical opening method)\n Modify the name of various unlocking methods in the APP
          "extensions": {
            "iconName": "icon-edit",
            "attribute": "1888"
          },
          "name": "修改开门方式", // Modify the opening method
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 4,
          "accessMode": "rw",
          "code": "synch_method",
          "description": "【必选】下发成员同步指令,同步门锁下该成员的所有开门方式(不论是本地添加的还是云端操作异常时云端操作成功的)", // [Required] Issue member synchronization instructions, synchronize the door lock all the door opening methods of the member (whether it is added locally or when the cloud operation is abnormal, the cloud operation is successful)
          "extensions": {
            "iconName": "icon-dp_upload",
            "attribute": "1888"
          },
          "name": "同步开门方式(数据量大)", // Synchronous opening method (large amount of data) Synchronous opening method (large amount of data)
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 5,
          "accessMode": "rw",
          "code": "temporary_password_creat",
          "description": "【可选】管理员有临时密码添加入口,网络正常连接状态下,可创建起止+循环时效或者起止+次数时效的密码", // [Optional] The administrator has a temporary password to add an entrance. In the normal connection state of the network, a password of start and stop + cycle time or start and stop + number of times can be created.
          "extensions": {
            "iconName": "icon-dp_add",
            "attribute": "1376"
          },
          "name": "添加临时密码", // 添加临时密码
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 6,
          "accessMode": "rw",
          "code": "temporary_password_delete",
          "description": "【可选】管理员有临时密码删除入口,网络正常连接状态下,可删除临时密码\n目前只有周期性密码,一次性密码走离线密码", // [Optional] The administrator has a temporary password deletion entrance. In the normal connection state of the network, the temporary password can be deleted\n At present, there is only a periodic password, and the one-time password is an offline password. [Optional] The administrator has a temporary password deletion entrance. In the normal connection state of the network, the temporary password can be deleted\n At present, there is only a periodic password, and the one-time password is an offline password.
          "extensions": {
            "iconName": "icon-dp_rabbish",
            "attribute": "1376"
          },
          "name": "删除临时密码", // Delete the temporary password
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 7,
          "accessMode": "rw",
          "code": "temporary_password_modify",
          "description": "【可选】管理员有临时密码编辑入口,网络正常连接状态下,可编辑修改临时密码\n属于在线密码,离线密码使用dp17上报记录,面板直接获取", // [Optional] The administrator has a temporary password editing entrance. In the normal connection state of the network, you can edit and modify the temporary password\n belongs to the online password. The offline password is reported by dp17, and the panel can be obtained directly.
          "extensions": {
            "iconName": "icon-setting",
            "attribute": "1248"
          },
          "name": "修改临时密码", // Change the temporary password
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 8,
          "accessMode": "rw",
          "code": "remote_no_pd_setkey",
          "description": "【必选】远程开门的新加密机制,该DP需要在配网的时候下发。如果需要APP远程开锁,则该dp必选", // [Required] The new encryption mechanism for remote door opening, the DP needs to be issued when the network is distributed. If you need APP remote unlocking, the dp must be selected. [Required] The new encryption mechanism for remote door opening, the DP needs to be issued when the network is distributed. If you need APP remote unlocking, the dp must be selected.
          "extensions": {
            "iconName": "icon-setting",
            "attribute": "1760"
          },
          "name": "设置免密远程开门密钥", // Set up a password-free remote door opening key
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 9,
          "accessMode": "rw",
          "code": "remote_no_dp_key",
          "description": "【必选】远程开门的新加密机制,该DP需要在远程开门回复时同时发送。如果需要APP远程开锁,则该dp必选", // [Required] The new encryption mechanism for remote opening, the DP needs to be sent at the same time when the remote opening reply. If you need APP remote unlocking, the dp must be selected.
          "extensions": {
            "iconName": "icon-dp_lock",
            "attribute": "1760"
          },
          "name": "新免密远程开门-带密钥", // New password-free remote door opening - with key
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 10,
          "accessMode": "rw",
          "code": "unlock_fingerprint_kit",
          "description": "【可选】指纹通过app录入创建后,由硬件分配id,发生指纹解锁后,门锁将上报该dp点请用记录型上报\n单路门禁和多路门禁需要再记录中区分开", // [Optional] After the fingerprint is created through the app input, the id is assigned by the hardware. After the fingerprint is unlocked, the door lock will report the dp point. Please report it with a record type\n Single access control and multiple access control need to be distinguished in the record.
          "extensions": {
            "iconName": "icon-dp_lock",
            "attribute": "1344"
          },
          "name": "指纹开门记录", // Fingerprint opening record
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 11,
          "accessMode": "rw",
          "code": "unlock_password_kit",
          "description": "【可选】普通密码通过app录入创建后,由硬件分配id,发生普通密码解锁后,门锁将上报该dp点请用记录型上报\n单路门禁和多路门禁需要再记录中区分开", // [Optional] After the ordinary password is created through the app input, the id is assigned by the hardware. After the ordinary password is unlocked, the door lock will report the dp point. Please use the record type to report\n Single access control and multiple access control need to be distinguished in the record.
          "extensions": {
            "iconName": "icon-dp_lock",
            "attribute": "1344"
          },
          "name": "普通密码开门记录", // Ordinary password opening record
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 12,
          "accessMode": "rw",
          "code": "unlock_card_kit",
          "description": "【可选】卡片通过app录入创建后,由硬件分配id,发生卡片解锁后,门锁将上报该dp点请用记录型上报\n单路门禁和多路门禁需要再记录中区分开", // [Optional] After the card is created through the app input, the id is assigned by the hardware. After the card is unlocked, the door lock will report the dp point. Please report it with a record type\n Single access control and multiple access control need to be distinguished in the record.
          "extensions": {
            "iconName": "icon-dp_lock",
            "attribute": "1344"
          },
          "name": "卡片开门记录", // Card opening record
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 16,
          "accessMode": "rw",
          "code": "unlock_temporary_kit",
          "description": "【可选】临时密码开锁记录上报,目前只有周期性密码使用这个DP\n单路门禁和多路门禁需要再记录中区分开", // [Optional] The temporary password unlocking record is reported. At present, only the periodic password uses this DP\n single-way access control and multi-channel access control need to be distinguished in the record.
          "extensions": {
            "iconName": "icon-dp_lock",
            "attribute": "1344"
          },
          "name": "临时密码开门记录", // Temporary password to open the door record
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 17,
          "accessMode": "rw",
          "code": "unlock_offline_pd",
          "description": "【可选】网络异常的离线场景使用,解锁成功后,请使用记录型数据上报", // [Optional] Use offline scenarios with abnormal network. After successful unlocking, please use recorded data to report.
          "extensions": {
            "iconName": "icon-dp_upload",
            "attribute": "1344"
          },
          "name": "离线密码开门记录", // Offline password opening record
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 22,
          "accessMode": "rw",
          "code": "unlock_phone_remote_kit",
          "description": "【必选】配置远程免密解锁是否开启、密钥(次数、时效、内容);\n单路门禁和多路门禁需要再记录中区分开", // [Required] Configure whether the remote password-free unlock is turned on, key (number of times, time limit, content); \n Single access control and multiple access control need to be distinguished in the record.
          "extensions": {
            "iconName": "icon-shouji",
            "attribute": "1344"
          },
          "name": "手机远程开门记录", // Mobile phone remote opening record
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 23,
          "accessMode": "rw",
          "code": "lock_alarm_kit",
          "description": "【可选】0=指纹试错报警、1=密码试错报警、2=卡试错报警、3=人脸试错报警、4=防撬报警、5=未识别开门、6=门铃告警\n单路门禁和多路门禁需要再记录中区分开", // [Optional] 0 = fingerprint error alarm, 1 = password error alarm, 2 = card error alarm, 3 = face error alarm, 4 = anti-pry alarm, 5 = unrecognized door opening, 6 = doorbell alarm\n single-way access control and multi-channel access control need to be distinguished in the record.
          "extensions": {
            "iconName": "icon-dp_warming",
            "attribute": "1216"
          },
          "name": "告警记录", // Alarm record.
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 24,
          "accessMode": "rw",
          "code": "doorbell_song_kit",
          "description": "【可选】支持门铃功能的门锁,在按键后门锁硬件发出门铃声,app收到弹窗提醒。若不想弹窗,仅显示记录,请使用dp19里的门铃告警上报\n关于MCU 上报/下发时机: 解除报警的时候,MCU收到设置的dp时不上报; MCU只有在设备有告警的时候上报", // [Optional] The door lock that supports the doorbell function. After pressing the button, the door lock hardware issues a door ringtone, and the app receives a pop-up reminder. If you don't want to pop up, only display the record, please use the doorbell in dp19 to report\n About the MCU to report/distribution timing: when the alarm is lifted, the MCU will not report when it receives the set dp; MCU will only report when the device has an alarm.
          "extensions": {
            "iconName": "icon-dp_notice",
            "attribute": "1344"
          },
          "name": "门铃呼叫", // Doorbell call
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 26,
          "accessMode": "rw",
          "code": "doorbell_volume",
          "description": "【可选】mute=静音、low=低、normal=普通、high=高音。app设置后,如果硬件收到,\n需要将原设置值返回给服务器。如设置的是high,硬件设置成功返回high,设置失败,不返回", // [Optional] mute = mute, low = low, normal = ordinary, high = treble. After the app is set up, if the hardware is received, \n the original setting value needs to be returned to the server. If the setting is high, the hardware setting returns to high successfully, the setting fails, and does not return.
          "extensions": {
            "iconName": "icon-yinliang",
            "attribute": "1344"
          },
          "name": "门禁音量设置", // Access control volume setting
          "typeSpec": {
            "range": [
              "mute",
              "low",
              "middle",
              "high"
            ],
            "type": "enum",
            "typeDefaultValue": "mute"
          }
        },
        {
          "abilityId": 30,
          "accessMode": "rw",
          "code": "automatic_lock",
          "description": "【可选】自动落锁/不自动落锁,仅使用本dp点,可以实现自动落锁与不自动落锁(即常开模式)的切换\n配合下一个dp自动落锁延时,可组合实现以下功能:\n1、自动关门开(比如开门后10s会自动关门)\n2、自动关门关(需要手动开门)",  // [Optional] Automatic locking/non-automatic locking, only using this dp point, you can switch between automatic locking and non-automatic locking (i.e. normal opening mode)\n With the next dp automatic locking delay, the following functions can be combined to achieve: \n1. Automatically close the door (for example, 10s will automatically close the door after opening the door)\n2. Automatic closing (manually open the door)
          "extensions": {
            "iconName": "icon-power",
            "attribute": "1280"
          },
          "name": "自动落锁开关", // Automatic lock switch
          "typeSpec": {
            "type": "bool",
            "typeDefaultValue": false
          }
        },
        {
          "abilityId": 31,
          "accessMode": "rw",
          "code": "auto_lock_time",
          "description": "【可选】自动关门开启后,需设定每次解锁后距离自动关门之间的延时,下发给门锁本地保存参数,设置时长0到30分钟", // [Optional] After the automatic closing is turned on, you need to set the delay between the automatic closing after each unlocking, and send the local save parameters to the door lock, and the setting time is 0 to 30 minutes.
          "extensions": {
            "iconName": "icon-dp_time3",
            "attribute": "1280"
          },
          "name": "自动落锁时间(秒)", // Automatic locking time (seconds)
          "typeSpec": {
            "max": 99,
            "min": 1,
            "scale": 1,
            "step": 1,
            "type": "value",
            "typeDefaultValue": 1,
            "unit": "S"
          }
        },
        {
          "abilityId": 34,
          "accessMode": "rw",
          "code": "alarm_time",
          "description": "【可选】设置本地产生报警的时长(需设备端支持)", // [Optional] Set the duration of local alarm generation (requires device support)
          "extensions": {
            "iconName": "icon-dp_time2",
            "attribute": "1280"
          },
          "name": "告警时间(分钟)", // Alarm time (minutes)
          "typeSpec": {
            "max": 180,
            "min": 0,
            "scale": 0,
            "step": 10,
            "type": "value",
            "typeDefaultValue": 0,
            "unit": ""
          }
        },
        {
          "abilityId": 35,
          "accessMode": "rw",
          "code": "closed_opened_kit",
          "description": "【可选】门禁硬件上能够判断门开合状态的请勾选该功能(地磁,陀螺仪等),状态变化时,上报对应的值。根据不同的通道门,分别上报当前的状态", // [Optional] If you can judge the opening and closing status of the door on the access control hardware, please check this function (demagnetism, gyroscope, etc.). When the state changes, the corresponding value will be reported. According to the different access gates, the current status is reported separately.
          "extensions": {
            "iconName": "icon-zhuangtai",
            "attribute": "1280"
          },
          "name": "开合状态", // Opening and closing state
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 36,
          "accessMode": "rw",
          "code": "photo_again",
          "description": "【可选】可选择下发此dp通知mcu再次执行抓拍动作", // [Optional] You can choose to send this dp to notify mcu to perform the capture action again.
          "extensions": {
            "iconName": "icon-dp_power2",
            "attribute": "1280"
          },
          "name": "再次抓拍", // Take a picture again.
          "typeSpec": {
            "type": "bool",
            "typeDefaultValue": false
          }
        },
        {
          "abilityId": 38,
          "accessMode": "rw",
          "code": "alarm_channel",
          "description": "【可选】当本地触发报警时,弹窗显示,默认0代表门禁1报警,1为门禁2报警,2为门禁3报警,3为门禁4报警。如若希望只显示告警记录,请使用DP23“告警记录”", // [Optional] When the alarm is triggered locally, the pop-up window shows that the default 0 represents access control 1 alarm, 1 is access control 2 alarm, 2 is access control 3 alarm, and 3 is access control 4 alarm. If you want to display only the alarm record, please use DP23 "Awake Record"
          "extensions": {
            "iconName": "icon-dp_warming",
            "attribute": "1280"
          },
          "name": "告警弹窗", // Alarm pop-up window
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 39,
          "accessMode": "rw",
          "code": "alarm_lifted_kit",
          "description": "【可选】与“告警弹窗”联合选择,当本地触发告警的时候,可APP一键解除,或本地解除告警后同步状态给APP", // [Optional] Jointly select with the "alarm pop-up window". When the alarm is triggered locally, the APP can be released with one click, or the status can be synchronized to the APP after the local alarm is lifted.
          "extensions": {
            "iconName": "icon-dp_warming",
            "attribute": "1280"
          },
          "name": "解除告警", // Release the alarm
          "typeSpec": {
            "maxlen": 128,
            "type": "raw"
          }
        },
        {
          "abilityId": 40,
          "accessMode": "rw",
          "code": "lock_motor_state",
          "description": "【可选】主要用于语音开锁时的落锁状态的回复(目前仅针对单路门禁语音开锁有效)",  // [Optional] It is mainly used for replying to the lock status during voice unlocking (at present, it is only valid for single-way access control voice unlocking)
          "extensions": {
            "iconName": "icon-dp_lock",
            "attribute": "1152"
          },
          "name": "落锁状态", // Locked state
          "typeSpec": {
            "type": "bool",
            "typeDefaultValue": false
          }
        },
        {
          "abilityId": 101,
          "accessMode": "rw",
          "code": "door_bell",
          "description": "门铃", // Doorbell
          "name": "门铃", // Doorbell
          "typeSpec": {
            "type": "bool",
            "typeDefaultValue": false
          }
        },
        {
          "abilityId": 102,
          "accessMode": "rw",
          "code": "error_alarm",
          "description": "错误报警联动", // Error alarm linkage
          "name": "开门试错", // Open the door and try and make mistakes
          "typeSpec": {
            "type": "bool",
            "typeDefaultValue": false
          }
        },
        {
          "abilityId": 103,
          "accessMode": "rw",
          "code": "anti_alarm",
          "description": "防拆报警联动", // Anti-dismantling alarm linkage
          "name": "防拆报警", // Anti-dismantling alarm
          "typeSpec": {
            "type": "bool",
            "typeDefaultValue": false
          }
        },
        {
          "abilityId": 104,
          "accessMode": "rw",
          "code": "open_closedoor",
          "description": "开关门", // Open and close the door
          "name": "开关门", // Open and close the door
          "typeSpec": {
            "type": "bool",
            "typeDefaultValue": false
          }
        },
        {
          "abilityId": 105,
          "accessMode": "rw",
          "code": "doorsensor_alarm",
          "description": "门磁报警", // Door magnetic alarm
          "name": "门磁报警", // Door magnetic alarm
          "typeSpec": {
            "type": "bool",
            "typeDefaultValue": false
          }
        }
      ]
    }
  ]
}

Product ID

5k8h97qska6pf5cm

Information about how the device functions

This devices controls an electric strike lock, either via fingerprint, 125khz RFID, or keypad. It allows the strike to either activate (unlock) or deactivate (lock).

This is the Amazon product info, I could not find any other manuals online

mprobber commented 1 year ago

Wow - incredibly fast work here on this and #1153! Thank you so much! Out of curiosity, what does the release cycle look like for this project?

mprobber commented 1 year ago

I updated my Home Assistant to the version on main, and I’m able to see the lock, see when it’s unlocked and re-locked, but unable to lock and unlock it from home assistant. The status in HA changes, but the status in Smart Life does not, and the lock doesn’t unlock. It’s a wired device, so sleep shouldn’t be an issue. Any idea what could be the issue here?

make-all commented 1 year ago

Perhaps the method to unlock and lock is not as I understood from the information above (toggling dp 104).

There is no fixed release cycle, but usually there will be at least one release a month.

mprobber commented 1 year ago

Sorry - I haven’t dug super deep into the inner workings of Tuya devices, so please forgive me if I’m misunderstanding.

Does dp 104 refer to

        {
          "abilityId": 104,
          "accessMode": "rw",
          "code": "open_closedoor",
          "description": "开关门", // Open and close the door
          "name": "开关门", // Open and close the door
          "typeSpec": {
            "type": "bool",
            "typeDefaultValue": false
          }

In the Query Things Data Model response? The access control can also attach to a door contact sensor, and I would assume that would be the sensor response. But that assumption fails on a few fronts. Namely, the lock status is updated when the door is unlocked (I don’t have a contact sensor set up), and that the accessMode of this is rw.

This seems similar to the device discussed in #796, and the user there reported some success when unlocking with a PIN (after first calling Lock), but I was unable to replicate that by calling Lock Service: Unlock in HA.

make-all commented 1 year ago

The discussion on #796 is about reporting of the door being locked and unlocked by external events. That is different than unlocking and locking the door from Home Assistant. There are different methods that locks use for this, some are a simple switch-like boolean control, others are request-response systems where the remote unlock can only be done within a timeout period of a doorbell or similar event. Some seem to require a password, though that hasn't been implemented yet. There is no sure sign in the dps list above of any of these methods though, the closest seemed to be the "open_closedoor" rw dp. The sensor you are talking about is I think the doorsensor_alarm (which though also documented as rw is also documented as a "magnetic alarm", which I think refers to a reed switch).

mprobber commented 1 year ago

I was just saying the devices seem to be similar (actually, from the same manufacturer), and noting that the “unlock with code” seemed to function, according to a commentor.

Digging into some Tuya docs a bit, dp 8 (remote_no_pd_set_key), and dp 9 (remote_no_dp_key) seem like how the remote unlock occurs. It seems like it’s a request/response system, where you store a temporary code, and then use that code to unlock. But it’s unclear what constitutes a “code” (is any string valid? Is it numbers?) and I’m unsure of how to poke around and test this out on Tuya cloud myself.

make-all commented 1 year ago

It seems likely that this would be the password method of unlocking, which is not yet implemented.

Presumably the intention is for remote_no_pd_set_key to be accessible only by admins, to set the remote unlocking key, and remote_no_dp_key is what apps use to open the door with a password.

make-all commented 10 months ago

Support was added in 2023.10.0 but I forgot to update this issue.

gadiscz commented 10 months ago

Hi, I have the same lock but it says "Sorry, there is no support for this device." what can i do wrong key

make-all commented 10 months ago

Have a look in the Home Assistant log for a message like the one at the top of the page. It isn't necessarily that you did something wrong, the devices are often inconsistent about which dps they report, and we only find this out by trial and error of multiple people trying to get the device working.

gadiscz commented 10 months ago

Device matches None with quality of 0%. DPS: {"updated_at": 1704435630.3274434, "26": "high", "30": true, "31": 3, "34": 15, "102": true, "104": false}

make-all commented 10 months ago

Thanks, it looks like the difference is that the "101": true is missing from what your device is reporting, so we need to make 101 optional.

gadiscz commented 10 months ago

Hello, I have successfully added :-)

Ivanm2114 commented 8 months ago

Hello, I`m trying to add the same lock, but it identifies as Lucking HS06 lock

The log message is Device matches lucking_hs6_lock with quality of 67%. DPS: {"updated_at": 1708070676.4819436, "26": "mute", "30": false, "34": 60}

Ivanm2114 commented 8 months ago

Hello, and still there is no way to control the lock state?

make-all commented 8 months ago

If dp 104 does not work for that, as is configured, then I guess there is no way. I'm not sure what the unlock_phone_remote_kit does, it is possible that is involved as well.

Ivanm2114 commented 8 months ago

Well, I managed to open lock with api requests to tuya smart lock api, but i guess that not the way how tuya-local works

make-all commented 8 months ago

No, that API is cloud based, tuya-local only uses local connections. There may be a way, but because this is an actual secure door lock, not a simple gate lock or child lock, it is not a simple boolean toggle, but maybe something like sending the correct passcode to dp 22 or another "raw" dp.

make-all commented 8 months ago

You could always use a python script that calls the smart lock API for remote unlocking, and tuya-local for monitoring.

Ivanm2114 commented 8 months ago

No, that API is cloud based, tuya-local only uses local connections. There may be a way, but because this is an actual secure door lock, not a simple gate lock or child lock, it is not a simple boolean toggle, but maybe something like sending the correct passcode to dp 22 or another "raw" dp. Yeah, only need to understand what password it need

Ivanm2114 commented 8 months ago

You could always use a python script that calls the smart lock API for remote unlocking, and tuya-local for monitoring.

Yes, but my idea is to use it locally. Thats a pity