hass-ttlock icon indicating copy to clipboard operation
hass-ttlock copied to clipboard

Single TTlock Developer Application + Multiple locks = Multiple webhooks

Open mageali opened this issue 9 months ago • 1 comments

Describe the bug

Firstly, thanks for all the effort you put into this. I love this integration.

I setup ttlock integration through hacks and had 4 different locks still in the box. So I tested them one bye one; adding each one to the integration at a time. I added the first webhook URL when testing the first lock. Now I have 3 more webhook url notifications in HA, and I have no clue what to do with them. As far as I can tell the 4 locks are working fine with the integration and update just fine. Should I ignore/dismiss the 3 additional webhook urls?

To Reproduce

1 - Add first device (lock) to ttlock integration 2 - Add webhook url to developer application 3 - Add second device (lock) to ttlock integration 4 - find HA notification for a second webhook url

Expected behavior

A single webhook URL for all locks since it's all under the same developer application.

Diagnostic info

I will only add the diagnostics for the first 2 locks to make it shorter. Please let me know if the rest of the diagnostics is also required.

First Device (I hope I remembered this correctly) { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.8.4", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.4", "docker": true, "arch": "aarch64", "timezone": "Asia/Dubai", "os_name": "Linux", "os_version": "6.1.21-v8", "supervisor": "2023.08.3", "host_os": "Home Assistant OS 10.5", "docker_version": "23.0.6", "chassis": "embedded", "run_as_root": true }, "custom_components": { "ble_monitor": { "version": "12.3.2", "requirements": [ "pycryptodomex>=3.14.1", "janus>=1.0.0", "aioblescan>=0.2.14", "btsocket>=0.2.0", "pyric>=0.1.6.3" ] }, "hacs": { "version": "1.32.1", "requirements": [ "aiogithubapi>=22.10.1" ] }, "xiaomi_miot": { "version": "0.7.12", "requirements": [ "construct>=2.10.56", "python-miio>=0.5.6", "micloud>=0.3" ] }, "dwains_dashboard": { "version": "3.4.3", "requirements": [] }, "hikvision_next": { "version": "1.0.10", "requirements": [ "xmltodict==0.13.0", "hikvisionapi==0.3.2", "requests-toolbelt==0.10.1" ] }, "xiaomi_gateway3": { "version": "3.3.2", "requirements": [ "zigpy>=0.44.1" ] }, "ttlock": { "version": "v0.5.4", "requirements": [ "pydantic" ] }, "sonoff": { "version": "3.5.2", "requirements": [ "pycryptodome>=3.6.6" ] }, "eufy_security": { "version": "7.0.4", "requirements": [ "websocket-client==1.4.2", "aiortsp==1.3.6" ] }, "browser_mod": { "version": "2.3.0", "requirements": [] }, "philips_android_tv": { "version": "1.0.0", "requirements": [ "wakeonlan" ] }, "samsungtv_tizen": { "version": "1.6.1", "requirements": [ "websocket-client>=0.56.0", "wakeonlan>=2.0.0", "numpy>=1.19.2" ] }, "ytube_music_player": { "version": "20230321.01", "requirements": [ "ytmusicapi==0.25.0", "pytube==10.5.1", "integrationhelper==0.2.2" ] }, "alexa_media": { "version": "4.6.5", "requirements": [ "alexapy==1.26.8", "packaging>=20.3", "wrapt>=1.12.1" ] }, "aqara_gateway": { "version": "0.0.14", "requirements": [ "paho-mqtt>=1.5.0" ] }, "smartthinq_sensors": { "version": "0.33.3", "requirements": [ "pycountry>=20.7.3", "xmltodict>=0.12.0", "charset_normalizer>=2.0.0" ] }, "webrtc": { "version": "v3.3.0", "requirements": [] }, "samsungtv_smart": { "version": "0.12.0", "requirements": [ "websocket-client!=1.4.0,>=0.58.0", "wakeonlan>=2.0.0", "aiofiles>=0.8.0", "casttube>=0.2.1" ] }, "bodymiscale": { "version": "3.0.8", "requirements": [ "cachetools==5.3.0" ] }, "ui_lovelace_minimalist": { "version": "v1.3.6", "requirements": [ "aiofiles==0.8.0", "aiogithubapi>=22.2.4" ] }, "argon40": { "version": "0.0.5", "requirements": [ "RPi.GPIO==0.7.1", "smbus-cffi==0.5.1" ] }, "spotcast": { "version": "v3.6.30", "requirements": [] } }, "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.5.4", "zeroconf": [], "is_built_in": false }, "data": { "config_entry": { "entry_id": "6ea60fa0bada7df5835b14ca98c2ceeb", "version": 1, "domain": "ttlock", "title": "Office Lock", "data": { "auth_implementation": "ttlock_547c7f0cd00f44589ec8008e09871659", "token": "REDACTED", "webhook_id": "2fc34431eeff9ff9bb5b4a9fcb1e5a4b36cfa9384b79c174c27976125a5adc93", "webhook_url": "REDACTED" }, "options": {}, "pref_disable_new_entities": false, "pref_disable_polling": false, "source": "user", "unique_id": null, "disabled_by": null }, "locks": [] } }

Second (or maybe 3rd) Lock

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.8.4", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.4", "docker": true, "arch": "aarch64", "timezone": "Asia/Dubai", "os_name": "Linux", "os_version": "6.1.21-v8", "supervisor": "2023.08.3", "host_os": "Home Assistant OS 10.5", "docker_version": "23.0.6", "chassis": "embedded", "run_as_root": true }, "custom_components": { "ble_monitor": { "version": "12.3.2", "requirements": [ "pycryptodomex>=3.14.1", "janus>=1.0.0", "aioblescan>=0.2.14", "btsocket>=0.2.0", "pyric>=0.1.6.3" ] }, "hacs": { "version": "1.32.1", "requirements": [ "aiogithubapi>=22.10.1" ] }, "xiaomi_miot": { "version": "0.7.12", "requirements": [ "construct>=2.10.56", "python-miio>=0.5.6", "micloud>=0.3" ] }, "dwains_dashboard": { "version": "3.4.3", "requirements": [] }, "hikvision_next": { "version": "1.0.10", "requirements": [ "xmltodict==0.13.0", "hikvisionapi==0.3.2", "requests-toolbelt==0.10.1" ] }, "xiaomi_gateway3": { "version": "3.3.2", "requirements": [ "zigpy>=0.44.1" ] }, "ttlock": { "version": "v0.5.4", "requirements": [ "pydantic" ] }, "sonoff": { "version": "3.5.2", "requirements": [ "pycryptodome>=3.6.6" ] }, "eufy_security": { "version": "7.0.4", "requirements": [ "websocket-client==1.4.2", "aiortsp==1.3.6" ] }, "browser_mod": { "version": "2.3.0", "requirements": [] }, "philips_android_tv": { "version": "1.0.0", "requirements": [ "wakeonlan" ] }, "samsungtv_tizen": { "version": "1.6.1", "requirements": [ "websocket-client>=0.56.0", "wakeonlan>=2.0.0", "numpy>=1.19.2" ] }, "ytube_music_player": { "version": "20230321.01", "requirements": [ "ytmusicapi==0.25.0", "pytube==10.5.1", "integrationhelper==0.2.2" ] }, "alexa_media": { "version": "4.6.5", "requirements": [ "alexapy==1.26.8", "packaging>=20.3", "wrapt>=1.12.1" ] }, "aqara_gateway": { "version": "0.0.14", "requirements": [ "paho-mqtt>=1.5.0" ] }, "smartthinq_sensors": { "version": "0.33.3", "requirements": [ "pycountry>=20.7.3", "xmltodict>=0.12.0", "charset_normalizer>=2.0.0" ] }, "webrtc": { "version": "v3.3.0", "requirements": [] }, "samsungtv_smart": { "version": "0.12.0", "requirements": [ "websocket-client!=1.4.0,>=0.58.0", "wakeonlan>=2.0.0", "aiofiles>=0.8.0", "casttube>=0.2.1" ] }, "bodymiscale": { "version": "3.0.8", "requirements": [ "cachetools==5.3.0" ] }, "ui_lovelace_minimalist": { "version": "v1.3.6", "requirements": [ "aiofiles==0.8.0", "aiogithubapi>=22.2.4" ] }, "argon40": { "version": "0.0.5", "requirements": [ "RPi.GPIO==0.7.1", "smbus-cffi==0.5.1" ] }, "spotcast": { "version": "v3.6.30", "requirements": [] } }, "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.5.4", "zeroconf": [], "is_built_in": false }, "data": { "config_entry": { "entry_id": "fea9c576104058230a74b7f256923075", "version": 1, "domain": "ttlock", "title": "TTLock", "data": { "auth_implementation": "ttlock_547c7f0cd00f44589ec8008e09871659", "token": "REDACTED", "webhook_id": "0bdc3ccd28460246192cc13176081eb64ccb3b7d956fc6c659346de648b55006", "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": [] } }

mageali avatar Sep 09 '23 19:09 mageali