I am doing some work on extending a binding, and I need to better understand the Representation Property.
If you use discovery processes to discover a thing, you can call
.withProperty() with a property name/value pair and call
.withRepresentationProperty() to inform the core that the respective property name is its Representation Property.
The name of the Representation Property is also identified in the
But how does it work when you create a thing manually in a .things file, or otherwise via the UI? When you do that, you can set the Configuration Parameters, but there seems to be no way to set its Representation Property. I have a gut feeling that if there is a Configuration Parameter with the same name as the Representation Property then the core will ‘auto-magically’ use the Configuration Parameter value as the Representation Property. => Is that true? (If so, it is not well documented).
In the binding that I am working on, the Representation Property was not implemented in auto discovery, and not described in
thing-types.xml. However the Configuration Parameters is implemented Ok. So if I fix the auto discovery code, and the
thing-types.xml, is it safe to assume that the above ‘auto-magic’ would retroactively fill Representation Property = Configuration Parameter on any “legacy” things in the users system?