jbergler / hass-ttlock

Home Assistant integration for TTLock locks
54 stars 12 forks source link

Inconsistent/slow updates from locks #22

Closed jbergler closed 1 year ago

jbergler commented 1 year ago

I've played a little more and It's getting some of the status updates, some take over a minute to come through. Is there anything i can do to improve this?

Screenshot 2023-04-21 at 09 24 21

Originally posted by @stevearmitage in https://github.com/jbergler/hass-ttlock/issues/1#issuecomment-1517127650

jbergler commented 1 year ago

@stevearmitage I think I'll need more data from you to dig into this.

My suspicion is that the data is just not coming through TTLock's cloud reliably, but if you could turn on debug mode for the extension your home assistant logs should have the raw events as they are received via the webhook.

If you see an event come in, but it's not being processed can you share those logs and I can take a look.

stevearmitage commented 1 year ago

This is probably the cause

This error originated from a custom integration.

Logger: custom_components.ttlock.api Source: custom_components/ttlock/api.py:88 Integration: TTLock (documentation, issues) First occurred: 14:39:13 (1 occurrences) Last logged: 14:39:13

Received bad state for <custom_components.ttlock.api.ApiLock object at 0xffff576f53f0> state={'errcode': -3003, 'errmsg': 'The gateway is busy. Please try again later.', 'description': '网关正忙,请稍后再试。'}

jbergler commented 1 year ago

What is that in response to?

Are you interacting with your gateway at the same time with anything else?

jbergler commented 1 year ago

For the record, I think this was addressed by the changes for #34 so I'm going to mark this as closed but please feel free to re-open it if you still see these issues.