I have create a Generic MQTT Thing via REST-API of openhab3. This Thing has 6 channels, which represent 6 sensor data points.
And then, I want to link the channels to the corresponding items. However, the link request has failed, because the Thing is not editabl (I have tried both with REST-API and on Main UI, both not working).
After that I also tried to delete the thing, but it also fails (both in REST-API and Main UI). The response from the API is:
"message": "Cannot update Thing mqtt:topic:de4a7bafe3:djs123test as it is not editable.",
So my question will be, how can I create an editable thing or make thing editable via REST-API? Or maybe someone can show me the best practice to batch create things and items, and then link them together.
Query for the Thing through the REST API Explorer and post the contents here.
Also double check your .things files to double check that the Thing isn’t defined there too.
Restart OH and see if the Thing is still marked as read only or can be edited now.
Finally, if all else fails the Thing can be manually removed from the JSONDB. But if this Thing truly was created through the REST API I don’t know of any way that it can become marked as read only. Only Things defined in .things file get that status.
I could actually solve this problem on that day by myself. The problem is that the payload I used is not 100% correct. Therefore, the created Things are “illegal” and then they can not be edited. But after I fix the error in the payload, the created Things are editable.