Okay this might be the problem here. PaperUI does not show any Type next to the Channel.
And that’s correct based on the REST API these channels do not have a Type.
But the Thing has two more Channels button1_count and button2_count, which are not shown by PaperUI. If they were shown, then it should be possible to create an Item link to the channels.
"UID": "innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2",
"thingTypeUID": "innogysmarthome:WSC2",
"channels": [{
"linkedItems": [],
"uid": "innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2:button1",
"id": "button1",
"channelTypeUID": "system:button",
"kind": "TRIGGER",
"label": "Button",
"defaultTags": [],
"properties": {},
"configuration": {}
}, {
"linkedItems": [],
"uid": "innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2:button2",
"id": "button2",
"channelTypeUID": "system:button",
"kind": "TRIGGER",
"label": "Button",
"defaultTags": [],
"properties": {},
"configuration": {}
}, {
"linkedItems": [],
"uid": "innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2:button1_count",
"id": "button1_count",
"channelTypeUID": "innogysmarthome:PushButtonCounter",
"itemType": "Number",
"kind": "STATE",
"label": "Button pushed count",
"description": "The count of button pushes.",
"defaultTags": [],
"properties": {},
"configuration": {}
}, {
"linkedItems": [],
"uid": "innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2:button2_count",
"id": "button2_count",
"channelTypeUID": "innogysmarthome:PushButtonCounter",
"itemType": "Number",
"kind": "STATE",
"label": "Button pushed count",
"description": "The count of button pushes.",
"defaultTags": [],
"properties": {},
"configuration": {}
}, {
"linkedItems": [],
"uid": "innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2:battery_low",
"id": "battery_low",
"channelTypeUID": "system:low-battery",
"itemType": "Switch",
"kind": "STATE",
"label": "Low Battery",
"defaultTags": [],
"properties": {},
"configuration": {}
}
]
So how can we fix this and tell PaperUI to show these two Channels button1_count and button2_count?
(maybe it’s because of the custom channelTypeUID - innogysmarthome:PushButtonCounter)
That was my misunderstanding. I was able to create an Item for each Channel. You are right, it makes no sense to have one Item for two Channels in this case.
Here are the REST API calls to link the two hidden Channels to new Items:
PUT /items
[
{
"type": "Number",
"name": "WSC2WohnzimmerSmartSwitchLivingRoom_Button1",
"label": "Wandschalter Wohnzimmer Button1",
"category": "Button",
"tags": [],
"groupNames": []
}
]
PUT /items
[
{
"type": "Number",
"name": "WSC2WohnzimmerSmartSwitchLivingRoom_Button2",
"label": "Wandschalter Wohnzimmer Button2",
"category": "Button",
"tags": [],
"groupNames": []
}
]
PUT /links/WSC2WohnzimmerSmartSwitchLivingRoom_Button1/innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2:button1_count
{
"itemName": "WSC2WohnzimmerSmartSwitchLivingRoom_Button1",
"channelUID": "innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2:button1_count",
"configuration": {}
}
PUT /links/WSC2WohnzimmerSmartSwitchLivingRoom_Button2/innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2:button2_count
{
"itemName": "WSC2WohnzimmerSmartSwitchLivingRoom_Button2",
"channelUID": "innogysmarthome:WSC2:036a58f0:22e09f2e674d4fd1aa5207a12250bec2:button2_count",
"configuration": {}
}