I am stuck on OH2.4 and decided now to move on with OH3.4.4 (while I already ask myself if I should have gone to v4)
First I started to try-out how OH3.4.4 works and I am now able to do basically all to recreate my setup. But… as I have so many things, I am at the point where I want to serialize my work.
=> So I red below tips-and-tricks, which I find very good.
Here it says…
Create an exemplar using the UI
Open the API Explorer from the Developer Tools
Query for your exemplar and copy the JSON
Navigate to the “create” end point and paste in the JSON
Edit the JSON for your new instance
Click submit to create the new instance
Repeat steps 5 and 6 for all the other similar stuff.
Pt3, my template thing looks like this (and it works):
Pt4 4. (Navigate to the “create” end point)… I assume this is “POST / THINGS”
=> My questions are
Q1: how I create the UID? Can I create one… or will the system do that? I mean this part in bold… “uid”: “mqtt:topic:def72de12d:y01_eg_bar_licht:y_eg_bar_licht”
Q2: Is it possible to use variables to replace reoccuring text like the MQTT-Topic?
While I understood now that the bold-part of question one represents the MQTT-UID… I start to have doubt that I really extracted the THING itself… it looks more like the CODE-PART/Channels of the thing.
=> how I extract the THING-TEMPLATE in the api-explorer? Is it not under
I seem to have clearly not extracted the full thing… because it must look like this:
It seems to me that I do something wrong in the api-explorer and it only shows me the channel part but not the Thing - Config.
=> anyone who can give me a hint, how I extract a full-thing-config from Api-Explorer, so that I can create 90 similar ones based on them? I want to avoid that I have to do the manual Thing creation by UI one by one.
That’s a huge jump. Take it slowly, study the Getting Started Tutorial, and don’t try to do too much all at once.
You’ve used quotes. Please use code fences.
code goes here
That will preserve the spacing and make it much easier to read code, logs, etc.
It depends on the binding and the type of the Item. In that particular case, the random part comes from the MQTT Broker Thing. That’s what tells OH which Broker the Thing belongs to.
I recommend always replacing the randomly generated UID for all Things, Items, Rules, and everywhere else they are created with something human readable and meaningful. For example, the ID for my MQTT things looks like mqtt:topic:mosquitto:garage_sensor_reporter and my MQTT Broker Thing’s ID is mqtt:broker:mosquitto.
The bulk of any MQTT Thing is going to be channel configuration stuff. Your JSON posted above looks like a full MQTT Thing’s JSON.
Copy of Things
Ahhh many thanks… so it a full Thing-Json I pulled but it is not in the order :slight_smile. Now that you tell it I see it.
=> I will try now to create a “template-Thing” and then create them as you proposed in your howto by copying them.
yes thanks for the tipp to take-it-easy. I have my old installation running and build up the new one in parallel. I saw already from your howto’s that the fast way means then to do it multiple times.
=> I will go from zero and the good thing with mqtt and homematic is that you can link those things to two running OH on the same time.
Another good thing is you can use the Remote openHAB add-on to link the two OH instances so they work together. For tricky bindings that hav hardware dependencies you can migrate all the Items and Rules and UI stuff first and leave the hardware and Things on the old instance, or you can move the hardware and Things first and leave the Items and Rules and stuff on the old OH instance and move them over gradually.
Given that OH 4.0 release is a week or two away, you might do well to migrate straight to 4. It will not be significantly more challenging nor all that different to jump straight to 4 and in the end it will probably be less work than to upgrade to 3.4 and then upgrade to 4.