Skip to content

Commit

Permalink
Upnp add M-SEARCH with search target ST: upnp:rootdevice header (#3933)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
  • Loading branch information
andrewfg authored Dec 19, 2023
1 parent 24b1784 commit 3362bfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
*/
package org.openhab.core.config.discovery.addon.upnp;

import static org.openhab.core.config.discovery.addon.AddonFinderConstants.*;
import static org.openhab.core.config.discovery.addon.AddonFinderConstants.SERVICE_NAME_UPNP;
import static org.openhab.core.config.discovery.addon.AddonFinderConstants.SERVICE_TYPE_UPNP;

import java.net.URI;
import java.util.HashSet;
Expand All @@ -25,6 +26,7 @@
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.jupnp.UpnpService;
import org.jupnp.model.message.header.RootDeviceHeader;
import org.jupnp.model.meta.DeviceDetails;
import org.jupnp.model.meta.LocalDevice;
import org.jupnp.model.meta.ManufacturerDetails;
Expand Down Expand Up @@ -86,6 +88,7 @@ public UpnpAddonFinder(@Reference UpnpService upnpService) {
}
registry.addListener(this);
upnpService.getControlPoint().search();
upnpService.getControlPoint().search(new RootDeviceHeader());
}

@Deactivate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import org.eclipse.jdt.annotation.Nullable;
import org.jupnp.UpnpService;
import org.jupnp.model.message.header.RootDeviceHeader;
import org.jupnp.model.meta.LocalDevice;
import org.jupnp.model.meta.RemoteDevice;
import org.jupnp.model.types.UDN;
Expand Down Expand Up @@ -151,6 +152,7 @@ protected void startScan() {
}
upnpService.getRegistry().addListener(this);
upnpService.getControlPoint().search();
upnpService.getControlPoint().search(new RootDeviceHeader());
}

@Override
Expand Down

0 comments on commit 3362bfb

Please sign in to comment.