How to Pre-populate "Location Field" for Thing in Paper UI's autodiscover Inbox [message #1753373] |
Sun, 05 February 2017 07:55 |
Felix Lo Messages: 8 Registered: October 2015 |
Junior Member |
|
|
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 07:56] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.37035 seconds