I have discovered a device using UPnP. I set a new property from device details and created the discovery result.
Map<String, Object> properties = new HashMap<>(1);
properties.put(IPADDRESS, device.getDetails().getBaseURL());
DiscoveryResult result = DiscoveryResultBuilder.create(uid).withProperties(properties)
.withLabel(device.getDetails().getFriendlyName())
.withRepresentationProperty(device.getDisplayString()).build();
I created thing from Paper UI and it was created successfully. But I am unable to get the properties I set when creating the Discovery Result.
In initialize() method of handler
Map<String, String> properties = new HashMap<>(1);
properties = getThing().getProperties();
logger.info("Ip Address = "+ properties.get(IPADDRESS));
I am getting null. Please help me out here.