0x5e / homebridge-tuya-platform

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

Status Update issue #476

Open Catta1997 opened 5 days ago

Catta1997 commented 5 days ago

Prerequisite

Cache

Version

v1.7.0-beta.53

Device Infomation JSON File

[
  {
    "active_time": 1719849010,
    "biz_type": 18,
    "category": "kt",
    "create_time": 1719849010,
    "icon": "smart/icon.......png",
    "id": "......",
    "ip": "......",
    "lat": ".....",
    "local_key": "......",
    "lon": ".......",
    "model": "HERMES PLUS",
    "name": "HERMES PLUS",
    "online": true,
    "owner_id": "......",
    "product_id": "......",
    "product_name": "HERMES PLUS",
    "status": [
      {
        "code": "Model_ID",
        "value": "C_H"
      },
      {
        "code": "Sleep",
        "value": false
      },
      {
        "code": "fan_speed_enum",
        "value": "Low"
      },
      {
        "code": "fault",
        "value": 0
      },
      {
        "code": "mode",
        "value": "Cool"
      },
      {
        "code": "switch",
        "value": true
      },
      {
        "code": "temp_current",
        "value": 27
      },
      {
        "code": "temp_current_f",
        "value": 81
      },
      {
        "code": "temp_set",
        "value": 25
      },
      {
        "code": "temp_set_f",
        "value": 73
      },
      {
        "code": "temp_unit_convert",
        "value": "c"
      },
      {
        "code": "windshake",
        "value": "ON"
      }
    ],
    "sub": false,
    "time_zone": "+02:00",
    "uid": "......",
    "update_time": .....,
    "uuid": ".....",
    "schema": [
      {
        "code": "Model_ID",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "C",
            "C_H"
          ]
        }
      },
      {
        "code": "Sleep",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "fan_speed_enum",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "Low",
            "Mid",
            "High"
          ]
        }
      },
      {
        "code": "fault",
        "mode": "ro",
        "type": "Bitmap",
        "property": {
          "label": [
            "Rtemp_fault",
            "IPtemp_fault",
            "Water_FULL"
          ],
          "maxlen": 3
        }
      },
      {
        "code": "mode",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "Cool",
            "Dyr",
            "Fan",
            "Heat"
          ]
        }
      },
      {
        "code": "switch",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "temp_current",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "℃",
          "min": 0,
          "max": 99,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "temp_current_f",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "℉",
          "min": 0,
          "max": 99,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "temp_set",
        "mode": "rw",
        "type": "Integer",
        "property": {
          "unit": "℃",
          "min": 16,
          "max": 32,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "temp_set_f",
        "mode": "rw",
        "type": "Integer",
        "property": {
          "unit": "℉",
          "min": 61,
          "max": 90,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "temp_unit_convert",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "c",
            "f"
          ]
        }
      },
      {
        "code": "windshake",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "OFF",
            "ON"
          ]
        }
      }
    ]
  }

Device Control Mode

DP Instruction

Logs

method = post
endpoint = https://openapi.tuyaeu.com
path = /v1.0/devices/....../commands
query = null
headers = {
  "t": "......",
  "client_id": ".....",
  "nonce": "........",
  "Signature-Headers": "client_id",
  "sign": "......",
  "sign_method": "HMAC-SHA256",
  "access_token": "......",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.53"
}
body = {
  "commands": [
    {
      "code": "switch",
      "value": true
    }
  ]
}
[02/07/2024, 19:24:55] [TuyaPlatform] [TuyaOpenAPI] Response:
path = /v1.0/devices/...../commands
data = {
  "result": true,
  "success": true,
  "t": .....,
  "tid": "......."
}

Other Infomations

The problem is that with version v1.7.0-beta.53 I can turn on my device but un Home the device turn instantly off (but still ON and also ON in SmartLife app) and with version 1.6.0 the device is on but any action do nothing