-
Notifications
You must be signed in to change notification settings - Fork 40
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
v9.02 update mess - redundant information in MQTT #537
Comments
Note: Same update experience with a 2nd Nuki Hub from 9.01 to 9.02. After ping times out, a physical power cycle of the ESP is needed. Then, the web interface presents this (after the initial update tab times out long time ago, like http://esp-nuki-hub-door.domain/autoupdate?release=1&release=1&token=5028): Then: nothing has happened, still on 9.01 So second attempt with the green button: For half a second a two-liner is visible before the page times out (http://esp-nuki-hub-door.domain/autoupdate?release=1&release=1&token=1737). Reloading the default page after a few minutes now gives the 9.02 update. Now I had to reboot the Nuki Hub once again to make HA entities show up again at all (all unavailable). Besides that, the same mess in MQTT (HA to be precise) of course. I decided to simply disable all entities (because all of them are redundant end therefore completely useless) of the new additional Nuki Hub MQTT device. BUT: the second Nuki Hub MQTT device doesn't even has the "linked device" entry: seems another thing is broken here... I'm pretty done with NH updates for today. |
I confirm this new "nukihub" device creation with duplicate diagnostic entities created. I wouldn't call this a "mess", we have a different view of that word. I have experienced real messes in HA, and this not even close to those. I feel your frustration, but let's not exaggerate, you can simply disable those duplicate entities for now, no real production issues. |
Been there done that, see
Maybe a bit lost in translation. Redundant trash data is what I call a mess. Nevermind, "solved" (worked around) that for the moment. |
Hi everyone, i'm not sure whether it's the same issue, but i updated to 9.02 from 9.0 today. I also had to do the ota update process twice, but it worked afterwards. The problem started after restart of Homeassistant. Now HA is telling me that 'This entity is no longer being provided by the mqtt integration. If the entity is no longer in use, delete it in settings.' Neither nukihub nor the lock.* entities are active any more. I don't see a duplicate nukihub entity in my setup. Anyone got an idea how to fix this? |
Luckily I don't see that behavior which would be a real issue. But: I did not restart HA yet. I guess you should at first check in your MQTT broker if the Nuki Hub topics exist and if - once you restart a Nuki Hub - the corresponding topics in the homeassistant domain are created. Besides the overall update issues I tend to say this is a separate topic. We'll see how the maintainers will handle this. |
Hi @bcutter after downgrading and upgrading HA again (this happended during a bump from 2024.11.1 to 2024.11.3), i restarted nukihub and voila.. it's now working again. Don't know what caused this, but it seems to be solved by now. |
So can this be closed then, or does it need further investigation? |
Of course it requires further investigation. The actual doubling of a majority of entities is the main issue here (the other minor one the strange update process coming from 9.0/9.01). Only @tmakowka 's specific issue seems to be solved. |
I had only 4 entities duplicated. BTW: they're not really duplicates, after the upgrade the ones on the lock were orphaned, I simply deleted them. Can you show which entities are "duplicated"? The logic is that the two devices in HA represent the two physical devices: the esp hub and the Nuki Lock. Problem is that some diagnostic entities were part of the lock and they're now moved to the hub, but they're not updated in both. |
Those are not duplicate entities, they are orphaned (they're not being updated), since the "live" entities are now on the nukihub device. You simply need to delete them. Difference is I had 4 of them. You show the nukihub device, please show the same entities also on the lock. The ones on the hub should be "live" the ones on the lock should be unavailable (orphaned). |
IP and FW Update sensors, for example, should only be available on the nukihub device, not on the lock device. There are other 2-3 diag. sensors like that. You should see those orphaned on the lock, and active on the nukihub device. If that's not the case, @iranl / @technyon will probably need more info to understand what's happening in your case. In my case it was very simple, I just needed to delete 4 orphaned sensors from the lock. |
That's what it is for all my NHs. Tell me what is needed in terms of information/logs (or: safely purge all MQTT topics once and restart NHs?). |
The new NukiHub device separate from the lock and opener devices are there by design. This is the proper way of providing hub/coordinator etc. devices in Home Assistant and is for example the same as how it is done by Zigbee2MQTT. This actually prevents duplicate entities going forward as previously NukiHub IP/Firmware etc. was provided to HA in both lock and opener devices, causing duplicates for users that used both these devices through one NukiHub device. This was introduced based on a request in #494 in PR #515 It does cause some orphaned and/or duplicate entities in HA for users upgrading from earlier versions. To fully remove these you need to search for MQTT topics containing |
I'll have a look at MQTT topics at the weekend. You mean looking for the nuki_ like topics in the homeassistant or the nuki hub root topic? Curious to see if really only 4 entities are affected. With a bit of entity renaming everything should be back to normal in theory... In general I would like to be made aware of such changes in the release notes. As I read them. Sometimes twice. And then decide if the amount of changes makes this a 2 minutes stressless update or a one hour pain or something in between. Better a note than discovering strange behavior (not even consistent: one nuki hub has a link to the lock in HA, the other one does not) afterwards with the need of creating issues. Fundamental changes usually require such changes to be flagged as breaking change or similar. Better safe than sorry (a little extra note is overall probably less struggle than handling issues I guess). |
OK folks @iranl I need a bit more precise instruction on how to check/clean and hopefully finally fix this. So I repeat:
Following...
...blindly would result in huge trouble, as on the broker a lot of topics are found, even one not directly related to NH. So I need to know the root nodes to start searching, making sure to delete the right topics. Otherwise it's literally impossible to detect which entities should be orphaned on the lock device. As mentioned I have potentially 13 new entities on the NH device. Confusing. Maybe that's the better approach: delete all mqtt topics OF THE LOCK node for which an entity exists in HA in the new NH device (manual deduplication). What do you think? This is the MQTT/homeassistant/sensor topic:
What should be there and what shouldn't? How to safely remove things? Precise instruction please, I don't want to render my locks in my smart home broken because of this annoying upgrade rework. It gets even more difficult, e. g. looking at the switch domain: there's no "nuki_" prefix on the topic at all. above lock, below nuki hub (tested with the webserver setting): Edit: something's really broken here. I deleted both webserver topics and restarted the NH. Afterwards, a completely new MQTT device with the NH device default naming got recreated, all entities with new entity ids and enabled. Webserver entity is still "unknown". Checking the topic content it refers to Really starts to annoy me. Never touch a running system, so much wasted time already... another 1.5 hours today! 😠 |
To sum up my adventure of the last 3 hours which included fixing a endless reboot issue (#538 (comment)):
there's no reset or webserver topic in the mqtt "nuki_door_b/maintenance" section which might be the reason for this. The Nuki Hub simply does not create it. It did not no matter which version of NH was running: 9.02 or 9.03-master6. Done with NH (for today), gosh it totally broke my sunday evening. for nothing. |
PROBLEM DESCRIPTION
The update process from v9.01 to v9.02 was very tricky (update to latest version using the web interface, in the first attempt the ping timed out and a power cycle was needed, then switching from a strange partition "reboot to Nuki Hub" and initiating the update once again).
Now after successfully managing to upgrade to v9.02, there's a lot of things mixed up in MQTT looking at what is available in Home Assistant now:
Existing device, fine:
New device, unexpected and with redundant entities:
Is this a desired outcome or the result of a faulty update?
I don't get why one would need to have a sub set of entities redundantly available, one named by the lock (as it was for years) and in addition now one named by the Nuki Hub device.
If it's intentional (looks like as somehow the actual Nuki device is referenced as "linked device" at the bottom), I guess it's safe to disable all redundant entities or even delete the whole device, isn't it?
Quite confusing.
Please clarify.
Aside from this, in general, I'd really love to get back to Nuki Hub updates which a) don't create difficulties on really every single update and b) as a result don't waste a huge amount of time (for the first Nuki Hub now already one hour including this issure report). Stable updates are a long time ago unfortunately. Maybe we shouldn't pack too much changes in a minor release, looking at the quantity of 9.02 seems a bit oversized, just my 2 cents.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
TO REPRODUCE
Update NH v9.01 to NH v9.02
EXPECTED BEHAVIOUR
No new device in MQTT, no redundant set of entities
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: