jbergler / hass-ttlock

Home Assistant integration for TTLock locks
57 stars 13 forks source link

No Device or Entity in HA #97

Closed wyliletv closed 7 months ago

wyliletv commented 8 months ago

Hi. Exciting project! Thank you! I do not have a device or entity in the integration entry. Setup went well. Received the notification with the webhook url and added in TTLock site. TTLock site shows increasing API calls count. A test in the site reports 'OK'

HA is running in a docker container on Fedora. I am using nabu.casa service. I am using a SMONET lock with same firmware being reported as succesful.

HALog 2024-02-06 11:51:28.923 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration ttlock which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2024-02-06 12:22:47.295 DEBUG (MainThread) [custom_components.ttlock.api] [c653] Sending request to https://euapi.ttlock.com/v3/lock/list with args={'pageNo': 1, 'pageSize': 1000} 2024-02-06 12:22:48.044 DEBUG (MainThread) [custom_components.ttlock.api] [c653] Received response: status=200: body={'list': [], 'pageNo': 1, 'pageSize': 1000, 'pages': 0, 'total': 0} 2024-02-06 12:22:48.044 INFO (MainThread) [custom_components.ttlock] Webhook registered at https://hooks.nabu.casa/

"home_assistant": {
    "installation_type": "Home Assistant Container",
    "version": "2024.1.5",
    "dev": false,
    "hassio": false,
    "virtualenv": false,
    "python_version": "3.11.6",
    "docker": true,
    "arch": "x86_64",
    "timezone": "America/New_York",
    "os_name": "Linux",
    "os_version": "6.6.14-200.fc39.x86_64",
    "run_as_root": true
},

LATER:

    "ttlock": {
      "version": "v0.6.1",
      "requirements": [
        "pydantic"
      ]
    }
  },
  "integration_manifest": {
    "domain": "ttlock",
    "name": "TTLock",
    "after_dependencies": [
      "cloud"
    ],
    "codeowners": [
      "@jbergler"
    ],
    "config_flow": true,
    "dependencies": [
      "application_credentials",
      "persistent_notification",
      "webhook"
    ],
    "documentation": "https://github.com/jbergler/hass-ttlock",
    "homekit": {},
    "iot_class": "cloud_polling",
    "issue_tracker": "https://github.com/jbergler/hass-ttlock/issues",
    "requirements": [
      "pydantic"
    ],
    "ssdp": [],
    "version": "v0.6.1",
    "zeroconf": [],
    "is_built_in": false
  },
  "data": {
    "config_entry": {
      "entry_id": "af49d207625d8e54ce653c0147712d01",
      "version": 1,
      "minor_version": 1,
      "domain": "ttlock",
      "title": "FrontDoorLock",
      "data": {
        "auth_implementation": "ttlock_c46d887aa24647aebeaa0d65b3df3d2a",
        "token": "**REDACTED**",
        "webhook_id": "a2f42b50716b77677d0b17797454e3078f13c4aa65ee7ed0e0532fb9904082fb",
        "webhook_url": "**REDACTED**",
        "webhook_status": true
      },
      "options": {},
      "pref_disable_new_entities": false,
      "pref_disable_polling": false,
      "source": "user",
      "unique_id": null,
      "disabled_by": null
    },
    "locks": []
  }
}

Suggestions? Thank you again.

jbergler commented 7 months ago

@wyliletv the API isn't returning any locks:

 2024-02-06 12:22:48.044 DEBUG (MainThread) [custom_components.ttlock.api] [c653] Received response: status=200: body={'list': [], 'pageNo': 1, 'pageSize': 1000, 'pages': 0, 'total': 0}

'list': [] being the relevant part.

Can you confirm that the lock is added directly to the account you are logging the integration into?

wyliletv commented 7 months ago

@jbergler Thanks for the reply. I did not perform the transfer lock operation. Once I transfered the lock and gateway it worked!