homebridge-tuya-platform icon indicating copy to clipboard operation
homebridge-tuya-platform copied to clipboard

Missing one of the required schema: [ 'switch', 'switch_1' ]

Open zuhairmahd opened this issue 1 year ago • 0 comments

Prerequisite

  • [X] Yes, I've read the readme completely.

Cache

  • [X] Yes, I've cleaned accessory cache and the issue still exists.

Version

1.70

Device Infomation JSON File

{
    "active_time": 1689373032,
    "biz_type": 18,
    "category": "sfkzq",
    "create_time": 1689373032,
    "icon": "smart/icon/ay15662905541765SKtA/2735c42f4bf5e8c85e2affdbc44aba78.png",
    "id": "bf1060429e5ccd15a2kmnk",
    "ip": "",
    "lat": "lat",
    "lon": "lon",
    "model": "TTV203W",
    "name": "2-Zone wifi Irrigation Timer ",
    "online": true,
    "owner_id": "38627235",
    "product_id": "pjnbcfv3bzwg4yyo",
    "product_name": "2-Zone wifi Irrigation Timer ",
    "status": [
      {
        "code": "AlarmStatus",
        "value": 0
      },
      {
        "code": "BatteryCapacity",
        "value": "2"
      },
      {
        "code": "LeftAddMoisureSensor",
        "value": false
      },
      {
        "code": "LeftFlow",
        "value": 0
      },
      {
        "code": "LeftFlowCount",
        "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAA="
      },
      {
        "code": "LeftManualSwitch",
        "value": true
      },
      {
        "code": "LeftManualTimer",
        "value": 25
      },
      {
        "code": "LeftMoisure",
        "value": 0
      },
      {
        "code": "LeftMoisureCount",
        "value": ""
      },
      {
        "code": "LeftMoisurePwrStatus",
        "value": false
      },
      {
        "code": "LeftNextTime",
        "value": "FwAAAAA="
      },
      {
        "code": "LeftRemainTime",
        "value": 0
      },
      {
        "code": "LeftStopirrigation",
        "value": false
      },
      {
        "code": "LeftTemp",
        "value": 0
      },
      {
        "code": "LeftTempCount",
        "value": ""
      },
      {
        "code": "LeftTimer1",
        "value": "AQAAAAAAAAAAAAA="
      },
      {
        "code": "LeftTimer2",
        "value": "AgAAAAAAAAAAAAA="
      },
      {
        "code": "LeftTimer3",
        "value": "AwAAAAAAAAAAAAA="
      },
      {
        "code": "LeftTimerDelay",
        "value": "0"
      },
      {
        "code": "LeftWorkStatus",
        "value": "0"
      },
      {
        "code": "MCU_Version",
        "value": "W433H101-066-000-000"
      },
      {
        "code": "RMoisurePwrStatus",
        "value": false
      },
      {
        "code": "RightAddMoisure",
        "value": false
      },
      {
        "code": "RightFlowCount",
        "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAA="
      },
      {
        "code": "RightManualSwitch",
        "value": true
      },
      {
        "code": "RightManualTimer",
        "value": 25
      },
      {
        "code": "RightMoisure",
        "value": 0
      },
      {
        "code": "RightMoisureCount",
        "value": ""
      },
      {
        "code": "RightNextTime",
        "value": "FwAAAAA="
      },
      {
        "code": "RightRemainTime",
        "value": 0
      },
      {
        "code": "RightStopIrrigation",
        "value": false
      },
      {
        "code": "RightTemp",
        "value": 0
      },
      {
        "code": "RightTempCount",
        "value": ""
      },
      {
        "code": "RightTimer1",
        "value": "AQAAAAAAAAAAAAA="
      },
      {
        "code": "RightTimer2",
        "value": "AgAAAAAAAAAAAAA="
      },
      {
        "code": "RightTimer3",
        "value": "AwAAAAAAAAAAAAA="
      },
      {
        "code": "RightTimerDelay",
        "value": "0"
      },
      {
        "code": "RightWorkStatus",
        "value": "0"
      },
      {
        "code": "RithtFlow",
        "value": 0
      },
      {
        "code": "SYS_TIME",
        "value": ""
      },
      {
        "code": "TempFormat",
        "value": "2"
      },
      {
        "code": "TimeFormat",
        "value": "12"
      }
    ],
    "sub": true,
    "time_zone": "-04:00",
    "uid": "eu16332575228739uptY",
    "update_time": 1689499371,
    "uuid": "bf1060429e5ccd15a2kmnk",
    "schema": [
      {
        "code": "AlarmStatus",
        "mode": "ro",
        "type": "Bitmap",
        "property": {
          "label": [
            "0",
            "1",
            "2",
            "3",
            "4",
            "5"
          ],
          "maxlen": 6
        }
      },
      {
        "code": "BatteryCapacity",
        "mode": "ro",
        "type": "Enum",
        "property": {
          "range": [
            "0",
            "1",
            "2"
          ]
        }
      },
      {
        "code": "LeftAddMoisureSensor",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "LeftFlow",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "L",
          "min": 0,
          "max": 65536,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "LeftFlowCount",
        "mode": "ro",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "LeftManualSwitch",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "LeftManualTimer",
        "mode": "rw",
        "type": "Integer",
        "property": {
          "unit": "min",
          "min": 0,
          "max": 60,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "LeftMoisure",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "%",
          "min": 0,
          "max": 100,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "LeftMoisureCount",
        "mode": "ro",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "LeftMoisurePwrStatus",
        "mode": "ro",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "LeftNextTime",
        "mode": "ro",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "LeftRemainTime",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "min",
          "min": 0,
          "max": 60,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "LeftStopirrigation",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "LeftTemp",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "℃",
          "min": 0,
          "max": 255,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "LeftTempCount",
        "mode": "ro",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "LeftTimer1",
        "mode": "rw",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "LeftTimer2",
        "mode": "rw",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "LeftTimer3",
        "mode": "rw",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "LeftTimerDelay",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "0",
            "24",
            "48",
            "72"
          ]
        }
      },
      {
        "code": "LeftWorkStatus",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "0",
            "1",
            "2",
            "3",
            "4",
            "5"
          ]
        }
      },
      {
        "code": "MCU_Version",
        "mode": "ro",
        "type": "String",
        "property": {
          "maxlen": 255
        }
      },
      {
        "code": "RMoisurePwrStatus",
        "mode": "ro",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "RightAddMoisure",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "RightFlowCount",
        "mode": "ro",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "RightManualSwitch",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "RightManualTimer",
        "mode": "rw",
        "type": "Integer",
        "property": {
          "unit": "min",
          "min": 0,
          "max": 60,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "RightMoisure",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "%",
          "min": 0,
          "max": 100,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "RightMoisureCount",
        "mode": "ro",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "RightNextTime",
        "mode": "ro",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "RightRemainTime",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "min",
          "min": 0,
          "max": 60,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "RightStopIrrigation",
        "mode": "rw",
        "type": "Boolean",
        "property": {}
      },
      {
        "code": "RightTemp",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "℃",
          "min": 0,
          "max": 255,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "RightTempCount",
        "mode": "ro",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "RightTimer1",
        "mode": "rw",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "RightTimer2",
        "mode": "rw",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "RightTimer3",
        "mode": "rw",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "RightTimerDelay",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "0",
            "24",
            "48",
            "72"
          ]
        }
      },
      {
        "code": "RightWorkStatus",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "0",
            "1",
            "2",
            "3",
            "4",
            "5"
          ]
        }
      },
      {
        "code": "RithtFlow",
        "mode": "ro",
        "type": "Integer",
        "property": {
          "unit": "L",
          "min": 0,
          "max": 65535,
          "scale": 0,
          "step": 1
        }
      },
      {
        "code": "SYS_TIME",
        "mode": "ro",
        "type": "Raw",
        "property": {}
      },
      {
        "code": "TempFormat",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "1",
            "2"
          ]
        }
      },
      {
        "code": "TimeFormat",
        "mode": "rw",
        "type": "Enum",
        "property": {
          "range": [
            "12",
            "24"
          ]
        }
      }
    ]
  }
]

Device Control Mode

DP Instruction

Logs

[7/16/2023, 8:02:12 PM] [Tuya] Loading accessory from cache: wifi Socket
[7/16/2023, 8:02:12 PM] [Tuya] Loading accessory from cache: Gateway
[7/16/2023, 8:02:12 PM] [Tuya] Loading accessory from cache: 2-Zone wifi Irrigation Timer
[7/16/2023, 8:02:12 PM] [Hubitat-v2] Fetching Hubitat-v2 Devices. NOTICE: This may take a moment if you have a large number of devices being loaded!
[7/16/2023, 8:02:12 PM] [Hubitat-v2] Refreshing All Device Data | Source: (First Launch)
[7/16/2023, 8:02:12 PM] [Wallbox] Getting Account info...
[7/16/2023, 8:02:12 PM] [BraviaTVOS] Sony TV: Initializing Television...
[7/16/2023, 8:02:12 PM] [WizSmarthome] [Socket] Setting up socket on 192.168.1.226:38900
[7/16/2023, 8:02:12 PM] [Tuya] Log in to Tuya Cloud.
[7/16/2023, 8:02:12 PM] [Tuya] [TuyaOpenAPI] Login to: https://openapi.tuyaeu.com
[7/16/2023, 8:02:12 PM] [Tuya] [TuyaOpenAPI] Request:
method = post
endpoint = https://openapi.tuyaeu.com
path = /v1.0/iot-01/associated-users/actions/authorized-login
query = null
headers = {
  "t": "1689552132985",
  "client_id": "xxxxx",
  "nonce": "6ed75459-4dca-451c-baaf-4043ca75af1f",
  "Signature-Headers": "client_id",
  "sign": "D701678629427256EBB40D0A2C756A2E097CD6EBEF2A1546270712B24859A199",
  "sign_method": "HMAC-SHA256",
  "access_token": "",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.48"
}
body = {
  "country_code": 962,
  "username": "username",
  "password": "password",
  "schema": "smartlife"
}
[7/16/2023, 8:02:13 PM] [Tuya] [TuyaOpenAPI] Response:
path = /v1.0/iot-01/associated-users/actions/authorized-login
data = {
  "result": {
    "access_token": "",
    "expire_time": 7200,
    "platform_url": "https://openapi.tuyaeu.com",
    "refresh_token": "",
    "uid": "eu16332575228739uptY"
  },
  "success": true,
  "t": 1689552133607,
  "tid": "2effe697243511ee871736843e81b476"
}
[7/16/2023, 8:02:13 PM] [Tuya] Start MQTT connection.
[7/16/2023, 8:02:13 PM] [Tuya] Fetching home list.
[7/16/2023, 8:02:13 PM] [Tuya] [TuyaOpenAPI] Request:
method = post
endpoint = https://openapi.tuyaeu.com
path = /v1.0/iot-03/open-hub/access-config
query = null
headers = {
  "t": "1689552133663",
  "client_id": ",
  "nonce": "dfc95f2c-8aff-4294-80d0-90bff7d209ce",
  "Signature-Headers": "client_id",
  "sign": "BD681E4694DE8C2C68F0E940A4F1D07E0D3D4A190BE5B7B0996B1E87FA5F68BC",
  "sign_method": "HMAC-SHA256",
  "access_token": "",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.48"
}
body = {
  "uid": "eu16332575228739uptY",
  "link_id": "64246684-28fa-4ef5-a6a9-cc497d5c54e7",
  "link_type": "mqtt",
  "topics": "device",
  "msg_encrypted_version": "1.0"
}
[7/16/2023, 8:02:13 PM] [Tuya] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaeu.com
path = /v1.0/users/eu16332575228739uptY/homes
query = undefined
headers = {
  "t": "1689552133666",
  "client_id": "",
  "nonce": "637ddf40-58e3-46e0-acfc-0ece5b29be75",
  "Signature-Headers": "client_id",
  "sign": "FF0954A9F277C15041987F17BEE7E1D46FB1207A2FCB10A69F2306E7AAB5DF8E",
  "sign_method": "HMAC-SHA256",
  "access_token": "",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.48"
}
body = null
[7/16/2023, 8:02:13 PM] [Tuya] [TuyaOpenAPI] Response:
path = /v1.0/users/eu16332575228739uptY/homes
data = {
  "result": [
    {
      "geo_name": "",
      "home_id": 38627235,
      "lat": lat,
      "lon": lon,
      "name": "My Home ..",
      "role": "OWNER"
    }
  ],
  "success": true,
  "t": 1689552133926,
  "tid": "2f3664c9243511ee8ac9ce4d0cb672c1"
}
[7/16/2023, 8:02:13 PM] [Tuya] Got home_id=38627235, name=My Home ..
[7/16/2023, 8:02:13 PM] [Tuya] Fetching device list.
[7/16/2023, 8:02:13 PM] [Tuya] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaeu.com
path = /v1.0/homes/38627235/devices
query = undefined
headers = {
  "t": "1689552133975",
  "client_id": ",
  "nonce": "8a5fcb39-205c-46ea-8fd8-74736949f695",
  "Signature-Headers": "client_id",
  "sign": "80CE4D6CE3E8F228C969EFE2DCDE7735558493477E000F43ACB170D01B000E88",
  "sign_method": "HMAC-SHA256",
  "access_token": "",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.48"
}
body = null
[7/16/2023, 8:02:14 PM] [Tuya] [TuyaOpenAPI] Response:
path = /v1.0/iot-03/open-hub/access-config
data = {
  "result": {
    "client_id": "redacted",
    "expire_time": 7200,
    "password": "redacted",
    "sink_topic": {
      "device": "cloud/token/out/{device_id}"
    },
    "source_topic": {
      "device": "cloud/token/in/ff171cdea2fa9ef9b93a5bc852f5008a"
    },
    "url": "ssl://m1.tuyaeu.com:8883",
    "username": "cloud_ff171cdea2fa9ef9b93a5bc852f5008a"
  },
  "success": true,
  "t": 1689552134061,
  "tid": "2f4697b5243511ee871736843e81b476"
}
[7/16/2023, 8:02:14 PM] [Tuya] [TuyaOpenAPI] Response:
path = /v1.0/homes/38627235/devices
data = {
  "result": [
    {
      "active_time": 1689373030,
      "biz_type": 18,
      "category": "cz",
      "create_time": 1689373030,
      "icon": "smart/program_category_icon/cz.png",
      "id": "bf8600bdd9eac1f566gxno",
      "ip": "",
      "lat": "lat",
      "lon": "lon",
      "model": "",
      "name": "wifi Socket",
      "online": true,
      "owner_id": "38627235",
      "product_id": "upavlp996ferbht7",
      "product_name": "wifi Socket",
      "status": [
        {
          "code": "switch_1",
          "value": false
        }
      ],
      "sub": true,
      "time_zone": "-04:00",
      "uid": "eu16332575228739uptY",
      "update_time": 1689551237,
      "uuid": "bf8600bdd9eac1f566gxno"
    },
    {
      "active_time": 1689372819,
      "biz_type": 18,
      "category": "wg2",
      "create_time": 1689372819,
      "icon": "smart/icon/ay15662905541765SKtA/167e89eb1b08ffb66af9adfefdb24cc6.png",
      "id": "bf00b47ccbe0f8bbe742j2",
      "ip": "ip",
      "lat": "lat",
      "local_key": "redacted",
      "lon": "lon",
      "model": "IWG0004",
      "name": "Gateway",
      "online": true,
      "owner_id": "38627235",
      "product_id": "gzudaahvmezbwek3",
      "product_name": "Gateway",
      "status": [
        {
          "code": "master_state",
          "value": "normal"
        }
      ],
      "sub": false,
      "time_zone": "-04:00",
      "uid": "eu16332575228739uptY",
      "update_time": 1689499371,
      "uuid": "9a51efbd1dd2fe79"
    },
    {
      "active_time": 1689373032,
      "biz_type": 18,
      "category": "sfkzq",
      "create_time": 1689373032,
      "icon": "smart/icon/ay15662905541765SKtA/2735c42f4bf5e8c85e2affdbc44aba78.png",
      "id": "bf1060429e5ccd15a2kmnk",
      "ip": "",
      "lat": "lat",
      "lon": "lon",
      "model": "TTV203W",
      "name": "2-Zone wifi Irrigation Timer ",
      "online": true,
      "owner_id": "38627235",
      "product_id": "pjnbcfv3bzwg4yyo",
      "product_name": "2-Zone wifi Irrigation Timer ",
      "status": [
        {
          "code": "LeftTemp",
          "value": 0
        },
        {
          "code": "LeftMoisure",
          "value": 0
        },
        {
          "code": "LeftFlow",
          "value": 0
        },
        {
          "code": "BatteryCapacity",
          "value": "2"
        },
        {
          "code": "LeftWorkStatus",
          "value": "0"
        },
        {
          "code": "LeftManualTimer",
          "value": 25
        },
        {
          "code": "LeftManualSwitch",
          "value": true
        },
        {
          "code": "LeftRemainTime",
          "value": 0
        },
        {
          "code": "LeftTimer1",
          "value": "AQAAAAAAAAAAAAA="
        },
        {
          "code": "LeftTimer2",
          "value": "AgAAAAAAAAAAAAA="
        },
        {
          "code": "LeftTimer3",
          "value": "AwAAAAAAAAAAAAA="
        },
        {
          "code": "LeftTimerDelay",
          "value": "0"
        },
        {
          "code": "TimeFormat",
          "value": "12"
        },
        {
          "code": "LeftAddMoisureSensor",
          "value": false
        },
        {
          "code": "LeftMoisurePwrStatus",
          "value": false
        },
        {
          "code": "TempFormat",
          "value": "2"
        },
        {
          "code": "AlarmStatus",
          "value": 0
        },
        {
          "code": "LeftFlowCount",
          "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAA="
        },
        {
          "code": "LeftTempCount",
          "value": ""
        },
        {
          "code": "LeftMoisureCount",
          "value": ""
        },
        {
          "code": "LeftStopirrigation",
          "value": false
        },
        {
          "code": "SYS_TIME",
          "value": ""
        },
        {
          "code": "MCU_Version",
          "value": "W433H101-066-000-000"
        },
        {
          "code": "LeftNextTime",
          "value": "FwAAAAA="
        },
        {
          "code": "RightTemp",
          "value": 0
        },
        {
          "code": "RightMoisure",
          "value": 0
        },
        {
          "code": "RithtFlow",
          "value": 0
        },
        {
          "code": "RightWorkStatus",
          "value": "0"
        },
        {
          "code": "RightManualTimer",
          "value": 25
        },
        {
          "code": "RightManualSwitch",
          "value": true
        },
        {
          "code": "RightRemainTime",
          "value": 0
        },
        {
          "code": "RightTimer1",
          "value": "AQAAAAAAAAAAAAA="
        },
        {
          "code": "RightTimer2",
          "value": "AgAAAAAAAAAAAAA="
        },
        {
          "code": "RightTimer3",
          "value": "AwAAAAAAAAAAAAA="
        },
        {
          "code": "RightTimerDelay",
          "value": "0"
        },
        {
          "code": "RightAddMoisure",
          "value": false
        },
        {
          "code": "RMoisurePwrStatus",
          "value": false
        },
        {
          "code": "RightFlowCount",
          "value": "AAAAAAAAAAAAAAAAAAAAAAAAAAA="
        },
        {
          "code": "RightTempCount",
          "value": ""
        },
        {
          "code": "RightMoisureCount",
          "value": ""
        },
        {
          "code": "RightStopIrrigation",
          "value": false
        },
        {
          "code": "RightNextTime",
          "value": "FwAAAAA="
        }
      ],
      "sub": true,
      "time_zone": "-04:00",
      "uid": "eu16332575228739uptY",
      "update_time": 1689499371,
      "uuid": "bf1060429e5ccd15a2kmnk"
    }
  ],
  "success": true,
  "t": 1689552134340,
  "tid": "2f683508243511ee97740a4306e7517e"
}
[7/16/2023, 8:02:14 PM] [Tuya] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaeu.com
path = /v1.0/devices/bf8600bdd9eac1f566gxno/specifications
query = undefined
headers = {
  "t": "1689552134415",
  "client_id": "redacted",
  "nonce": "4baec10c-d1d8-4f5c-86d6-8c9209590ed3",
  "Signature-Headers": "client_id",
  "sign": "CF817055FC01E121C808D1AEABD30F9587469FBDD8DA3A13B0248F3C91BC9095",
  "sign_method": "HMAC-SHA256",
  "access_token": "redacted",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.48"
}
body = null
[7/16/2023, 8:02:14 PM] [Tuya] [TuyaOpenAPI] Response:
path = /v1.0/devices/bf8600bdd9eac1f566gxno/specifications
data = {
  "result": {
    "category": "cz",
    "functions": [
      {
        "code": "switch_1",
        "type": "Boolean",
        "values": "{}"
      }
    ],
    "status": [
      {
        "code": "switch_1",
        "type": "Boolean",
        "values": "{}"
      }
    ]
  },
  "success": true,
  "t": 1689552134800,
  "tid": "2fbcfe13243511ee8ac9ce4d0cb672c1"
}
[7/16/2023, 8:02:14 PM] [Tuya] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaeu.com
path = /v1.0/devices/bf00b47ccbe0f8bbe742j2/specifications
query = undefined
headers = {
  "t": "1689552134848",
  "client_id": "redacted",
  "nonce": "d20e5c92-d6a8-4ccb-810c-3c72c0e4000a",
  "Signature-Headers": "client_id",
  "sign": "26BB30E2428448B8A7D9EB0238FDEDF5FFF8977E75C124F326EE8F08926D5F53",
  "sign_method": "HMAC-SHA256",
  "access_token": "redacted",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.48"
}
body = null

[7/16/2023, 8:02:15 PM] [Tuya] [TuyaOpenAPI] Response:
path = /v1.0/devices/bf00b47ccbe0f8bbe742j2/specifications
data = {
  "result": {
    "category": "wg2",
    "functions": [
      {
        "code": "master_state",
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"alarm\"]}"
      }
    ],
    "status": [
      {
        "code": "master_state",
        "type": "Enum",
        "values": "{\"range\":[\"normal\",\"alarm\"]}"
      }
    ]
  },
  "success": true,
  "t": 1689552135115,
  "tid": "2feca9e5243511ee97740a4306e7517e"
}
[7/16/2023, 8:02:15 PM] [Tuya] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaeu.com
path = /v1.0/devices/bf1060429e5ccd15a2kmnk/specifications
query = undefined
headers = {
  "t": "1689552135283",
  "client_id": "redacted",
  "nonce": "cdfb0415-12d9-4c6e-a7b4-115a28391e10",
  "Signature-Headers": "client_id",
  "sign": "C5347C5143211F133A6FE40A8C36AE34A3320BCE00776ADE0101297DC936BEF4",
  "sign_method": "HMAC-SHA256",
  "access_token": "redacted",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.48"
}
body = null
[7/16/2023, 8:02:15 PM] [Tuya] [TuyaOpenAPI] Response:
path = /v1.0/devices/bf1060429e5ccd15a2kmnk/specifications
data = {
  "result": {
    "category": "sfkzq",
    "functions": [
      {
        "code": "LeftWorkStatus",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\"]}"
      },
      {
        "code": "LeftManualTimer",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":60,\"scale\":0,\"step\":1}"
      },
      {
        "code": "LeftManualSwitch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "LeftTimer1",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "LeftTimer2",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "LeftTimer3",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "LeftTimerDelay",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"24\",\"48\",\"72\"]}"
      },
      {
        "code": "TimeFormat",
        "type": "Enum",
        "values": "{\"range\":[\"12\",\"24\"]}"
      },
      {
        "code": "LeftAddMoisureSensor",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "TempFormat",
        "type": "Enum",
        "values": "{\"range\":[\"1\",\"2\"]}"
      },
      {
        "code": "LeftStopirrigation",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "RightWorkStatus",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\"]}"
      },
      {
        "code": "RightManualTimer",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":60,\"scale\":0,\"step\":1}"
      },
      {
        "code": "RightManualSwitch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "RightTimer1",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightTimer2",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightTimer3",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightTimerDelay",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"24\",\"48\",\"72\"]}"
      },
      {
        "code": "RightAddMoisure",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "RightStopIrrigation",
        "type": "Boolean",
        "values": "{}"
      }
    ],
    "status": [
      {
        "code": "LeftTemp",
        "type": "Integer",
        "values": "{\"unit\":\"℃\",\"min\":0,\"max\":255,\"scale\":0,\"step\":1}"
      },
      {
        "code": "LeftMoisure",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "LeftFlow",
        "type": "Integer",
        "values": "{\"unit\":\"L\",\"min\":0,\"max\":65536,\"scale\":0,\"step\":1}"
      },
      {
        "code": "BatteryCapacity",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\"]}"
      },
      {
        "code": "LeftWorkStatus",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\"]}"
      },
      {
        "code": "LeftManualTimer",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":60,\"scale\":0,\"step\":1}"
      },
      {
        "code": "LeftManualSwitch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "LeftRemainTime",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":60,\"scale\":0,\"step\":1}"
      },
      {
        "code": "LeftTimer1",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "LeftTimer2",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "LeftTimer3",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "LeftTimerDelay",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"24\",\"48\",\"72\"]}"
      },
      {
        "code": "TimeFormat",
        "type": "Enum",
        "values": "{\"range\":[\"12\",\"24\"]}"
      },
      {
        "code": "LeftAddMoisureSensor",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "LeftMoisurePwrStatus",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "TempFormat",
        "type": "Enum",
        "values": "{\"range\":[\"1\",\"2\"]}"
      },
      {
        "code": "AlarmStatus",
        "type": "Bitmap",
        "values": "{\"label\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\"],\"maxlen\":6}"
      },
      {
        "code": "LeftFlowCount",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "LeftTempCount",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "LeftMoisureCount",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "LeftStopirrigation",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "SYS_TIME",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "MCU_Version",
        "type": "String",
        "values": "{\"maxlen\":255}"
      },
      {
        "code": "LeftNextTime",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightTemp",
        "type": "Integer",
        "values": "{\"unit\":\"℃\",\"min\":0,\"max\":255,\"scale\":0,\"step\":1}"
      },
      {
        "code": "RightMoisure",
        "type": "Integer",
        "values": "{\"unit\":\"%\",\"min\":0,\"max\":100,\"scale\":0,\"step\":1}"
      },
      {
        "code": "RithtFlow",
        "type": "Integer",
        "values": "{\"unit\":\"L\",\"min\":0,\"max\":65535,\"scale\":0,\"step\":1}"
      },
      {
        "code": "RightWorkStatus",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"1\",\"2\",\"3\",\"4\",\"5\"]}"
      },
      {
        "code": "RightManualTimer",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":60,\"scale\":0,\"step\":1}"
      },
      {
        "code": "RightManualSwitch",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "RightRemainTime",
        "type": "Integer",
        "values": "{\"unit\":\"min\",\"min\":0,\"max\":60,\"scale\":0,\"step\":1}"
      },
      {
        "code": "RightTimer1",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightTimer2",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightTimer3",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightTimerDelay",
        "type": "Enum",
        "values": "{\"range\":[\"0\",\"24\",\"48\",\"72\"]}"
      },
      {
        "code": "RightAddMoisure",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "RMoisurePwrStatus",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "RightFlowCount",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightTempCount",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightMoisureCount",
        "type": "Raw",
        "values": "{}"
      },
      {
        "code": "RightStopIrrigation",
        "type": "Boolean",
        "values": "{}"
      },
      {
        "code": "RightNextTime",
        "type": "Raw",
        "values": "{}"
      }
    ]
  },
  "success": true,
  "t": 1689552135647,
  "tid": "303df7ca243511ee871736843e81b476"
}
[7/16/2023, 8:02:15 PM] [Tuya] Fetching scene list.
[7/16/2023, 8:02:15 PM] [Tuya] [TuyaOpenAPI] Request:
method = get
endpoint = https://openapi.tuyaeu.com
path = /v1.1/homes/38627235/scenes
query = undefined
headers = {
  "t": "1689552135694",
  "client_id": "",
  "nonce": "f28a75dc-8ec5-4eda-8b92-690574de7643",
  "Signature-Headers": "client_id",
  "sign": "323D4945B8FA91505C53BC8B2556D495E2CAE20DFCB4A2AA773D78992DECE9BB",
  "sign_method": "HMAC-SHA256",
  "access_token": "",
  "lang": "en",
  "dev_lang": "javascript",
  "dev_channel": "homebridge",
  "devVersion": "1.7.0-beta.48"
}
body = null

[7/16/2023, 8:02:16 PM] [Tuya] [TuyaOpenAPI] Response:
path = /v1.1/homes/38627235/scenes
data = {
  "result": [],
  "success": true,
  "t": 1689552135972,
  "tid": "306f2bf8243511ee97740a4306e7517e"
}
[7/16/2023, 8:02:16 PM] [Tuya] Got 3 device(s) and scene(s).
[7/16/2023, 8:02:16 PM] [Tuya] Device list saved at /var/lib/homebridge/persist/TuyaDeviceList.eu16332575228739uptY.json
[7/16/2023, 8:02:16 PM] [Tuya] Restoring existing accessory from cache: wifi Socket
[7/16/2023, 8:02:16 PM] [Tuya] Restoring existing accessory from cache: Gateway
[7/16/2023, 8:02:16 PM] [Tuya] Unsupported device: Gateway.
[7/16/2023, 8:02:16 PM] [Tuya] Restoring existing accessory from cache: 2-Zone wifi Irrigation Timer
[7/16/2023, 8:02:16 PM] [Tuya] [2-Zone wifi Irrigation Timer ] Product Category: sfkzq
[7/16/2023, 8:02:16 PM] [Tuya] [2-Zone wifi Irrigation Timer ] Missing one of the required schema: [ 'switch', 'switch_1' ]
[7/16/2023, 8:02:16 PM] [Tuya] [2-Zone wifi Irrigation Timer ] Please switch device control mode to "DP Insctrution", and set `deviceOverrides` manually.
[7/16/2023, 8:02:16 PM] [Tuya] [2-Zone wifi Irrigation Timer ] Detail information: https://github.com/0x5e/homebridge-tuya-platform#faq
[7/16/2023, 8:02:16 PM] [Tuya] [2-Zone wifi Irrigation Timer ] Existing schema: [
  {
    code: 'AlarmStatus',
    mode: 'ro',
    type: 'Bitmap',
    property: { label: [ '0', '1', '2', '3', '4', '5', [length]: 6 ], maxlen: 6 }
  },
  {
    code: 'BatteryCapacity',
    mode: 'ro',
    type: 'Enum',
    property: { range: [ '0', '1', '2', [length]: 3 ] }
  },
  {
    code: 'LeftAddMoisureSensor',
    mode: 'rw',
    type: 'Boolean',
    property: {}
  },
  {
    code: 'LeftFlow',
    mode: 'ro',
    type: 'Integer',
    property: { unit: 'L', min: 0, max: 65536, scale: 0, step: 1 }
  },
  { code: 'LeftFlowCount', mode: 'ro', type: 'Raw', property: {} },
  {
    code: 'LeftManualSwitch',
    mode: 'rw',
    type: 'Boolean',
    property: {}
  },
  {
    code: 'LeftManualTimer',
    mode: 'rw',
    type: 'Integer',
    property: { unit: 'min', min: 0, max: 60, scale: 0, step: 1 }
  },
  {
    code: 'LeftMoisure',
    mode: 'ro',
    type: 'Integer',
    property: { unit: '%', min: 0, max: 100, scale: 0, step: 1 }
  },
  { code: 'LeftMoisureCount', mode: 'ro', type: 'Raw', property: {} },
  {
    code: 'LeftMoisurePwrStatus',
    mode: 'ro',
    type: 'Boolean',
    property: {}
  },
  { code: 'LeftNextTime', mode: 'ro', type: 'Raw', property: {} },
  {
    code: 'LeftRemainTime',
    mode: 'ro',
    type: 'Integer',
    property: { unit: 'min', min: 0, max: 60, scale: 0, step: 1 }
  },
  {
    code: 'LeftStopirrigation',
    mode: 'rw',
    type: 'Boolean',
    property: {}
  },
  {
    code: 'LeftTemp',
    mode: 'ro',
    type: 'Integer',
    property: { unit: '℃', min: 0, max: 255, scale: 0, step: 1 }
  },
  { code: 'LeftTempCount', mode: 'ro', type: 'Raw', property: {} },
  { code: 'LeftTimer1', mode: 'rw', type: 'Raw', property: {} },
  { code: 'LeftTimer2', mode: 'rw', type: 'Raw', property: {} },
  { code: 'LeftTimer3', mode: 'rw', type: 'Raw', property: {} },
  {
    code: 'LeftTimerDelay',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ '0', '24', '48', '72', [length]: 4 ] }
  },
  {
    code: 'LeftWorkStatus',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ '0', '1', '2', '3', '4', '5', [length]: 6 ] }
  },
  {
    code: 'MCU_Version',
    mode: 'ro',
    type: 'String',
    property: { maxlen: 255 }
  },
  {
    code: 'RMoisurePwrStatus',
    mode: 'ro',
    type: 'Boolean',
    property: {}
  },
  {
    code: 'RightAddMoisure',
    mode: 'rw',
    type: 'Boolean',
    property: {}
  },
  { code: 'RightFlowCount', mode: 'ro', type: 'Raw', property: {} },
  {
    code: 'RightManualSwitch',
    mode: 'rw',
    type: 'Boolean',
    property: {}
  },
  {
    code: 'RightManualTimer',
    mode: 'rw',
    type: 'Integer',
    property: { unit: 'min', min: 0, max: 60, scale: 0, step: 1 }
  },
  {
    code: 'RightMoisure',
    mode: 'ro',
    type: 'Integer',
    property: { unit: '%', min: 0, max: 100, scale: 0, step: 1 }
  },
  { code: 'RightMoisureCount', mode: 'ro', type: 'Raw', property: {} },
  { code: 'RightNextTime', mode: 'ro', type: 'Raw', property: {} },
  {
    code: 'RightRemainTime',
    mode: 'ro',
    type: 'Integer',
    property: { unit: 'min', min: 0, max: 60, scale: 0, step: 1 }
  },
  {
    code: 'RightStopIrrigation',
    mode: 'rw',
    type: 'Boolean',
    property: {}
  },
  {
    code: 'RightTemp',
    mode: 'ro',
    type: 'Integer',
    property: { unit: '℃', min: 0, max: 255, scale: 0, step: 1 }
  },
  { code: 'RightTempCount', mode: 'ro', type: 'Raw', property: {} },
  { code: 'RightTimer1', mode: 'rw', type: 'Raw', property: {} },
  { code: 'RightTimer2', mode: 'rw', type: 'Raw', property: {} },
  { code: 'RightTimer3', mode: 'rw', type: 'Raw', property: {} },
  {
    code: 'RightTimerDelay',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ '0', '24', '48', '72', [length]: 4 ] }
  },
  {
    code: 'RightWorkStatus',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ '0', '1', '2', '3', '4', '5', [length]: 6 ] }
  },
  {
    code: 'RithtFlow',
    mode: 'ro',
    type: 'Integer',
    property: { unit: 'L', min: 0, max: 65535, scale: 0, step: 1 }
  },
  { code: 'SYS_TIME', mode: 'ro', type: 'Raw', property: {} },
  {
    code: 'TempFormat',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ '1', '2', [length]: 2 ] }
  },
  {
    code: 'TimeFormat',
    mode: 'rw',
    type: 'Enum',
    property: { range: [ '12', '24', [length]: 2 ] }
  },
  [length]: 42
]
[7/16/2023, 8:02:16 PM] [Tuya] Unsupported device: 2-Zone wifi Irrigation Timer .
[7/16/2023, 8:07:20 PM] [Tuya] [wifi Socket] [Outlet/switch_1/On] Update value: false => true
[7/16/2023, 8:07:28 PM] [Tuya] [wifi Socket] [Outlet/switch_1/On] Update value: true => false

Other Infomations

I think I have done everything correctly after having read the Readme and the Advanced Settings files many times over, but maybe I am missing something? I am specifically trying to get the 2-Zone wifi Irrigation Timer to work -- it currently shows up as an unsupported device. I have put in the overrides in the config.json file and see that the values update when the device list is fetched, but the device is still showing as unsupported. I have removed the accessory many times with no luck. I have changed the control mode to DP instruction, but no matter what I do the device is still showing as unsupported. It is worth mentioning that whenever I manipulate the device, whether manually or in the Smartlife app, nothing shows up in the log. The wifi socket does show up as supported and I see logs whenever I toggle it, but not the 2-Zone wifi Irrigation Timer.

Any help is appreciated.

zuhairmahd avatar Jul 17 '23 00:07 zuhairmahd