c5n / oh-ez-touch

OhEzTouch is a simple always-on touch control device for home automation systems driven by OpenHAB.
GNU General Public License v3.0
16 stars 3 forks source link

feature request: support for rollershutter items #8

Open ypoosn opened 3 years ago

ypoosn commented 3 years ago

Hi,

first of all: it' a brilliant piece of software. I really appreciate your work.

Here is a additional feature idea that could be helpful for a lot of enthusiasts. You could support rollershutter items in a way it is done in the web gui. The switch item shows for rollershutter items down, stop and up icons and additionally a percentage value (see attached picture)

rollershutter item

In the meantime the slider element can be used.

best, Ypo

ypoosn commented 3 years ago

19.03.21: updated description

I saw that you made some changes, I did git pull origin next recompiled with pio run, updated via batchupdate.sh and did some testing. I am not sure whether you are already have finished your coding ;-)

Here are my findings and remarks:

Sample

Items:
        Group:Rollershutter g_RS_Kitchen "Kitchen All [%.0f %%]"
        Rollershutter RS_Kitchen_East "Kitchen East [%.0f %%]" (g_RS_Kitchen)
        Rollershutter RS_Kitchen_West "Kitchen West [%.0f %%]" (g_RS_Kitchen)
        Rollershutter RS_Kitchen_South "Kitchen South [%.0f %%]" (g_RS_Kitchen)
Sitemap:
    Text label="RollerShutter" icon="rollershutter-100"
    { 
                Default item=g_RS_Kitchen label="Group RS as Default" icon="rollershutter-100"      <-- auto restart in this sample, and no return button in real world
        Switch item=g_RS_Kitchen label="Group RS as Switch" icon="rollershutter-100"       <-- not shown also in this sample
        Slider item=g_RS_Kitchen label="Group RS as Slider" icon="rollershutter-100"          <-- works as expected
        Switch item=RS_Kitchen_East icon="rollershutter-100"                      <-- works as expected
        Switch item=RS_Kitchen_South icon="rollershutter-100"                   <-- works as expected
        Switch item=RS_Kitchen_West icon="rollershutter-100"                     <-- works as expected
    }

Thanks for you work.

best, Ypo

c5n commented 3 years ago

Hey Ypo, thanks for testing and your remark/finding. I've released the new items quickly (maybe too fast) but I'm going to spend some more time on the project the next couple of days... c5n

ypoosn commented 3 years ago

Hi, I did some updates on my description above.

best, Ypo

c5n commented 3 years ago

Hi Ypo, thanks for the demo sitemap. Group was not supported, hence those items were hidden. I have added group support and now your example should work without issues. c5n

ypoosn commented 3 years ago

Hi,

thanks it's working perfectly now.

Some minor issue (maybe I am the only one ;-) ):

Rollershutter buttons in the UI could behave like physical push buttons/switches, i.e. button is highlighted when pressed to give feedback that operation has been recognized, then is goes back to deselected state.

In this case you don't have to control / maintain the state of the button. Currently the selected state of a button after pressing it is not updated when rollershutter operation has finished (up/down/stop).

Maybe it is just to reset the state of the button to unselected in the callback method of the UI library?

As I said just a minor thing. Thanks a lot for your work.

best,

Ypo.