Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,19 @@ private synchronized void startDiscovery() {
}

if (services.containsKey(ServiceFamiliesDIB.ServiceFamily.Tunneling)) {
// .withProperty("type", "TUNNEL") was omitted to avoid reconfiguration
thingDiscovered(DiscoveryResultBuilder.create(new ThingUID(THING_TYPE_IP_BRIDGE, serial))
.withLabel(response.getDevice().getName()).withProperty("serialNumber", serial)
.withProperty("type", "TUNNEL")
.withProperty("ipAddress",
"" + response.getControlEndpoint().endpoint().getAddress().getHostAddress())
.withProperty("port", "" + response.getControlEndpoint().endpoint().getPort())
.withRepresentationProperty("serialNumber").build());
}
if (services.containsKey(ServiceFamiliesDIB.ServiceFamily.Routing)) {
// .withProperty("type", "ROUTER") was omitted to avoid reconfiguration
thingDiscovered(DiscoveryResultBuilder.create(new ThingUID(THING_TYPE_IP_BRIDGE, serial))
.withLabel(response.getDevice().getName() + " (router mode)")
.withProperty("serialNumber", serial + "-r").withProperty("type", "ROUTER")
.withProperty("ipAddress", "224.0.23.12")
.withProperty("serialNumber", serial + "-r").withProperty("ipAddress", "224.0.23.12")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know, it is unrelated to this PR, but as I stumble over it here: Why is the IP address of the router set to its multicast address? Surely, the router listens via multicast, but it also has a physical IP address, which I would rather expect here. I would rather either set the physical address (i.e. similar as for tunnel) or omit the ip address completely as it is of no specific value (as the multicast address is static and identical for all KNX routers).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://www.openhab.org/addons/bindings/knx/#ip-gateway

If I get the docs correctly, it says that you could put the multicast address.

I don't have routers (not even older ones without security) at hand, so this part is a bit weak.....

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"the IPv4 Multicast Address can be set" ... but is useless.
Well, nothing to change for 5.1, but maybe this should simply be removed for 5.2...

.withProperty("port", "" + response.getControlEndpoint().endpoint().getPort())
.withRepresentationProperty("serialNumber").build());
}
Expand Down