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.