mysensors / MySensors

MySensors library and examples
https://www.mysensors.org
1.32k stars 895 forks source link

Proposal: UX extensions #1312

Open flatsiedatsie opened 5 years ago

flatsiedatsie commented 5 years ago

While creating a MySensors add-on for the Mozilla WebThings Gateway I gained a lot of understanding of what MySensors can do. But I also got a better understanding of what could still be improved.

Specifically, I feel that MySensors devices could communicate better about how their capabilities might be displayed in the user interface of smart home controllers.

To make this very concrete, I want to propose this:

V_READ_ONLY Make it an official specification that all S_types can have the V_Type V_READ_ONLY. If the node sends a 1 for this V_Type, then the UI will know that the value cannot be modified by the user and returned to the node. This is useful for sensors, but it also allows for differentiation on when an S_INFO should be shown as an input field, or if it should be shown as an simple text output only. It's also useful for S_BINARY children, where you could then tell the UI to show a toggle or a simple state output.

V_UNIT_PREFIX Make it an official specification that all S_types can have the V_Type V_UNIT_PREFIX. This will allow the UX to better explain what the variable is. For a distance sensor, it could communicate 'mm' or 'cm'. For binary toggles it could communicate what the UI should show. For example: 'on/off' or 'open/closed'.

mfalkvidd commented 5 years ago

How would V_UNIT differ from V_UNIT_PREFIX ?

flatsiedatsie commented 5 years ago

Haha, I meant that one! I'll update it in the first post.

mfalkvidd commented 5 years ago

Related question in the forum where V_READ_ONLY could be applicable: https://forum.mysensors.org/topic/10631/what-is-proper-presentation-type-for-binary-push-button-s_binary-and-how-make-controller-distinguish-between-binary-button-ro-and-binary-switch-rw/