OH3 & panasonictv Binding

Hi there

since the upgrade to OH3 I “lost” the support for my 2 Panasonic TV’s. I knew it in advance but now I found this thread:

PanasonicTV / OH3

I tried it and it seems to work basically.

My question: are there any plans to officially update the old 1.x binding for Panasonic for OH3?

Greetz,
Christoph

If the maintainer/owner of the original 1.x binding doe not contribute a new oh3 binding, there is a very low chance.
Sometimes other contributors step in, like @J-N-K did for the PanasonicTV binding.
But don‘t expect this for all old bindings.
As a temporary solution, setup a second openHAB 2.x instance and connect it to openHAB 3 via the remoteopenhab binding.

The Snapshot version above seems to work at least basically… I’ll give it a try :slight_smile:
Honestly, I don’t really want to setup and maintain a second OH just due to one missing Binding… especially since the old one was also not “perfect” (problematic detection of on / off state which made it difficult to use the items in rules…)

Panasonic will not be finished. I stopped the development of new bindings.

That is a pity. :cry:

:frowning: Sorry to hear that. Didn’t find any actual .jar to try out. And I’m not familiar with github and java, so no idea to make a snapshot from source :frowning:

I was also looking for Panasonic TV binding on openHAB 3, but as it’s discontinued so far I’ve ended up with replacement for sending key events implemented in HTTP binding. It does not include discovery, but with making TV IP static works for me.

See here for details
  • http.things:

      Thing http:url:panasonictv "HTTP: Panasonic TV - keys" [
          baseURL="http://10.0.0.118:55000/nrc/control_0/",
          commandMethod="POST",
          contentType="text/xml;charset=utf-8",
          headers="Accept=text/xml",
                  "SOAPAction=\"urn:panasonic-com:service:p00NetworkControl:1#X_SendKey\""] {
    
              Channels:
                  Type string:send_key "Key" [
                      mode="WRITEONLY",
                      commandTransformation="JS:panasonictv_keyevent_body.js"
                  ]
      }
    

where of course 10.0.0.118 need to be replaced with IP of your TV and transformation file ‘panasonictv_keyevent_body.js’ looks as follows:

(function(key) {
    var NRC_KEY_CODES_MAPPING = {
        "POWER"         : "NRC_POWER-ONOFF", // power off only (on tested TV)
        "MUTE"          : "NRC_MUTE-ONOFF",
        "TV_INPUT"      : "NRC_AD_CHANGE-ONOFF", // dvbt input change
        "AV_INPUT"      : "NRC_CHG_INPUT-ONOFF", // hdmi input change

        "VOLDOWN"       : "NRC_VOLDOWN-ONOFF",
        "VOLUP"         : "NRC_VOLUP-ONOFF",
        "VOLUP_ON"      : "NRC_VOLUP-ON",
        "VOLUP_OFF"     : "NRC_VOLUP-OFF",

        "CH_DOWN"       : "NRC_CH_DOWN-ONOFF",
        "CH_UP"         : "NRC_CH_UP-ONOFF",

        "APPS"          : "NRC_APPS-ONOFF",
        "HOME"          : "NRC_HOME-ONOFF",
        "EXIT"          : "NRC_CANCEL-ONOFF",

        "RIGHT"         : "NRC_RIGHT-ONOFF",
        "LEFT"          : "NRC_LEFT-ONOFF",
        "DOWN"          : "NRC_DOWN-ONOFF",
        "UP"            : "NRC_UP-ONOFF",

        "OK"            : "NRC_ENTER-ONOFF", // return button
        "BACK"          : "NRC_RETURN-ONOFF",
        "OPTION"        : "NRC_SUBMENU-ONOFF",

        "3D"            : "NRC_3D-ONOFF",
        "ASPECT"        : "NRC_DISP_MODE-ONOFF", // aspect ratio button
        "MENU"          : "NRC_MENU-ONOFF",
        "GUIDE"         : "NRC_EPG-ONOFF",
        "TEXT"          : "NRC_TEXT-ONOFF",
        "STTL"          : "NRC_STTL-ONOFF",
        "INFO"          : "NRC_INFO-ONOFF",
        "EHELP"         : "NRC_GUIDE-ONOFF", // e-help button

        "1"            : "NRC_D1-ONOFF",
        "2"            : "NRC_D2-ONOFF",
        "3"            : "NRC_D3-ONOFF",
        "4"            : "NRC_D4-ONOFF",
        "5"            : "NRC_D5-ONOFF",
        "6"            : "NRC_D6-ONOFF",
        "7"            : "NRC_D7-ONOFF",
        "8"            : "NRC_D8-ONOFF",
        "9"            : "NRC_D9-ONOFF",
        "0"            : "NRC_D0-ONOFF",

        "LAST_VIEW"    : "NRC_R_TUNE-ONOFF",

        "BLUE"         : "NRC_BLUE-ONOFF",
        "YELLOW"       : "NRC_YELLOW-ONOFF",
        "GREEN"        : "NRC_GREEN-ONOFF",
        "RED"          : "NRC_RED-ONOFF",

        "REW"           : "NRC_REW-ONOFF",
        "PLAY"          : "NRC_PLAY-ONOFF",
        "FF"            : "NRC_FF-ONOFF",
        "SKIP_PREV"     : "NRC_SKIP_PREV-ONOFF",
        "PAUSE"         : "NRC_PAUSE-ONOFF",
        "SKIP_NEXT"     : "NRC_SKIP_NEXT-ONOFF",
        "STOP"          : "NRC_STOP-ONOFF",
        "REC"           : "NRC_REC-ONOFF"
    }
    var soapBody =
        '<?xml version="1.0" encoding="utf-8"?>' +
        '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">' +
        '<s:Body>' +
        '<u:X_SendKey xmlns:u="urn:panasonic-com:service:p00NetworkControl:1">'+
        '<X_KeyEvent>'+NRC_KEY_CODES_MAPPING[key]+'</X_KeyEvent>' +
        '</u:X_SendKey>'+
        '</s:Body>'+
        '</s:Envelope>'
    return soapBody
})(input)

Then item declaration:

String PanasonicTV_Remote "TV remote" { channel="http:url:panasonictv:send_key", autoupdate="false"}

and used as follows in the sitemap:

Switch item=PanasonicTV_Remote label="" mappings=["LEFT"="◄","UP"="▲", "DOWN"="▼", "RIGHT"="►"] icon="none"
Switch item=PanasonicTV_Remote label="" mappings=["OK"="OK", "BACK"="Back"] icon="none"
Switch item=PanasonicTV_Remote label="" mappings=["APPS"="APPS", "HOME"="HOME", "EXIT"="EXIT","MENU"="Menu"] icon="none"

or in rules:

PanasonicTV_Remote.sendCommand("AV_INPUT")
PanasonicTV_Remote.sendCommand("OK")

It’s amazing. Thank you so much. Just one additional question: After hit a Button in Sitemap, this button got stuck colored, until in same row another button pressed. Any idea to solve this? I’m not so familiar with http binding. A sendCommand(REFRESH) with a rule doesnt work :frowning:

I have the same issue, but i think it’s more related to:
autoupdate=“false”
not working as expected in item definition in openHAB 3.0, than HTTP binding.

Well, in basic UI it only stays colored, but in App, there is no way to hit same button twice. Can anyone confirm this behavior so we are sure before opening an issue on guthub?

I just did some tries and found a solution working in Basic UI and App too:

  • Change autoupdate in Item-Configuration from RemoteKey to true (> with true you got a trigger for rules, it’s the only qay, because the channel is WRITEONLY)
  • Add rule with trigger RemoteKey changed and RemoteKey.sendCommand(“”) to reset key.

If you like a user experience showing you some better the key got pressed, you can add a Thread::sleep(200) to let openhab wait 0,2 seconds before reset button.

Hope this helps.

For me for issue:

no way to hit same button twice

also works expire binding as follows:

String PanasonicTV_Remote "TV remote" { channel="http:url:panasonictv:send_key", autoupdate="false", expire="1s"}

but in Basic UI key remains colored, till reload.

So you have this issue in Web Ort in App? In the App I have this sometimes too, but Never in Web.

I think in App there is a preference for behavior of reloading. Maybe try to change this switch?

Good morning,
my Pana-Remote with HTTP-Binding dosnt works anymore. Has anyone also trouble der controll the Pana-TV? is there any resolution or relaease a new Pana-Binding?

@Cyrill.Sneer I’m using a Panasonic binding with 4.3M4 and have used the same binding since OH 3.1 without issue. Bindings don’t just stop working unless something has changed in the setup. More information regarding your versions would be needed to help nail down the issue, and to be clear the binding.jar needs to be manually placed in the addon folder and the Thing configured manually but it works.

I have asked on a number of occasions to have the binding updated, and some have offered to look at it but no follow through in actually getting it updated.

Hello John,
you mean this binding work with our OH4.3 Installation?

I’m going to try a manual install, but it didn’t work with my old OH2 installation.

No, this is a legacy openHAB 1 Binding and will not work!

@Cyrill.Sneer Yes I currently have it working with OH4.3M4 using a manual install and manual Thing config. It’s been working since OH3.1 and each subsequent version. The binding was updated to run in OH 3.0 and again for 3.1. No updates since then but it seems to work fine. I use it everyday. I think I may have needed to add UPnP binding as well if I remember correctly. Just try to grab the jar from a OH3.1 build and use that in your addon folder.

But not the binding he showed, as it is from the openHAB1 repo. Support for legacy openHAB1 Bindings was removed in openHAB3 and later

@hmerk Understood and you are correct, but that was not disclosed in his original post to which I first responded. Given the title of the thread, I assumed it to be a binding from a 3.x build.