Kevo Plus door locks now working in Home Assistant

I’ve been running 2023.1 since the betas with no issues. What happened here is, while fixing these other bugs I discovered another bug. If, during startup, a connection error happened to Kevo, we’d just fail silently and the integration would never actually start up. Not good… So I added handling around that to use HA’s builtin retry system. Generally, it should just try again in a few seconds and connect fine. If it tries several times and keeps failing, it could require you to Reload the integration. But you’re correct, that log message didn’t exist before because it would just break and not generate any errors, now it handles it gracefully. Basically it just means their server didn’t respond to the login or get locks request.

I haven’t had this happen and it’s not supposed to. It should have happened the first time HA restarted because I changed the device id algorithm based on our previous conversation. The device id showing up for the first time is what triggers that notification. Are you seeing it every time HA restarts? Or just the first time? Maybe I have a bug somewhere causing it to change the device ID unexpectedly, but I haven’t noticed this issue on my instance.

OK. So I’ve tried reloading the integration but I was just seeing the same thing.

I remove the integration, restarted HA, and attempted to re-install the integration but I can’t get past the initial username/password login anymore.

The error logs are as follows:

2023-01-07 16:21:56.331 ERROR (MainThread) [custom_components.kevo_plus.config_flow] Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/kevo_plus/config_flow.py", line 61, in async_step_user
    await self._api.login(user_input["username"], user_input["password"])
  File "/usr/local/lib/python3.10/site-packages/aiokevoplus/__init__.py", line 391, in login
    res.raise_for_status()
  File "/usr/local/lib/python3.10/site-packages/httpx/_models.py", line 749, in raise_for_status
    raise HTTPStatusError(message, request=request, response=self)
httpx.HTTPStatusError: Server error '500 Internal Server Error' for url 'https://identity.unikey.com/account/login'
For more information check: https://httpstatuses.com/500

I’ve verified that I can go to mykevo.com (and am opted into the new UI) and login with the same credentials.

OK, I think I’ve identified the issue I was facing.
I had created a new account just to use with HA. I went back and tried using my primary account with the HA Kevo integration and it all went fine.
The difference - The dedicated HA account I created had hyphens in the password. As soon as I changed them to underscores, it logged in fine.

So, is there something amiss with how the integration is handling passwords? Specifically, hyphens are causing it to break?

On my Dev system I uninstalled the old Kevo integration and added this one. I believe what needs to be done for anyone that used the previous integration is to remove it and then manually delete any entities that are remaining before installing the new integration is added. This also means removing the yaml config before the reboot.

So far all of the locks (all six of them) are showing up. Something that I could never get going with the previous integration. The battery level is a nice touch as well.

In a few days I’ll add it to my production system.

I think this is going to not be related to the hyphens, and likely related to what I posted above where your device id is now based on the password. So changing your password changes that device id. What I’m wondering is if there are certain device IDs that are banned or something like that? Just a total guess, of course Kevo isn’t going to provide much assistance here :slight_smile: In any case I’ll keep testing but glad you got it working!

Good call, I didn’t mention that, but yeah. I’ll add it to the readme next time I publish an update.

1 Like

Hmm I’m starting to see this now too. I wonder if they changed something on their end? I also get it any time I login to mykevo.com. I don’t see anyway to disable these notifications.

1 Like

Hi, I have some Baldwin smart locks powered by Kevo that I want to try with this integration and I can report back if it works or not. This is a bit of a Newbie question, but I don’t see Kevo Plus in HACS, is there something I’m missing. Thanks!

You need to add a custom repository, GitHub - dcmeglio/home-assistant-kevo: Kevo Custom Component for Home Assistant

1 Like

Thanks @dman2306, I installed the latest beta version. Seems to work fine so far on both my Baldwin locks. They are different types, one deadbolt and one handle-set. If I run into any issues, I will report back. Thank you!

1 Like

Nice! I assume Baldwin and Weiser locks will work since I think it’s just branding but good to have confirmation of one!

I have 3 Kwikset Kevo gen2 locks. Now that they have finally added battery remaining into the app, I’ve noticed that all 3 locks ALWAYS have the same battery strength; even when I put fresh batteries in one of them.

Anyone else seeing same?

I have two Kevo locks, one gen1, and one gen2. Both battery levels show the same value.

1 Like

I managed to install my 2 kevo locks and they work fine. However, their states don’t update unless I restart home assistant. You can help me?

Looks like they changed the way the API works and it broke. Not sure if it’s fixable. I’d recommend disabling the integration for now since it’s continually reconnecting and failing. They’ll probably ban you at some point.

It still works to command the locks. The status just doesn’t update.

It looks like the integration @dman2306 wrote is working again? Status and everything working for me today.

It does seem that way. The errors we were getting connecting to the websocket seem to have gone away :man_shrugging:

I just had to do a restore yesterday and now kevo locks not working. Just says encountered an error. Can’t find logs for anything about locks.

I can no longer find Kevo Plus under the HACS UI search. Is it not supported anymore because of the issues stated recently above? Wondering if I can just load it manually?

Click the 3 dots in the corner and “Custom repositories”. Add the repo: GitHub - dcmeglio/home-assistant-kevo: Kevo Custom Component for Home Assistant

1 Like