eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
861 stars 784 forks source link

Paper UI: show more / show less button no more available for things with channel groups #3127

Closed lolodomo closed 7 years ago

lolodomo commented 7 years ago

For thing types using channel groups, the button "show more" / "show less" is no more available in Paper UI.

kaikreuzer commented 7 years ago

@aounhaider1 Could you please check?

aounhaider1 commented 7 years ago

Seems to be working fine with sonos and astro bindings. Can you please provide the xml that you are using for defining channels types?

lolodomo commented 7 years ago

I tested with a astro thing type.

aounhaider1 commented 7 years ago

Are you defining the advanced property on channel-type or channel-group-type? I noticed that advanced property is allowed on group but it is not returned in rest response. It is defined in ChannelGroupType but is not present in ChannelGroupDefinitionDTO. @kaikreuzer @maggu2810 is this intentional?

lolodomo commented 7 years ago

My intention was to add ir on a channel group type in order to test a fix for issue #1497. But now I am just using the current astro binding and the button is not available. Maybe the button is hidden in case there are no advanced channels for the thing ?

In case it is the case, I will first add the advanced flag on a channel type of the astro binding.

maggu2810 commented 7 years ago

The ChannelDefinitionDTO aggregates information of the ChannelType and ChannelDefinition. Is this is done for the Channel this way, it would be consistent to do the same for the ChannelGroup.

Perhaps someone can give me short summary why we need a ChannelDefinition if there is already a ChannelType and a Channel DTO. Which should be used when?

lolodomo commented 7 years ago

I discovered that Paper UI is clever enough and does not display the button in case it thinks there are no advanced channels for the thing. It apparently does not consider the advanced flag on channel group types. But we fail back to the issue #1497. So I close this issue.

lolodomo commented 7 years ago

@maggu2810 : to follow you analysis, it looks like ChannelGroupDefinitionDTO is missing a member "advanced". I will try to add it and see what happens.

lolodomo commented 7 years ago

@maggu2810 : making advanced available in ChannelGroupDefinitionDTO is the solution. I can now fix Paper UI as the information is now available.