fruggy83 / openocean

27 stars 11 forks source link

Feature idea: virtual rockers that can be kept depressed #109

Closed miccgn closed 3 years ago

miccgn commented 3 years ago

Hi,

I am not sure whether an "issue" is the proper thing to suggest an improvement - I'll just give it a try. Please disregard when inappropriate.

Some of my Eltako devices can interpret button presses as commands like "central on with static priority". ("Zentral EIN mit Priorität, EIN solange gedrückt"). This supersedes all other commands sent to the device while the corresponding button is depressed. It can be overwritten as soon as the button is released.

First I tried using this functionality with a classicDevice. However, this device will always send the RELEASED message shortly after the PRESSED message. Is there any way to avoid this? I.e. have a channel behave like "Switch=ON" ==> "DIR1_PRESSED", "Switch=OFF"==>"DIR1_RELEASED" ?

I managed to use genericThings successfully for my case, however, given that genericThings can be configured in text files only, I am not sure whether this will be a long term solution.

Kindly Michael

fruggy83 commented 3 years ago

HI Michael,

feature requests are handled as issues too. So everything is fine 👍

However before implementing anything new, you could do me a favor and try the following: set the duration parameter in the virtualSwitchA channel configuration to zero. This should avoid sending the RELEASED message.

Best regards Daniel

miccgn commented 3 years ago

Hi Daniel,

thanks! Works great! Finally I can move all things to MainUI and away from files. Actually, your solution makes it impossible to ever send a RELEASED message, which again is not required in my scenario: when the DIR2_PRESSED message is sent (which stands for "OFF with static priority", Eltako is clever enough to realize this means the "ON with static priority" command is obsolete.

Thanks again!