MQTT2 and Tasmota, contact transformations don't seem to work

Thanks, I must have a play with the REST API, I haven’t explored it yet.

I just took a quick look at the REST APi, looks very promising! Do you think any duff information from a config file won’t be returned by the REST APi, even if it doesn’t cause an error in the log? For that matter could I export things generated by a config file, delete the file, edit the JSON from the APi and then reimport them?

I don’t really know. I think the JSON would be returned by the REST API whether the Thing is defined using .things files or not. The Thing shows up in PaperUI and the REST API is where it get’s all the information it presents. I think you could query for the Things, delete the file, and re-import them through the REST API.

There are some gotchas to watch out for. Make double sure the Things are created with the same IDs. If not, make sure to delete all the Links on the Items prior to deleting the Things if you’ve created any Links through PaperUI. With .items files you are probably OK but I’ve seen some odd problems when Links become orphaned.

I would probably restart OH after deleting the .things files too just to make sure that everything get’s cleared out of memory. This is most likely unnecessary but it doesn’t cost much time and lets you be sure.

And for the record, the replacement for PaperUI has built in the ability to import Items from .items files natively and in some limited testing I’ve done it works very well. I would not be surprised if there is a similar capability to import Things from .things files built into that new UI as well.

2 Likes