OH1 Panasonic TV Binding not working on OH2?

Hi is anyone using this binding in OH2? I had it running fine in OH1.8.3 with My Panasonic TX-P50ST33E Plasma TV. I can#t seem to get it to send commands to the TV, with null IP error, e.g.

15:29:26.534 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘TV_Lounge_Power’ received command OFF
15:29:26.540 [DEBUG] [asonictv.internal.PanasonicTVBinding] - internalReceiveCommand() for item: TV_Lounge_Power with command: OFF
15:29:26.540 [INFO ] [marthome.event.ItemStateChangedEvent] - TV_Lounge_Power changed from ON to OFF
15:29:26.541 [WARN ] [asonictv.internal.PanasonicTVBinding] - Command POWER to TV with IP null failed with HTTP Reponse Code 0

I have the org.openhab.binding.panasonictv-1.8.3.jar in the addons folder and a panasonic.cfg file in the services folder with the contents below (IP address crossed out):

################################ Panasonic TV Binding #######################################

IP address of a Panasonic TV instance

panasonictv:lounge_tv=192.xxx.xxx.xxx

My items file is as follows:

//Panasonic TV
Group TV_Lounge “Lounge TV” (Lounge)
Switch TV_Lounge_Power “Power” (TV_Lounge) { panasonictv=“lounge_tv:POWER” }
Switch TV_Lounge_Mute “Mute” (TV_Lounge) { panasonictv=“lounge_tv:MUTE” }
Switch TV_Lounge_Pause “Pause” (TV_Lounge) { panasonictv=“lounge_tv:PAUSE” }
Switch TV_Lounge_Play “Play” (TV_Lounge) { panasonictv=“lounge_tv:PLAY” }

Can anyone help here?

Cheers!

It is unclear. Did you follow the instructions for using the OH 1 compatibility layer?

http://docs.openhab.org/developers/development/compatibilitylayer.html#how-to-use-openhab-1x-add-ons-that-are-not-part-of-the-distribution

The configuration file should be named panasonictv.cfg with the following content:

########################## Panasonic TV Binding

#IP address of a Panasonic TV instance

lounge_tv=192.xxx.xxx.xxx

The leading panasonictv: must be omitted, as this is already set through the file name.

Please ensure that you installed the compatibility layer (for instance, just install another OH1.9 binding through Paper UI).

Hi Rich and Udo,

  1. 1.x compatibility layer is already installed and Started
  2. cfg file renamed and content changed as per Udo’s mail.

Restarted OH2 and have the same problem:

12:00:13.430 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘TV_Lounge_Mute’ received command OFF
12:00:13.443 [DEBUG] [asonictv.internal.PanasonicTVBinding] - internalReceiveCommand() for item: TV_Lounge_Mute with command: OFF
12:00:13.446 [WARN ] [asonictv.internal.PanasonicTVBinding] - Command MUTE to TV with IP null failed with HTTP Reponse Code 0
12:00:13.560 [INFO ] [marthome.event.ItemStateChangedEvent] - TV_Lounge_Mute changed from NULL to OFF
12:00:13.560 [INFO ] [ome.event.GroupItemStateChangedEvent] - TV_Lounge changed from NULL to UNDEF through TV_Lounge_Mute
12:00:13.563 [INFO ] [ome.event.GroupItemStateChangedEvent] - Lounge changed from NULL to UNDEF through TV_Lounge

My default.items section:

//Panasonic TV
Group TV_Lounge “Lounge TV” (Lounge)
Switch TV_Lounge_Power “Power” (TV_Lounge) { panasonictv=“lounge_tv:POWER” }
Switch TV_Lounge_Mute “Mute” (TV_Lounge) { panasonictv=“lounge_tv:MUTE” }
Switch TV_Lounge_Pause “Pause” (TV_Lounge) { panasonictv=“lounge_tv:PAUSE” }
Switch TV_Lounge_Play “Play” (TV_Lounge) { panasonictv=“lounge_tv:PLAY” }

Any further assistance greatly appreciated!

@vbevan, the 1.9 binding is working fine for me in OH2.
During startup you should see the following in the logs:
2016-12-12 22:09:25.829 [INFO ] [asonictv.internal.PanasonicTVBinding] - TV registered 'living_room' with IP '192.168.xxx.xxx'

This is my panasonictv.cfg, placed in /etc/openhab2/services/:

################################ Panasonic TV Binding #######################################
#  
# IP address of a Panasonic TV instance
panasonictv:living_room=192.168.xxx.xxx

Items:

Switch LVTVPowerOff          	"Turn off"         {panasonictv="living_room:POWER"}
Switch LVTVVolumeUp          	"Volume Up"         {panasonictv="living_room:VOLUP"}
Switch LVTVVieraTools          	"Viera Tools"         {panasonictv="living_room:VTOOLS"}

I didn’t even need to restart OH2.

Would your panasonictv.cfg file still work if you removed the panasonictv: prefix(es) from the lines in it? Should this 1.x binding be added to OH2 for install and config?

Answering my own question here…

How do we install the 1.9.0 version? I can’t seem to find it anywhere because the openhab addons file is still at 1.8.3 and the binding isn’t showing up in habmin or paperui?

You can get the 1.9.0-SNAPSHOT version from here but it should be installable in OH2 directly with a nightly build soon after the above PR was merged.

So I’ve go the addon in but it still won’t control my TV in any way? My items file looks like this :

Switch LVTVPowerOff          	"Turn off"         {panasonictv="living_room:POWER"}

And my panasonictv.cfg looks like this:

# IP address of a Panasonic TV instance
living_room=192.168.1.132

But when I issue a command I can’t and the item won’t appear in PaperUI at all. I can see the item in Habmin but when I try any control nothing happens. Any idea? Or how can I configure it through paperui? Or how do I even view the logs? I’m running on a raspberry Pi.

Does anything interesting appear in your log? If you issue log:set DEBUG org.openhab.binding.panasonictv at the openhab> prompt, do more log entries appear? You can see the log by either locating the log file in your installation and doing tail -f openhab.log, or at the openhab> prompt, issue the command log:tail and press Control-C to stop tailing the log in either case.

My events.log shows :

2016-12-19 17:16:51.618 [ItemCommandEvent          ] - Item 'PanasonicPower' received command OFF
2016-12-19 17:16:51.627 [ItemStateChangedEvent     ] - PanasonicPower changed from ON to OFF
2016-12-19 17:16:58.007 [ItemCommandEvent          ] - Item 'PanasonicPower' received command OFF
2016-12-19 17:16:59.860 [ItemCommandEvent          ] - Item 'PanasonicPower' received command ON
2016-12-19 17:16:59.881 [ItemStateChangedEvent     ] - PanasonicPower changed from OFF to ON
2016-12-19 17:20:45.191 [ItemCommandEvent          ] - Item 'PanasonicPower' received command ON
2016-12-19 17:20:47.365 [ItemCommandEvent          ] - Item 'PanasonicPower' received command ON
2016-12-19 17:20:53.496 [ItemCommandEvent          ] - Item 'PanasonicPower' received command ON
2016-12-19 17:20:54.649 [ItemCommandEvent          ] - Item 'PanasonicPower' received command OFF
2016-12-19 17:20:54.666 [ItemStateChangedEvent     ] - PanasonicPower changed from ON to OFF

It looks like it is getting the commands and changing the state, but the TV isn’t playing?

EDIT: When I tail my openhab.log and issue a command I get this:

2016-12-19 19:01:47.483 [WARN ] [asonictv.internal.PanasonicTVBinding] - Command POWER to TV with IP null failed with HTTP Reponse Code 0

Hi All I can concur this works fine on my OH2 setup, many thanks!

It all seems to be working except power seems to be randomly delayed in turning off or on. Volume and everything else works, also, is there a way to be able to turn the TV on from it being off?

My understanding is that the binding will only turn the TV off, at least this is what it does with my TXP50ST33E model - the binding page shows only power off for the POWER command in the list. My model also doesn’t support WoL, although I know that some other Panasonic models (top range e.g. VT) do support this in their network interfaces.