homA
homA copied to clipboard
Add power toggles directly to Android app device list
Currently all controls in the Android app are hidden behind a popup. @jpmens mentioned that it would be good to also show the power toggle in the list-view for quick access.
< Room >
FAN1 On
Ventilator Off
Whatever <- E.g a device does not have power toggle
What is the power toggle could be defined with an additional meta attribute along the lines /controls/$deviceId/controls/PowerControl/meta/isPowerControl:1
However, one should probably catch non unique power controls.
@jpmens What do you thing of a card interface like OpenHAB is using (https://lh4.googleusercontent.com/-DH_KWUoqQkc/UZ8jNlTuvxI/AAAAAAAAAbo/wI_a6jWIP04/w909-h568-no/device-2013-05-24-102053.png)?
Would match the new design of the webinterface.
@binarybucks that looks pretty elegant to me. I like that. :-)
Ok, I'll look into it at the end of the week when on the train.
I like the idea to show power toggles in the list-view of the Android app (and not hide them behind a popup). Are there any ideas how to implement that? Is a new meta attribute really needed?
@hmueller01, the additional meta attribute its not required unless you want to name the control differently (e.g. when using a different language). Generally, I'd like to avoid meta attributes whenever possible but in this case it would be a rather limiting convention to enforce the name "Power" for a control with such function. What do you think?
Generally I agree. But I also like the idea that (all!) controls can be shown in the list-view (without popup). For me this is one of the major drawbacks of the Android app. But that would need a trigger (e.g. some kind of meta data) to enable or disable this.
Here I just wanted to start a "new" discussion on how this "switch/trigger" could look like.
I also read in #92 that this might not be that easy to implement in a list-view. But that's another story.
Right now sockets and rcplugs component use /devices/$systemId-<systemCode>-<unitCode>/controls/Power
topic. Because "Power" is fixed, all switches which are displayed on the list-view would called "Power". So I would suggest to show two lines with
payload of
/devices/$systemId-<systemCode>-<unitCode>/meta/name
controls topic name (e.g. "Power")
The switch or the value shown on the right side of these two lines.
Comments ...
@hmueller01 How many switches/controls do you want to show directly in the device list? Only the one that is called "Power" so that it basically looks like @binarybucks initial proposal but in 2 lines or do you want to display any type and number of controls directly in the room view so that the device view becomes obsolete? IMHO the latter option would make the list very long and crammed. Some of my devices have >10 controls.
I have devices with even more controls. So the idea was to put only selected controls to the room view. E.g. the outside temperature which is one of many data of my heating component.
Then I guess we need a new meta attribute to specify which one.
Something like /devices/$SystemId/controls/$deviceUniqueControlId/meta/in_outline
but there is probably a better term for what we need.