Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

August Lock integration broken in Home Assistant 2021.12.9 #64023

Closed
awshirley opened this issue Jan 13, 2022 · 33 comments · Fixed by #64143
Closed

August Lock integration broken in Home Assistant 2021.12.9 #64023

awshirley opened this issue Jan 13, 2022 · 33 comments · Fixed by #64143
Assignees

Comments

@awshirley
Copy link

The problem

My August Locks were working fine with Home Assistant 2021.12.8. After I installed Home Assistant 2021.12.9, the locks will not work with Home Assistant and there's nothing in the logs to indicate any errors.

What version of Home Assistant Core has the issue?

Home Assistant 2021.12.9

What was the last working version of Home Assistant Core?

Home Assistant 2021.12.8

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

August Locks

Link to integration documentation on our website

https://www.home-assistant.io/integrations/august/

Example YAML snippet

Nothing in my YAML has been changed for several months

Anything in the logs that might be useful for us?

No error messages are found in the logs

Additional information

No response

@probot-home-assistant
Copy link

august documentation
august source
(message by IssueLinks)

@probot-home-assistant
Copy link

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (august) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

We switched to the async call because of timeouts with the cloud service in 2021.12.9. In theory it should be more reliable because it's the same api the newer app is using.

Would you please turn on debug logging for 'yalexs' and try to lock and unlock the lock to see if there is any error?

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

Also it would be helpful to know which lock you have

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

It would be good to get logs for 'pubnub' as well

@awshirley
Copy link
Author

I have an August Lock Gen 2.

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

logger:
default: info
logs:
homeassistant.components.august: debug
yalexs: debug
pubnub: debug

Something like this should give the logs. The formatting isn't correct above though since I am mobile

@awshirley
Copy link
Author

Thanks for the logger info. I'm adding the parts from my log. The August init and then from when I try to unlock a door.

2022-01-12 23:22:17 INFO (MainThread) [homeassistant.setup] Setting up august
2022-01-12 23:22:17 INFO (MainThread) [homeassistant.setup] Setup of domain august took 0.0 seconds

2022-01-12 23:22:24 DEBUG (MainThread) [homeassistant.components.august] Started retrieving detail for Front Door (651AD613647D4CBFBA5DAFE7C90F6E9B)
2022-01-12 23:22:24 DEBUG (MainThread) [homeassistant.components.august] Started retrieving detail for Back Door (B0949EA3D47B4679B37322DE95AD8F71)
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august] Completed retrieving detail for Front Door (651AD613647D4CBFBA5DAFE7C90F6E9B)
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august] async_signal_device_id_update (from detail updates): 651AD613647D4CBFBA5DAFE7C90F6E9B
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august] Completed retrieving detail for Back Door (B0949EA3D47B4679B37322DE95AD8F71)
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august] async_signal_device_id_update (from detail updates): B0949EA3D47B4679B37322DE95AD8F71
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.activity] Start retrieving device activities
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.activity] Updating device activity for house id 9e3e52ce-8139-44e0-a587-10219a0a3a37
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.activity] Completed retrieving device activities for house id 9e3e52ce-8139-44e0-a587-10219a0a3a37
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.activity] async_signal_device_id_update (from activity stream): B0949EA3D47B4679B37322DE95AD8F71
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.activity] async_signal_device_id_update (from activity stream): 651AD613647D4CBFBA5DAFE7C90F6E9B
2022-01-12 23:22:25 INFO (MainThread) [homeassistant.components.camera] Setting up camera.august
2022-01-12 23:22:25 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.august
2022-01-12 23:22:25 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.august
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.binary_sensor] Adding sensor class door for Front Door
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.binary_sensor] Adding sensor class door for Back Door
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.sensor] Adding battery sensor for Front Door
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.sensor] Adding battery sensor for Back Door
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.sensor] Not adding keypad battery sensor for Front Door because it is not present
2022-01-12 23:22:25 DEBUG (MainThread) [homeassistant.components.august.sensor] Not adding keypad battery sensor for Back Door because it is not present
2022-01-12 23:22:25 INFO (SyncWorker_1) [homeassistant.loader] Loaded lock from homeassistant.components.lock

2022-01-12 23:22:35 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:22:45 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:22:55 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:23:05 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:23:15 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:23:25 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:23:35 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:23:45 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:23:55 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:24:05 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:24:15 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:24:25 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:24:35 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected
2022-01-12 23:24:45 DEBUG (MainThread) [homeassistant.components.august.activity] Skipping update because pubnub is connected

Looks from the log like pubnub has something to do with it...

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

It looks like the yalexs and pubnub logs are missing. It should be much more verbose and show the actual http requests

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

Here is the logger yaml pre-formatted:

logger:
    default: info
    logs:
        homeassistant.components.august: debug
        yalexs: debug
        pubnub: debug

@awshirley
Copy link
Author

My bad. I didn't have yalexs and pubnub set correctly in the logging.

I've corrected that error and now I have info from all three. I'm concerned about posting the log here. My email address, phone number and other personal information are in the logs.

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

You can fully scrub the log manually or scrub as much as you can and e-mail to nick@koston.org

@awshirley
Copy link
Author

I've scrubbed the log, but will email it to you directly as I'm sure I didn't get everything.

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

It looks like the api is happily responding saying it accepted (202) the unlock request.

I’m at a loss as to why its not working. August added certificate pinning to their apps so its hard to get dumps of what the app does anymore so there is a bit of guess work to figure out what they have changed in their api recently.

I’m not sure we are going to be able to fix this one without reverting the change which would cause the original problem to come back where the requests to unlock/lock were timing out and failing.

@awshirley
Copy link
Author

Would it be possible for me to "pin" the August integration from 2021.12.8, while upgrading the rest of HA to 2021.12.9?

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

You could extract the old version and install it in /config/custom_components/august and restart

@awshirley
Copy link
Author

Where do I find the previous version? I've looked in /usr/share/hassio and didn't find it.

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

@awshirley
Copy link
Author

Thank you.! That took care of the problem (for now). If there's anything I can do with testing the August integration, please let me know.

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

I was able to get dumps from the current app after a bit of testing. Unfortunately its using the new endpoint call for all the locks I own [ Pro (v3), Conexis L1, and Yale Assure Locks ] (which are working fine).

I found a gen2 lock on ebay with bridge that was open box. I'll see if it is using a different endpoint once it shows up in a few days, or if there is a way to determine if we should use the old api call for those locks only (hopefully they won't have the 560 problem that caused us to switch to the new api call)

@awshirley
Copy link
Author

That's interesting. I never had any problems with the lock failing except for once in a while. It wasn't consistent and I'd to months before seeing the failure again. When I'd look at the logs, the failure looked like something on August's end.

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

When I'd look at the logs, the failure looked like something on August's end.

That's likely the 560 problem. The api returns error code 560 from August's servers because the command times out before it can complete. The newer call doesn't have that problem, unfortunately it doesn't seem to work with your lock? or bridge? or something else in the mix (even though it doesn't error which makes it harder to figure out)

I'm hoping the gen2 I ordered off ebay doesn't work so I can figure out whats wrong

@awshirley
Copy link
Author

I don't remember ever seeing 560 in the logs. But it's been so long, the old log has been deleted.

@bdraco
Copy link
Member

bdraco commented Jan 13, 2022

Its a bit of a shot in the dark, but I do recall we had a similar report a few months ago where where doing a complete reset of the connect bridge fixed not being able to unlock/lock. There is a possibility bridge isn't fully registered correctly which is way the new api doesn't work, or it might just be a case the bridge is too old to support it and we don't have a way to know that currently.

@gmcaesar
Copy link

I'm having the same problem with the gen 1 lock, will try a full reset tomorrow, but it responded through the assist app, and sends state, but just sits there when HA tells it to do something

@bdraco
Copy link
Member

bdraco commented Jan 14, 2022

If you could enable debug logs and send the result of the lock detail api call, I might be able to figure out what's different and build a solution before the one I bought off of eBay arrives.

Same for the gen 2 lock as well.

@homeadrianos
Copy link

homeadrianos commented Jan 14, 2022

Same problem with me. My August Lock Integration also Stopped working with the updade. I have August Lock Gen 2 and also the Gateway working fine with the iphone app, but integration completly ignores any comand to LOCK or UNLOCK. Nothing happens.

This great integration this the the only way everybody in my place gets home :) .... I haven't found anything wrong in the logs though .

If I can help and if you need more information please advise.

@bdraco
Copy link
Member

bdraco commented Jan 14, 2022

If someone with a Gen1 or Gen2 can't get the lock detail logs and is willing to share their lock with owner access, I can take the dumps. My dev account is

augustdev@koston.org
‪(440) 623-7226‬

@bdraco
Copy link
Member

bdraco commented Jan 14, 2022

If I can help and if you need more information please advise.

I need a sanitized (change the IDs to generic numbers and names) dump of the lock detail api call from a gen1 and a gen2 lock to determine how to solve this. If you don't want to post it here, you can email it to nick@koston.org

It looks like this in the log

2022-01-14 20:08:51 DEBUG (MainThread) [yalexs.api_async] About to call https://api-production.august.com/locks/XXXXXXX with header={'Accept-Version': '0.0.1', 'x-...I'} and payload=None
2022-01-14 20:08:51 DEBUG (MainThread) [yalexs.api_async] Received API response: 200, b'{"LockName":"Upstairs Door","Type":1001,"Created":"2021-03-17T01:45:49.763Z","Updated":"2021-03-17T01:45:49.763Z","LockID":"snip",

You need to enable debug logging and restart for it to appear

logger:
    default: info
    logs:
        homeassistant.components.august: debug
        yalexs: debug
        pubnub: debug

@bdraco
Copy link
Member

bdraco commented Jan 14, 2022

If you want to try the fix from #64143 before its released

mkdir /config/custom_components
cd /config/custom_components
git clone https://github.com/bdraco/august august

Then restart

If its using the custom one you'll see something like this in the log 2022-01-01 22:33:00 WARNING (SyncWorker_6) [homeassistant.loader] We found a custom integration august 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

@bdraco
Copy link
Member

bdraco commented Jan 14, 2022

Thanks @homeadrianos for sharing access so I could test 👍

@awshirley
Copy link
Author

I've tried the new code and it's working great! Thank you for getting this fixed so quicly!

@bdraco
Copy link
Member

bdraco commented Jan 15, 2022

Excellent. I'm glad we were able to use the new api call (slightly modified) for the older locks as well as it should resolve the unreliable locking issue for them as well. 🤞

@github-actions github-actions bot locked and limited conversation to collaborators Feb 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants