iobroker-community-adapters / ioBroker.alias-manager

Manages iobroker aliases
MIT License
12 stars 2 forks source link

Folder structure of objects when using Auto-Creation #31

Open Kaiman77 opened 2 years ago

Kaiman77 commented 2 years ago

When using the auto creation functionality, the adapter doesn't consider the folder structure of the original device. For example a Shelly 2.5 has some folders in the objects tree. The auto creation from the alias adapter puts all of those flat in the device folder. Taking over the original folder structure would make the overview much better.

sbormann commented 2 years ago

I think this depends on the point of view, but in my oppinion, the aliases should represent a very abstract model of your devices, that should not depend on the brand or adapter you use. Only this way it is ensured, that you can easily exchange devices - even from different brands. Therefore i think you lose one of the greatest advantages of aliases, if you map the given folder structure of a specific adapter like shelly in detail. Better use a structure, that fits to most of the possible products on the market.

ldittmar81 commented 2 years ago

An alias should have the same structure on every device. It doesn't matter if Shelly, Homematic or something else. A homematic light device, for example, should have the same datapoints as a Shelly light. If a device have additional points, like a light with temperature measurements, you should create two devices. One light and one temperature.

Kaiman77 commented 2 years ago

Agree that your use case is absolutely a valid one, too.

But my use case would be to replace broken devices by the same new one and it's definitely beneficial here to also have very specific data points available. In the automatic detection, the data points are taken anyway as is, but without the structure. So to have the OPTION to include the structure would be good. You can still deactivate it and have today's behavior :-)

Talking about it in the iobroker Facebook group there were several people who agreed about it at least.

sbormann commented 2 years ago

I will think about it and how to add it as an option.

Kaiman77 commented 2 years ago

Great, if you need more details just let me know.

Maybe what could help. If I see the proposed data points, I just have to add folder. in front of the alias name and it creates the folders already. All that would help is, that the proposed alias names already contain the folder. 😉