Page 1 of 3

Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Sun Jan 22, 2017 11:04 am
by mat
Hi All,

I have drafted a Panasonic Viera TV Plugin with almost all of the actions included for IP control of Viera TV's (since 2012). If the Panasonic2 app works, so should the plugin.

Download up-to-date version here (v0.1.0) https://www.dropbox.com/s/1tqinko37wu2uxp/Panasonic%20Network%20Remote.indigoPlugin.zip?dl=0

The code has been tested, but wider testing would be useful. Not all commands work on all TV's and I have yet to finalise the WoL power command, as I can't activate it on any of my TV's - it may be a European thing!

I've still got the following to do:

Error checking/debug messages.
Send required volume (rather than up/down)
Consider method of updating status'

I've also got to include open source licence, web links and thank you's.

Any comments on functionality or layout of commands would be useful.

Instructions.

Install plugin
Create a new device (supports multiple devices)
Select "type": Panasonic Network Remote
Select "Model"; Panasonic TV
Input the TV IP Address - I would highly recommend fixing the ip address of the TV
Name the device.

You should now be able to add actions and trigger events.

The device created has three properties:
State - either powered off, standby or on
Mute - on/off
Volume - shows the current or last volume of the TV

I would like to add the current channel or input as a device status, but cant retrieve it from the TV at the moment. In addition, direct access to apps is not possible, ie Netflix.

Power WoL is not currently working as I can not test it - It wont work at present as I am testing it with a fix mac address. Toggling standby does work on some TV's.

I've not had a chance to check the media controls. A few have been reported as not working, but if anyone interested could check and report back, that would be useful.

Thanks goes to Colly for doing the initial testing.

Cheers


Mat

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Sun Jan 22, 2017 2:24 pm
by Coolcaper
Thanks for this! Will test it when I have the chance and report back.


Sent from my iPhone using Tapatalk

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Sun Jan 22, 2017 3:28 pm
by mat
Updated to v 0.0.12 - gradually working through the list of todo's

Link updated above.

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Sun Jan 22, 2017 3:57 pm
by Colly
Great work Mat. Been a pleasure helping out, looking forward to the finished product!


Sent from my iPhone using Tapatalk

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Mon Jan 23, 2017 2:34 am
by rhanson
You may have to explicitly enable the WoL feature on your TV.

On my VT60, it's under Menu > Network > "TV Remote App Settings" (which sounds completely unrelated) > Wake on LAN

And I believe it was somewhere else on the VT50 series, but I can't recall.

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Mon Jan 23, 2017 7:47 am
by autolog
Hi Mat,
Just downloaded the plugin to test with my Panasonic TX-58DX902B TV.

I am getting mixed results. I have gone into TV Remote App Settings in the TV Network settings and set the following:
  • TV Remote: On
  • Powered On by Apps: On
  • Networked Standby: On

I altered code in the plugin (for testing purposes) and changed the power on to use my TVs MAC address.
The good news is power on by WOL works. :)

I have added some Actions to Turn On (WOL) Turn Off and Show the programme Guide.
None of these appear to work now but Show the programme guide worked once which implies it has the potential to work. :?
This was before I enabled some of the settings (above).

Pinging the TV shows a response time of ~ 0.250 ms.

I added some debug messages which shows the following:
23 Jan 2017, 13:27:10
Action Group TV Turn Off
Panasonic Network Remote URL= http://192.168.1.208:55000/nrc/control_0
Panasonic Network Remote PAYLOAD= <?xml version="1.0"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><m:X_SendKey xmlns:m="urn:panasonic-com:service:p00NetworkControl:1"><X_KeyEvent>NRC_POWER-ONOFF</X_KeyEvent></m:X_SendKey></SOAP-ENV:Body></SOAP-ENV:Envelope>
Panasonic Network Remote HEADERS= {'SOAPaction': '"urn:panasonic-com:service:p00NetworkControl:1#X_SendKey"', 'Host': u'192.168.1.208', 'Content-Type': 'text/xml', 'Content-Length': 339}
Panasonic Network Remote RES=

The response (res) is coming back as empty.

Not sure where to go with this now?

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Mon Jan 23, 2017 8:52 pm
by Coolcaper
The plugin worked for me as expected and showed the available properties. However it seems to be using a lot more CPU than the other plugins and doesn't quit politely. Tried it twice.

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Tue Jan 24, 2017 10:56 am
by mat
You may have to explicitly enable the WoL feature on your TV.

On my VT60, it's under Menu > Network > "TV Remote App Settings" (which sounds completely unrelated) > Wake on LAN

And I believe it was somewhere else on the VT50 series, but I can't recall.


Yep, have found it on one of the tv's but its missing on the others -i'll look again, but can now test if needed.

I altered code in the plugin (for testing purposes) and changed the power on to use my TVs MAC address.
The good news is power on by WOL works. :)


Great, I'll update the code as soon as to either capture or manually enter the mac address.

autolog, I'll have a look and see what I can do.

The plugin worked for me as expected and showed the available properties. However it seems to be using a lot more CPU than the other plugins and doesn't quit politely. Tried it twice.


No, I've now recreated the error, which appeared when I added more devices. Its in the concurrentthread, which needs some work on it, and a little better understanding.

Thanks for testing, and I'll get a new version up in this tread shortly to iron out the issues.

Cheers chaps, and thanks for your time.

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Tue Jan 24, 2017 1:29 pm
by Albatros
Thanks for the plugin. It is working.

I have vt50 european device. Is it possible to activate the WOL? Do you know where to find the settings in the menu.

And indeed it seems to take quite a bit processing power.

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Wed Jan 25, 2017 7:21 am
by mat
I've resolved the processing power by reducing the update cycle. Processor now around 0.5%. I'll publish a new version tonight, and will try to resolve the update speed thereafter.

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Wed Jan 25, 2017 4:30 pm
by mat
Update posted - link in the first post v 0.0.13

:shock: Added field in device settings to enter mac address and enabled power on from mac address in the plugin actions Edit your device to enter mac address.
format for mac address is xx:xx:xx:xx:xx:xx I'll look to automate this in future
:shock: Addressed the concurrent thread and plugin is now exiting politely here - please can you let me know if problems elsewhere.
:shock: Addressed the CPU issue - it appears to be typically using 1% now, but occasionally extends to 2% of CPU. Is this still high?

Autolog - has this resolved your issues? I couldn't replicate.

In response to the questions about enabling WoL on the Panasonic screens- I have 5 panasonic TV's, all relatively new, and only one has WoL. I read somewhere, although not confirmed, its missing on lots of EU Panasonics to improve EU energy ratings! Not convinced, but not there on most of mine. I do however use z-wave to power on/off.

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Wed Jan 25, 2017 9:14 pm
by Coolcaper
mat wrote:
Update posted - link in the first post v 0.0.13

:shock: Addressed the concurrent thread and plugin is now exiting politely here - please can you let me know if problems elsewhere.
:shock: Addressed the CPU issue - it appears to be typically using 1% now, but occasionally extends to 2% of CPU. Is this still high?

In response to the questions about enabling WoL on the Panasonic screens- I have 5 panasonic TV's, all relatively new, and only one has WoL. I read somewhere, although not confirmed, its missing on lots of EU Panasonics to improve EU energy ratings! Not convinced, but not there on most of mine. I do however use z-wave to power on/off.


Certainly solved my issue of exiting politely and CPU usage issues so far. Thanks for the update!

Same issue with WoL on my VT60 in Aus. Seems Pana have disabled the feature here as well!

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Thu Jan 26, 2017 3:50 pm
by mat
Update posted - link in the first post v 0.0.14

Update 0.0.14 added to first post, and link below.

Added Set Volume and direct access to HDMI1/2/3/4
I've started adding direct control to launch apps, but it's proving difficult. If someone can packet sniff i've got the general idea, just getting a HTTP 412 error.

I think that all of the controls are there now, so unless anyone reports a problem over the next week or so, I'll release as a final version, then tinker.

https://www.dropbox.com/s/ienhsebykoy6sad/Panasonic%20Network%20Remote.indigoPlugin.zip?dl=0

Coolcaper wrote:

Certainly solved my issue of exiting politely and CPU usage issues so far. Thanks for the update!

Same issue with WoL on my VT60 in Aus. Seems Pana have disabled the feature here as well!


Pleased it seems that we've solved the memory problems!

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Fri Jan 27, 2017 5:23 am
by Albatros
It is working grate.

Just for me understanding the Trigger mechanism. When i create a trigger I can select; Device State (but not a specific state like on off), on (True/False) Off (True/False)etc.

What I want is trigger if device state is on than xxxx. If Device State is off than XXX.

Whith the on (true/false) that din't seem to work.

Re: Panasonic Viera Plugin (Alpha) v0.0.11

PostPosted: Fri Jan 27, 2017 6:01 am
by mat
Albatros wrote:
It is working grate.

Just for me understanding the Trigger mechanism. When i create a trigger I can select; Device State (but not a specific state like on off), on (True/False) Off (True/False)etc.

What I want is trigger if device state is on than xxxx. If Device State is off than XXX.

Whith the on (true/false) that din't seem to work.


You've got further than me integrating - I'll have a look at that on Sunday and resolve the issue. It would be useful to trigger on states ie if volume >80 and time between 11pm and 6am set volume to 20