Help with mapping, exec and rm mini3

  • Platform information:
    • Hardware: Raspberry Pi 3b+
    • OS: openhabian
    • Java Runtime Environment: embedded
    • openHAB version: 2.4

Hi, I’m using rmmini3 with BlackBeanControl, and I have recorded 2 signals: volumeUp and volumeDown, how can I create an item and sitemap to have the button + and - that exec 2 different commands?

thanx in advance

that’s what I did:


Thing exec:command:TVVolUp [Command="/usr/bin/python /usr/share/openhab2/BlackBeanControl/ -c AumentaVolume", interval=0, timeout=5, autorun=false]

Thing exec:command:TVVolDw [Command="/usr/bin/python /usr/share/openhab2/BlackBeanControl/ -c DiminuisciVolume", interval=0, timeout=5, autorun=false]


Switch TVVolUp_RUN "TV Aumenta Volume" {channel="exec:command:TVVolUp:run"}

Switch TVVolDw_RUN "TV Diminuisci Volume" {channel="exec:command:TVVolDw:run"}

now I would like to combine TVVolUp and TVVolDw in sitemaps but this not work:

Switch item=Volume mappings=["+"={channel="exec:command:TVVolUp:run"},"-"={channel="exec:command:TVVolDw:run"}]

I get in the log:

2019-02-22 20:43:13.229 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'default.sitemap' has errors, therefore ignoring it: [144,36]: no viable alternative at input '{'
[144,71]: missing ']' at '}'
[144,72]: mismatched input ',' expecting '}'

i solved with the old exec syntax:

Switch  TVVolume    "TV Volume"     ["Switchable"]      {exec=">[ON:/usr/bin/python /usr/share/openhab2/BlackBeanControl/ -c AumentaVolume] >[OFF:/usr/bin/python /usr/share/openhab2/BlackBeanControl/ -c DiminuisciVolume]"}


Switch item=TVVolume mappings=[ "ON"="+", "OFF"="-"]

but how do I have to do with the news syntax?