Reflection: Feature category and type

Hello everyone,

We exchanged with @Sescandell last weekend about the zwave service. After quite a few exchanges, we realized that the categorization of devices is not simple and this difficulty is probably not unique to zwave.

For example, some devices such as « roller shutter » modules can control gates, roller shutters, sectional doors, etc. Similarly, a connected socket can control a lamp, a dryer, a TV, or anything else - whether it’s zwave, wifi, xiaomi, or something else.

With these quite generic devices, we wanted to propose an idea: Set a default device category/type that is rather generic. For example, for a connected socket:

  • type: switch
  • category: on/off

For a roller shutter module:

  • type: switch
  • category: motor

And then allow the user to modify it themselves by changing the feature (which derives from the category/type pair). A connected socket could therefore very well become a lamp. So when you ask gladys « turn on the lights, » it consequently turns on the connected socket.

Second point: Have a common repository for all services, including:

  • device category
  • device type
  • feature label

Today, we have the category/type part listed in « utils/constants.js ». The label part is free. Therefore, two devices performing the same function - for example, a zwave connected socket and a xiaomi connected socket can both measure consumption in kwh but the labels are not the same, which is shocking on the dashboard. Moreover, in its current state, the label is hard-coded, it is not translatable (if I am not mistaken, I have a doubt).

What do you think? I believe some of you are working on zigbee, how do you categorize the devices? You have surely encountered the same complexities as us with zwave.

I completely agree with you!

Yes, 100% agree, currently this is not possible and it’s a shame

Yes! I agree

What I see would be 2 translation files, style « server/config/i18n/fr.json » to be able to manage internationalization

This change will affect all existing services. Have you planned a developer call in the future? It could be one of the topics covered.

Nothing planned but we can do that :slight_smile:

After that, I don’t necessarily think a dev call is necessary, it’s something we’ve been talking about for a long time, and we don’t have to do everything at once. We can start with Z-Wave, and then gradually migrate the services.

Yes, we can migrate gradually. The most important thing is to list the feature types, categories, and labels :wink:

Hi, I’m crashing the party…

If your modifications are pretty simple, like copy-pasting, noobs like me could give you a hand?