PlusPlus-ua / ha_tuya_ble

Home Assistant support for Tuya BLE devices
MIT License
186 stars 132 forks source link

Intergration for Arlec Smart Button - SG022HA #63

Open Wolfieeewolf opened 1 year ago

Wolfieeewolf commented 1 year ago

Arlec Smart Button - SG022HA

Requires a SG120HA HUB to work. Hub only comes as a bundle. Unsure what module is inside. Possible Tasmota hackable. Device is sealed tight

Smart Buttons uses a ers-10tBBvB-aa_v1.2 module.

For complete teardown see here

Instruction Set - from Tuya IOT

switch_mode1 | Enum | { "range": [ "click", "double_click", "press" ] } -- | -- | -- battery_percentage | Integer | { "unit": "%", "min": 0, "max": 100, "scale": 0, "step": 1 }

Data points

Button - code: "1" Battery - code: "10"

Not sure what other information you require. Let me know if you need anything else and I will see what I can dig up

Wolfieeewolf commented 1 year ago
{
  "result": {
    "active_time": 1691238358,
    "category": "wxkg",
    "create_time": 1691238358,
    "custom_name": "",
    "icon": "smart/icon/ay1536534747810ekKBj/165274452847437e4bd75.png",
    "id": "***********",
    "ip": "",
    "is_online": true,
    "lat": "********",
    "local_key": "",
    "lon": "*******",
    "model": "SG120HA-B",
    "name": "Smart Button",
    "product_id": "kpzc6pm8",
    "product_name": "Smart Button",
    "sub": true,
    "time_zone": "+10:00",
    "update_time": 1691238358,
    "uuid": "********"
  },
  "success": true,

}

and

{
  "result": {
    "properties": [
      {
        "code": "switch1_value",
        "custom_name": "",
        "dp_id": 1,
        "time": 1692060366612,
        "value": "single_click"
      },
      {
        "code": "battery_percentage",
        "custom_name": "",
        "dp_id": 10,
        "time": 1692030334285,
        "value": 83
      }
    ]
  },
  "success": true,

}