How to Pre-populate "Location Field" for Thing in Paper UI's autodiscover Inbox [message #1753373] |
Sun, 05 February 2017 02:55  |
Eclipse User |
|
|
|
I am building my own binding and able to display all the discovered things in Paper UI inbox. It seems that in recent builds, there is a location field.
Anyone has any idea how to populate this field programitcally via custom binding? Following is the code that i use in my custom binding:
uid = new ThingUID(THING_TYPE_UID_TOPIC_THING, "device_" + strControllerId);
properties.put("topic", "device");
properties.put("deviceId", Integer.parseInt(strControllerId));
properties.put("location", strLocation);
discoveryResult = DiscoveryResultBuilder.create(uid).withProperties(properties)
.withRepresentationProperty("device_" + strControllerId)
.withLabel("Controller #: " + strControllerId + " Location: " + strLocation)
.withBridge(bridgeHandler.getThing().getUID()).build();
thingDiscovered(discoveryResult);
[Updated on: Sun, 05 February 2017 02:56] by Moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05673 seconds