How to transform Things / Items from Auto-Discovery into Configuration-Files?

  • Platform information:
    • Hardware: QNAP Intel NAS
    • openHAB version: 2.2.0-1

openHAB runs quite fine on my NAS, but unfortunately it doesn’t start on a NAS reboot any more. I’ve read from some other users, that those have the same problem and they also have to re-install openHAB again on their QNAP NAS.
Hopefully that will be fixed in the future… but in the meantime (and in general) I would like to “transform” my Things & Items I’ve found by Auto-Discovery into .things and .items-Files, so that a re-install wouldn’t be so time consuming for set it up again.

I’ve found some json files in userdata\jsondb where that information seems to be stored, but I am stupid blind how I can use that information from the current installation to “migrate” / “transform” (even by hand would be ok) it into files, which can be re-used with a future re-installation of openHAB.

Maybe someone can help me.

BR, Stefan

You can’t.
Well you can manually create .items and .things file using jsondb files as the source, but there is no converter or export function.
For things, there usually is no need to do “master” configuration via .things files, just stick with what autodiscovery or manual additions via PaperUI or habmin get you.
For items you can do the same, but most people create their items manually by creation of the .items files.
But as you already have items in existence you probably used PaperUI and auto-creation on autodiscovery, and once you did that it’s a bad idea to try re-using these items.
So either stick with GUI admin or create a .items file and delete all of your existing items, but it’s safer to start from scratch in that case.
See also docs on this.

Doing it manually would be acceptable. That’s - in my special case with the problem with the QNAP - an acceptable way. Furthermore it would help to understand OH2 much better. So there is another benefit at the end.

Within the json for things, I have e.g. those two things:

  1. Osram Smart Plug+ connected via a Philips Hue Bridge
  "hue:0010:001788b3c5dd:1": {
    "class": "org.eclipse.smarthome.core.thing.internal.ThingImpl",
    "value": {
      "label": "Beamer Steckdose",
      "bridgeUID": {
        "segments": [
          "hue",
          "bridge",
          "001788b3c5dd"
        ]
      },
      "channels": [
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "hue",
              "0010",
              "001788b3c5dd",
              "1",
              "switch"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "hue",
              "switch"
            ]
          },
          "label": "Schalter",
          "description": "Erm?glicht das Ein- und Ausschalten.",
          "configuration": {
            "properties": {}
          },
          "properties": {},
          "defaultTags": [
            "Lighting"
          ]
        }
      ],
      "configuration": {
        "properties": {
          "lightId": "1"
        }
      },
      "properties": {
        "modelId": "Plug_01",
        "vendor": "OSRAM",
        "firmwareVersion": "V1.04.12",
        "uniqueId": "7c:b0:3e:aa:00:ac:cb:41-03"
      },
      "uid": {
        "segments": [
          "hue",
          "0010",
          "001788b3c5dd",
          "1"
        ]
      },
      "thingTypeUID": {
        "segments": [
          "hue",
          "0010"
        ]
      }
    }
  },

  1. A Homematic Thermostat
  "homematic:HM-CC-RT-DN:98d4a4cc:MEQ0449333": {
    "class": "org.eclipse.smarthome.core.thing.internal.ThingImpl",
    "value": {
      "label": "Thermostat Bad",
      "bridgeUID": {
        "segments": [
          "homematic",
          "bridge",
          "98d4a4cc"
        ]
      },
      "channels": [
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#UNREACH"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_UNREACH"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#INHIBIT"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_INHIBIT"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "String",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#FIRMWARE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_FIRMWARE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "String",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#BATTERY_TYPE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_BATTERY_TYPE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#RSSI"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_RSSI"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#STICKY_UNREACH"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_STICKY_UNREACH"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#DEVICE_IN_BOOTLOADER"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_DEVICE_IN_BOOTLOADER"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#SIGNAL_STRENGTH"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "system",
              "signal-strength"
            ]
          },
          "configuration": {
            "properties": {}
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#RSSI_DEVICE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_RSSI_DEVICE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#DELETE_DEVICE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_DELETE_DEVICE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#RSSI_PEER"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_RSSI_PEER"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#UPDATE_PENDING"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_UPDATE_PENDING"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#CONFIG_PENDING"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_CONFIG_PENDING"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "String",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#DELETE_DEVICE_MODE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_0_DELETE_DEVICE_MODE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "0#LOWBAT"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "system",
              "low-battery"
            ]
          },
          "configuration": {
            "properties": {}
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#BOOST_MODE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_BOOST_MODE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_START_MONTH"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_START_MONTH"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_STOP_DAY"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_STOP_DAY"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_STOP_MONTH"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_STOP_MONTH"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#LOWERING_MODE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_LOWERING_MODE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#BOOST_STATE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_BOOST_STATE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#MANU_MODE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_MANU_MODE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "String",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#FAULT_REPORTING"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_FAULT_REPORTING"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#VALVE_STATE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_VALVE_STATE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_START_DAY"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_START_DAY"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#SET_TEMPERATURE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_SET_TEMPERATURE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "String",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_MODE_SUBMIT"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_MODE_SUBMIT"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_START_YEAR"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_START_YEAR"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_STOP_YEAR"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_STOP_YEAR"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#AUTO_MODE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_AUTO_MODE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#ACTUAL_TEMPERATURE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_ACTUAL_TEMPERATURE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_STOP_TIME"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_STOP_TIME"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Switch",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#COMFORT_MODE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_COMFORT_MODE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#BATTERY_STATE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_BATTERY_STATE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "String",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#CONTROL_MODE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_CONTROL_MODE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_TEMPERATURE"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_TEMPERATURE"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        },
        {
          "acceptedItemType": "Number",
          "kind": "STATE",
          "uid": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN",
              "98d4a4cc",
              "MEQ0449333",
              "4#PARTY_START_TIME"
            ]
          },
          "channelTypeUID": {
            "segments": [
              "homematic",
              "HM-CC-RT-DN_4_PARTY_START_TIME"
            ]
          },
          "configuration": {
            "properties": {
              "delay": 0.0,
              "receiveDelay": 0.0
            }
          },
          "properties": {},
          "defaultTags": []
        }
      ],
      "configuration": {
        "properties": {
          "HMP_5_AES_ACTIVE": false,
          "HMP_6_AES_ACTIVE": false,
          "HMP_3_AES_ACTIVE": false
        }
      },
      "properties": {
        "modelId": "HM-CC-RT-DN",
        "vendor": "eQ-3 AG",
        "aesKey": "0",
        "firmwareVersion": "1.4",
        "batteryType": "2x AA/Mignon/LR06"
      },
      "uid": {
        "segments": [
          "homematic",
          "HM-CC-RT-DN",
          "98d4a4cc",
          "MEQ0449333"
        ]
      },
      "thingTypeUID": {
        "segments": [
          "homematic",
          "HM-CC-RT-DN"
        ]
      }
    }
  },

How can I “transform” those by hand into a valid .things-file?
Maybe I should use the Item-Channel-Link json?

Example for the same Osram Plug:

  "BeamerSteckdose_Schalter -\u003e hue:0010:001788b3c5dd:1:switch": {
    "class": "org.eclipse.smarthome.core.thing.link.ItemChannelLink",
    "value": {
      "channelUID": {
        "segments": [
          "hue",
          "0010",
          "001788b3c5dd",
          "1",
          "switch"
        ]
      },
      "configuration": {
        "properties": {}
      },
      "itemName": "BeamerSteckdose_Schalter"
    }
  },

So I would guess it could be something like:

Thing hue:0010:001788b3c5dd "BeamerSteckdose_Schalter" 

But then there is no information about the fact that it is a “Switch” and so on, what I guess I would need later on to create the Item…

Hope it is quite easy; that would help a lot.

BR, Stefan

You need to create the files. Search the docs and community for syntax. .items format is well documented, but you will find little on .things as only a few bindings allow for it and it is not recommended anyway (again: don’t go with .things files, you’re on your own there).

I’m using thing files every and it is working fine.

Here is an hue example file:

Bridge hue:bridge:<bridgeid> [ ipAddress="x.x.x.x", userName = "xxx" ] { 
    0210 22 "lamp" @ "room" [ lightId="22" ]
// <type> <Id> <name> @ <location> [ lightId="<Id>" ]
}

Here is an example from my homematic things file. Same structure. I am using homegear, so it differs slightly (you need to remove the “HG-” from the device type):

Bridge homematic:bridge:homegear "<bridgename>" @ "<location>" [ gatewayAddress="<gateway-ip>", 
							    callbackHost="<openHAB-ip>", 
                                                            binCallbackPort=9125, 
                                                            xmlCallbackPort=9126,
                                                            socketMaxAlive = 3600,
                                                            timeout = 120,
                                                            installModeDuration = 360 ]
{ 
    Thing HG-HM-CC-RT-DN NEQ0873951 "<name>" @ "<location>"     
// <type> <Id> <name> @ <location> 
}    

This is exactly the structure openHAB uses while discovering, so you do not get any fals discoveries. When this file is updated. You can put in as many devices as you like, just add them between the curly brackets. Create the files and restart openHAB.

@mstormi Got it now - I was first of all not cleary understanding, what you tried to point out.
So finally, I use the autodiscovery of the bindings again. But I create all Items manually, which also will help a lot.

@job Of course, a nice way - but maybe really to much work. Nevertheless: Thanks a lot for that support!

Hi, I am trying to do the same (moving things from Paper UI discovered entries in JSON database to a .thing file. I do it mainly for the purpose of learning all the available options.

I’ve got that:

  1. UID: block in DB goes in the first triplet after Bridge
  2. label: goes next
  3. configuration: goes next between square brackets

If I write this in my .things,

Bridge openwebnet:bus_gateway:MYHOMESERVER1_000350a469c9 "BUS Gateway MyHomeSERVER1 (xx.xx.xx.xx, v2.2)" [
    host="xx.xx.xx.xx", 
    port=20000, 
    passwd="xxxxxx"] {}

In the json db they go into the right place (the same as in auto discovery)

{"statusInfo":{"status":"ONLINE","statusDetail":"NONE"},
        "editable":true,
        "label":"BUS Gateway MyHomeSERVER1 (xx.xx.xx.xx, v2.2)",
        "configuration":{"host":"xx.xx.xx.xx","passwd":"xxxxxxxx"},
        "properties":{
            "model":"MyHomeServer1",
            "serialNumber":"yy:yy:yy:yy:yy:yy",
            "firmwareVersion":"2.2",
            "vendor":"BTicino"},
        "UID":"openwebnet:bus_gateway:MYHOMESERVER1_000350a469c9",
        "thingTypeUID":"openwebnet:bus_gateway",
        "channels":[]
        },

My questions are:

  1. How do I set the properties: field? e.g. The firmware version in PaperUI appears as “unknown” when the bridge is defined as above in the .things file
  2. Editable is false when the thing comes from a .things file and true when it comes from PaperUI. But I can edit it in PaperUI anyway