Strange …
Here my next task
I want to build a remote control via Habpanel for my enigma2 based VU+ SOLO 4K
I want to use the enigma2 binding for simulating pressing a key. Icould use the HTTP binding as well, but I do like the binding and I do not want to send UID/PW via HTTP. There is a code for each Key I can send to the enigma web interface via http or via the binding. For example 401 is for the “blue” button.
I do not want any logic in the UI. No sending of codes though Habpanel only pressing buttons. So I could use the same functionality from a sitemap or via amazon echo as well. With the HTTP binding this works like
Switch vusolo4kRemoteBlue {http=">[ON:GET:http://IP-Address:Port/web/remotecontrol?command=401]", autoupdate="false"}
And then connect a button Panel to the switch.
Is there a similar way to do it with the binding without writing extra rules? I have a String item in the binding which I can send the codes to trigger the action
String vuSolo4k_RemoteKey { channel="enigma2:device:cf19a964:remoteKey" }
To simulate pressing the blue button on the Remote this would work like
vuSolo4k_RemoteKey.sendCommand(401)
But in this case i would have to send the code fron the Widget what i do not want.
Another way would be to define a virtual Switch and a rule
Switch vusolo4kRemoteBlue {autoupdate="false"}
rule “VuSolo4k press blue button”
when
Item vusolo4kRemoteBlue received command ON
then
vuSolo4k_RemoteKey.sendCommand(401)
end
What is quite annoying, because i need more than 20 buttons.
I could do it with lambdas or group filters like
gRemoteButtons.members.filter[i | i.state == ON].forEach[i | i.name.sendCommand( transform("MAP", “remote_code.map"))]
to make it more comfortable. But I try to get around this stuff.
So my Question again:
Is there a way to use the binding without a rule for my purpose. In other words: Is there a way to define a Switch that sends a predefined code the binding without using an additional rule?
Help would be really appreciated.