smarthomej / addons

SmartHome/J addons for openHAB
Eclipse Public License 2.0
59 stars 24 forks source link

[deconz] finds the same thing again and again #336

Closed Markkuuss closed 2 years ago

Markkuuss commented 2 years ago

In the log file I continuously get the following messages. I have already ignored the Thing in the inbox - did not bring any success. Is it maybe because deconz is running on port 8081, which is not the default port?

2022-03-01 21:14:26.805 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'deconz:deconz:00212E004D54' to inbox.
2022-03-01 21:14:26.780 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been removed.
2022-03-01 21:14:26.805 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been added.
2022-03-01 21:14:35.494 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'deconz:deconz:00212E004D54' to inbox.
2022-03-01 21:14:35.247 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been removed.
2022-03-01 21:14:35.496 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been added.
2022-03-01 21:14:46.840 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'deconz:deconz:00212E004D54' to inbox.
2022-03-01 21:14:46.817 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been removed.
2022-03-01 21:14:46.840 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been added.
2022-03-01 21:14:55.464 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'deconz:deconz:00212E004D54' to inbox.
2022-03-01 21:14:55.180 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been removed.
2022-03-01 21:14:55.466 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been added.
2022-03-01 21:15:06.806 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'deconz:deconz:00212E004D54' to inbox.
2022-03-01 21:15:06.783 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been removed.
2022-03-01 21:15:06.806 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been added.
2022-03-01 21:15:15.260 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'deconz:deconz:00212E004D54' to inbox.
2022-03-01 21:15:15.231 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been removed.
2022-03-01 21:15:15.261 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been added.
2022-03-01 21:15:26.806 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'deconz:deconz:00212E004D54' to inbox.
2022-03-01 21:15:26.781 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been removed.
2022-03-01 21:15:26.808 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been added.
2022-03-01 21:15:35.395 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'deconz:deconz:00212E004D54' to inbox.
2022-03-01 21:15:35.257 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been removed.
2022-03-01 21:15:35.396 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been added.
2022-03-01 21:15:46.805 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'deconz:deconz:00212E004D54' to inbox.
2022-03-01 21:15:46.783 [INFO ] [openhab.event.InboxRemovedEvent     ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been removed.
2022-03-01 21:15:46.804 [INFO ] [openhab.event.InboxAddedEvent       ] - Discovery Result with UID 'deconz:deconz:00212E004D54' has been added.
J-N-K commented 2 years ago

No, I don't think it's related to the port. Looks like a bug in the discovery service implementation.

Can you please try the following (on the karaf console):

update org.smarthomej.binding.deconz https://download.smarthomej.org/org.smarthomej.binding.deconz-3.2.12-SNAPSHOT.jar

I have rewritten the part that looks suspicious.

Markkuuss commented 2 years ago

Can you please try the following (on the karaf console):

update org.smarthomej.binding.deconz https://download.smarthomej.org/org.smarthomej.binding.deconz-3.2.12-SNAPSHOT.jar

Unfortunately, this does not work for me. After the update all things are offline. When I try to restart the binding, I get an error message.

openhab> bundle:update org.smarthomej.binding.deconz https://download.smarthomej.org/org.smarthomej.binding.deconz-3.2.12-SNAPSHOT.jar
openhab> bundle:restart org.smarthomej.binding.deconz
Error executing command: Error restarting bundles:
        Unable to start bundle 336: Could not resolve module: org.smarthomej.binding.deconz [336]
  Unresolved requirement: Import-Package: org.smarthomej.commons; version="[3.2.12,3.3.0)"
J-N-K commented 2 years ago

My fault. Give me a minute

J-N-K commented 2 years ago

Please install

install https://download.smarthomej.org/org.smarthomej.commons-3.2.12-SNAPSHOT.jar

Do not use update on that bundle, it might cause issues.

Markkuuss commented 2 years ago

Thanks a lot, I'll test it right away.

I just made a new realization. It could also be due to my installation.

Maybe the problem is that I migrated one Deconz installation to another. Currently both instances are still running. The search in openHAB now shows sometimes the one and sometimes the other instance is shown with the same ID.

J-N-K commented 2 years ago

Yes, that could be a problem.

Markkuuss commented 2 years ago

Can you please try the following (on the karaf console):

update org.smarthomej.binding.deconz https://download.smarthomej.org/org.smarthomej.binding.deconz-3.2.12-SNAPSHOT.jar

I have rewritten the part that looks suspicious.

Unfortunately, this does not fix the error. But when I close my second instance, the error is gone.

I guess it's really my fault, because I exported the configuration from one Deconz installation and imported it at the new Deconz installation. I guess these two instances can't be clearly distinguished enough?

This is currently only a temporary solution anyway. I will close the second instance. Sorry for the effort.

J-N-K commented 2 years ago

I didn't realize it was bridge thing. The handling of these discovery results is not done by the binding but by a core component. The UDN is the property which is used to identify different devices and it is the same here (because it's essentially the same instance). Each different configuration (like the port) then updates the discovery result.