rospogrigio / localtuya

local handling for Tuya devices
GNU General Public License v3.0
2.71k stars 531 forks source link

Devices in debug log do not appear in Home Assistant #1508

Open jmealo opened 9 months ago

jmealo commented 9 months ago

The problem

I cannot automatically or manually add devices to Home Assistant. Those devices appear in my "download diagnostic report" under Local Tuya

Environment

Steps to reproduce

  1. Follow documentation instructions
  2. Add cloud account
  3. Attempt to manually or automatically add Rainpoint Irrigation Controllers

DP dump

Provide Home Assistant traceback/logs

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.9.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.11.5",
    "docker": true,
    "arch": "x86_64",
    "timezone": "America/New_York",
    "os_name": "Linux",
    "os_version": "6.1.45",
    "supervisor": "2023.09.2",
    "host_os": "Home Assistant OS 10.5",
    "docker_version": "23.0.6",
    "chassis": "vm",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.33.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "localtuya": {
      "version": "5.2.1",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "localtuya",
    "name": "LocalTuya integration",
    "codeowners": [
      "@rospogrigio",
      "@postlund"
    ],
    "config_flow": true,
    "dependencies": [],
    "documentation": "https://github.com/rospogrigio/localtuya/",
    "iot_class": "local_push",
    "issue_tracker": "https://github.com/rospogrigio/localtuya/issues",
    "requirements": [],
    "version": "5.2.1",
    "is_built_in": false
  },
  "data": {
    "region": "us",
    "username": "localtuya",
    "no_cloud": false,
    "client_id": "u5x...vgt",
    "client_secret": "a5d...d42",
    "user_id": "az1...9IS",
    "devices": {},
    "updated_at": "1696001283480",
    "cloud_devices": {
      "ebe1ef763e7408dbc4hqyn": {
        "active_time": 1692631236,
        "biz_type": 0,
        "category": "wg2",
        "create_time": 1692631236,
        "icon": "smart/icon/ay15662905541765SKtA/167e89eb1b08ffb66af9adfefdb24cc6.png",
        "id": "ebe1ef763e7408dbc4hqyn",
        "ip": "100.11.63.198",
        "lat": "40.1317",
        "local_key": "oIE...lD6",
        "lon": "-74.9360",
        "model": "IWG0004",
        "name": "Gateway",
        "online": true,
        "owner_id": "166306192",
        "product_id": "gzudaahvmezbwek3",
        "product_name": "Gateway",
        "status": [
          {
            "code": "master_state",
            "value": "normal"
          }
        ],
        "sub": false,
        "time_zone": "-04:00",
        "uid": "az16926304666215D9IS",
        "update_time": 1696001085,
        "uuid": "e5d959ca7cafa2df"
      },
      "eb790ec8e1c0c29d3ascqj": {
        "active_time": 1692631279,
        "biz_type": 0,
        "category": "cz",
        "create_time": 1692631279,
        "icon": "smart/program_category_icon/cz.png",
        "id": "eb790ec8e1c0c29d3ascqj",
        "ip": "",
        "lat": "40.1300",
        "local_key": "oIE...lD6",
        "lon": "-74.9400",
        "model": "",
        "name": "wifi Socket",
        "node_id": "91B",
        "online": true,
        "owner_id": "166306192",
        "product_id": "upavlp996ferbht7",
        "product_name": "wifi Socket",
        "status": [
          {
            "code": "switch_1",
            "value": false
          }
        ],
        "sub": true,
        "time_zone": "-04:00",
        "uid": "az16926304666215D9IS",
        "update_time": 1695998152,
        "uuid": "eb790ec8e1c0c29d3ascqj"
      },
      "ebc0709403a39c4b2dymy5": {
        "active_time": 1695923390,
        "biz_type": 0,
        "category": "sfkzq",
        "create_time": 1695923390,
        "icon": "smart/icon/ay15662905541765SKtA/2735c42f4bf5e8c85e2affdbc44aba78.png",
        "id": "ebc0709403a39c4b2dymy5",
        "ip": "",
        "lat": "40.1300",
        "local_key": "oIE...lD6",
        "lon": "-74.9400",
        "model": "TTV203W",
        "name": "2-Zone wifi Irrigation Timer  2",
        "node_id": "913",
        "online": true,
        "owner_id": "166306192",
        "product_id": "pjnbcfv3bzwg4yyo",
        "product_name": "2-Zone wifi Irrigation Timer ",
        "status": [],
        "sub": true,
        "time_zone": "-04:00",
        "uid": "az16926304666215D9IS",
        "update_time": 1695968497,
        "uuid": "ebc0709403a39c4b2dymy5"
      },
      "ebdb0c33f643e816d3epfy": {
        "active_time": 1692631301,
        "biz_type": 0,
        "category": "sfkzq",
        "create_time": 1692631301,
        "icon": "smart/icon/ay15662905541765SKtA/1568080631a5f6c087429.png",
        "id": "ebdb0c33f643e816d3epfy",
        "ip": "",
        "lat": "40.1300",
        "local_key": "oIE...lD6",
        "lon": "-74.9400",
        "model": "IVT0103W",
        "name": "wifi Water Timer",
        "node_id": "912",
        "online": true,
        "owner_id": "166306192",
        "product_id": "ew946yrp3pgbaziu",
        "product_name": "wifi Water Timer",
        "status": [],
        "sub": true,
        "time_zone": "-04:00",
        "uid": "az16926304666215D9IS",
        "update_time": 1695808326,
        "uuid": "ebdb0c33f643e816d3epfy"
      }
    }
  }
}

Additional information

DMUTPUUM commented 9 months ago

Devices in debug log do not appear in Home Assistant

home-assistant_localtuya_2023-09-30T15-23-21.318Z.log config_entry-localtuya-b974b03d35ace3af16521e089d1c736b.json.txt

johnazariah commented 8 months ago

This looks like the same issue reported here: https://github.com/rospogrigio/localtuya/issues/1477