bwitting / homebridge-ttlock

Homebridge plugin for the TTLock Platform
Apache License 2.0
13 stars 5 forks source link

Locks not showing up in Homebridge #7

Open esraell opened 1 year ago

esraell commented 1 year ago

I followed through the documentation, made a new account with the Dev account, i can login through the TTLock app with the new username and see my locks, but i cannot see the locks through homebridge, I'v gone over everything and triple checked, but cant get it to work.

Logs:

[2/3/2023, 2:04:16 AM] [HB Supervisor] Restarting Homebridge...
[2/3/2023, 2:04:16 AM] [HB Supervisor] Starting Homebridge with extra flags: -I
[2/3/2023, 2:04:16 AM] [HB Supervisor] Started Homebridge v1.6.0 with PID: 66644
[2/3/2023, 2:04:17 AM] Loaded config.json with 0 accessories and 3 platforms.
[2/3/2023, 2:04:18 AM] Loaded 3 cached accessories from cachedAccessories.
[2/3/2023, 2:04:18 AM] ---
[2/3/2023, 2:04:20 AM] Loaded plugin: homebridge-config-ui-x@4.50.2
[2/3/2023, 2:04:20 AM] Registering platform 'homebridge-config-ui-x.config'
[2/3/2023, 2:04:20 AM] ---
[2/3/2023, 2:04:20 AM] The plugin "homebridge-govee" requires Node.js version of ^14.21.2 || ^16.19.0 || ^18.13.0 which does not satisfy the current Node.js version of v16.16.0. You may need to upgrade your installation of Node.js - see https://homebridge.io/w/JTKEF
[2/3/2023, 2:04:21 AM] Loaded plugin: homebridge-govee@7.9.1
[2/3/2023, 2:04:21 AM] Registering platform 'homebridge-govee.Govee'
[2/3/2023, 2:04:21 AM] ---
[2/3/2023, 2:04:21 AM] Loaded plugin: homebridge-ttlock@1.1.0
[2/3/2023, 2:04:21 AM] Registering platform 'homebridge-ttlock.ttlock'
[2/3/2023, 2:04:21 AM] ---
[2/3/2023, 2:04:21 AM] Loading 3 platforms...
[2/3/2023, 2:04:21 AM] [Govee] Initializing Govee platform...
[2/3/2023, 2:04:21 AM] [Govee] Initialising plugin v7.9.1 | System darwin | Node v16.16.0 | HB v1.6.0 | HAPNodeJS v0.11.0...
[2/3/2023, 2:04:21 AM] [TTLock] Initializing ttlock platform...
[2/3/2023, 2:04:21 AM] [Govee] Plugin initialised. Setting up accessories....            
[2/3/2023, 2:04:21 AM] Homebridge v1.6.0 (HAP v0.11.0) (Homebridge D151) is running on port 51370.
[2/3/2023, 2:04:23 AM] [Govee] [LAN] client enabled and found 0 device(s).
[2/3/2023, 2:04:23 AM] [Govee] [HTTP] client enabled and found 3 device(s).
[2/3/2023, 2:04:26 AM] [Govee] ✓ Setup complete. Have time to give this plugin a review? https://bit.ly/hb-govee-review

Plugin Config:

{
    "name": "TTLock",
    "clientid": “xxx”,
    "clientsecret": “xxx”,
    "username": “xxx”,
    "password": “xxx”,
    "batteryLowLevel": 20,
    "maximumApiRetry": 5,
    "platform": "TTLock Platform"
}

Environment:

dale-tectorsolutions commented 1 year ago

Try to manually edit the config with what I have below. Easiest way to get there, if you're not familiar is by clicking "Config" in the top right corner. Then change this line: "platform": "TTLock Platform"

To this: "platform": "ttlock"

Then restart Homebridge.

If that doesn't work, are you not seeing the lock under the "Accessories" tab on the homebridge website or you're not seeing the lock on the Home macOS/iOS app?

dale-tectorsolutions commented 1 year ago

Another thing to try is adding it to its own Child Bridge. It's been a while since I set mine up and I think I remember something about the creator saying it could slow down the main bridge if it's not on its own child bridge.

Might be worth updating Node.js if none of those work. I'm currently running v18.12.1 and have been since I installed.

esraell commented 1 year ago

So i updated my json config from: "platform": "TTLock Platform"

To: "platform": "ttlock"

and also updated my Node.js to version v18.14.0

But still no locks showing up in Homebridge Dashboard, the locks are currently managed by my Admin1 account, I logged into Admin1 and added my new account (generated via TTLock API) as an Authorized Admin to the locks. I'm thinking this may be the issue to why its not showing up in the Homebridge dashboard, I don't want to remove my locks from Admin1 account, is there any other way to get the locks to work without reseting them and provisioning to the new account.

dale-tectorsolutions commented 1 year ago

I'm not sure if there is a way to do that. When I set it up, I had my primary everyday account signed in on my phone. Then I made an admin account online.

After that, I made a new "normal" account and transfered the locks from my TTLock app to the new "normal" account.

There might be a way around doing it that way but I haven't dove deep enough into it to say for sure.

bwitting commented 1 year ago

@esraell - As far as I understand TTLock's API, @dale-tectorsolutions is correct. Using the developer account you created for everything will be the easiest way to move forward. I'll look at the API docs and see if there is a way to get locks that have been shared. If anyone wants to look into adding that functionality, I'd be grateful!