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:
- 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"
]
}
}
},
- 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