I have a use-case where the "href" of the forms in the Thing Description must contain the MAC address of the device (or some ID unique to that device). The form description would look as follows:
"forms": [
{
"op": [
"readproperty"
],
"href": "/things/01-02-03-04-05-06/properties/temperature",
"contentType": "application/json",
"mqv:controlPacketValue": "SUBSCRIBE"
}
]
I think it would make sense to use a placeholder for the MAC address like this
"href": "/things/[MAC]/properties/temperature"
The device would then replace the placeholder with its own MAC. This way, the Thing Description doesn't have to be adjusted when a different device is used.
Does the WoT specification consider the use of such placeholders in the Thing Description? Does anything speak against the Thing modifying its own Thing Description?
This idea might also be expanded to having the Thing setting other attributes in the TD, to the Thing completely generating its own TD (although the effort for this stand in no relation to the use, in my case).