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

Lock connected to software bridge detected as NukiDevice #55

Closed
franfos opened this issue Jun 11, 2020 · 4 comments
Closed

Lock connected to software bridge detected as NukiDevice #55

franfos opened this issue Jun 11, 2020 · 4 comments

Comments

@franfos
Copy link

franfos commented Jun 11, 2020

I've just updated Home Assistant to latest version (0.111), and now the Nuki lock is not detected (connected to Android Nuki bridge).
I've seen that bridge.locks is empty, due to the software bridge doesn't return "deviceType" in list command and then is append as a NukiDevice to the devices list.
[{"nukiId":XXXXXX"name":"Cerradura","lastKnownState":{"state":1,"stateName":"locked","batteryCritical":false,"timestamp":"2020-06-11T07:26:03+02:00"}}]
So, I think for backwards compatibility, if there is no "deviceType" when retrieving _get_devices, it should be created as NukiLock instead of a NukiDevice.
What do you think?

@pschmitt
Copy link
Owner

Oh. I haven't thought about the software bridge at all when I implemented the fallback to NukiDevice. I don't particularly like the idea of defaulting to a specific device type when none is sent. Hm, a different fallback mechanism just for the sw bridge might be a "meh" option. Are you using the latest software bridge version, or are you on an older release? Have you reported this to Nuki?

@franfos
Copy link
Author

franfos commented Jun 12, 2020

Yes, I'm using the latest version (1.4.6).
No, I didn't contact Nuki to report this. I guess they will update the soft bridge sometime, but this behaviour should be the same with hardware bridges not updated, isn't?
So I think that this situation has to be taken into account.
I finally made it work, but it was a fast and dirty solution (all the request to _get_devices with lock parameter are set to none parameter, and also I had to append data["deviceType"] = 0 when unknown device detected).
Maybe a solution is to check for the firmware or app version in the list command. According to this, use or not the deviceType filter.

@franfos
Copy link
Author

franfos commented Jun 26, 2020

Do you have any idea on how to solve it? If you want me to test something, just let me know.

@pschmitt
Copy link
Owner

AFAIK the software bridge has been discontinued by Nuki. Closing.

@pschmitt pschmitt closed this as not planned Won't fix, can't repro, duplicate, stale Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants