g30r93g / homebridge-panasonic

A Homebridge plugin for Panasonic Viera TV's. Written to support the new Homekit TV accessory.
MIT License
21 stars 3 forks source link

Cannot change TV power state #14

Open daciand opened 5 years ago

daciand commented 5 years ago

First of all, thanks for the plugin!

I have a Panasonic TX-55FZ800E and, even if the TV shows up fine in the Home app, I am not able to change its power state by clicking on it. The current state is correctly reflected in the app, but as I said, I cannot change it. By using the TV Remote 2 app on my iPhone, I am able to change its power state, which I guess it means that the TV can be started remotely. It may also be worth mentioning that the TV is connected to my local network via WiFi (802.11n, 5 GHz band).

My config.json looks like this: { "accessory": "Panasonic-TV", "name": "Panasonic TV", "ipaddress": "192.168.0.153", "inputs": [ { "id": "TV", "name": "TV", "type": "TV" }, { "id": "HDMI 1", "name": "Apple TV", "type": "HDMI" }, { "id": "Netflix", "name": "Netflix", "type": "APPLICATION", "appID": "0010000200000001" } ] }

In the homebridge log I can see the following lines each time I'm clicking on the TV's icon from the Home app: May 19 20:50:03 raspberrypi homebridge[29149]: [2019-5-19 20:50:03] [Panasonic TV] Powering TV on... or May 19 21:07:10 raspberrypi homebridge[29149]: [2019-5-19 21:07:10] [Panasonic TV] Powering TV off...

Am I doing something wrong or the TV is not supported by the plugin? Thanks!

daciand commented 5 years ago

Issue is still reproducible with plugin version 6.0.1. I'm using latest iOS and latest version of homebridge.

LeBaron90 commented 5 years ago

try to reinstall the plugin (delete it and install it again, not just overwrite), maybe that helps. I have nearly the same settings like you, and it works on my tv. I checked your config on https://jsonlint.com and it looks good…

daciand commented 5 years ago

I did try doing that: sudo npm -g uninstall homebridge-panasonic-viera-tv --save sudo systemctl restart homebridge.service sudo npm install -g homebridge-panasonic-viera-tv@6.0.1 sudo systemctl restart homebridge.service

But still doesn't work: May 21 08:42:45 raspberrypi homebridge[17460]: [2019-5-21 08:42:45] [55FZ800_Series] TV is off May 21 08:43:07 raspberrypi homebridge[17460]: [2019-5-21 08:43:07] [55FZ800_Series] Powering TV on... May 21 08:43:43 raspberrypi homebridge[17460]: [2019-5-21 08:43:43] [55FZ800_Series] TV is off

Maybe some of the API implementations have been changed for the 2018 series?

g30r93g commented 5 years ago

Hi! Thanks for making me aware of this issue. Thanks to @LeBaron90 for the suggestion and sorry that it still doesn't work. I'll be sure to have a look at this!

bartong13 commented 5 years ago

I'm having the same issue with a Panasonic 49FX740, which is also a 2018 model TV. Also the same as @daciand , I can control it with the Panasoic TV Remote 3 App on my iPhone, including power on/off.

The TV shows in the Home App, but state is often incorrect and none of the switches work: on/off, or changing inputs, etc.

Here's a wee snippet of the logging of actions from the Home App when running homebridge -D

[5/07/2019, 12:25:59 AM] [Living Room TV] TV is off
[5/07/2019, 12:26:04 AM] [Living Room TV] Powering TV on...
[5/07/2019, 12:26:26 AM] [Living Room TV] Switching to TV
[5/07/2019, 12:26:34 AM] [Living Room TV] Opening Netflix app
[5/07/2019, 12:26:39 AM] [Living Room TV] Switching to Chromecast
[5/07/2019, 12:26:42 AM] [Living Room TV] Powering TV off...

None of these actions have any effect.

I did notice that when setting up the Panasonic TV Remote 3 App on iOS for the first time a pairing PIN code was required (displayed on the TV, needed to be keyed in the App.) Is this possibly part of the issue? Does homebridge-panasonic-viera-tv need to authenticate somehow?

Thanks for all your hard work on this, it looks really promising and obviously works well for others!

bartong13 commented 5 years ago

@g30r93g I've done a bit more analysis by taking a tcpdump of network traffic while using the Panasonic TV Remote 3 App on iOS. It appears that the app is sending encrypted commands, presumably using a key that was created at the time I "paired" the App with the TV (when it prompted for the PIN).

If it's of any use I can share the pcap file with you to look at in Wireshark, but I think this encryption may render your plugin useless for this model of TV (and presumably any other recent Panasonic TV that uses the same encrypted remote control protocols.) :-(

Very sad....

chrismaurer commented 4 years ago

FX750 over here with the same issue as reported above.

I think it’s awesome that you’re putting the effort in to make this happen. Thanks so much! I sure wish I could use it. However, I think it’s going to need the ability to pair with the TV if it’s going to work the same way as the Panasonic smartphone apps.

Interestingly, however, I know it’s possible to execute commands without the pairing / encryption as I was able to control my TV using the simple node.js module here: https://www.npmjs.com/package/viera.js

It just doesn’t integrate with Homebridge as-is. I was hoping to make a Homebridge wrapper for it; but I failed and don’t have much free time to spend on it....

g30r93g commented 4 years ago

Hi guys. Thanks for your breakdown of the issue here. I'm not entirely sure how to go about resolving this since I don't have a newer TV but I guess if you still have that pcap file I can take a look and understand how the newer models are communicating.

nonolk commented 4 years ago

Hello, it seems someone managed to reverse the device association Link, I hope this could be usefull.

Best regards

AntonioMeireles commented 4 years ago

hi folks!

FWIW - i recently got a GX830 (2019 model) which didn't work out of the box due to the lack of encryption support. So, at the lack of a better options, i implemented it :-) https://github.com/AntonioMeireles/homebridge-vieramatic / https://www.npmjs.com/package/homebridge-vieramatic.

it mostly works already (it's a work in progress) and i just made it public - feedback is welcome!

A great weekend for all!

Peterjohnwood commented 4 years ago

hi folks!

FWIW - i recently got a GX830 (2019 model) which didn't work out of the box due to the lack of encryption support. So, at the lack of a better options, i implemented it :-) https://github.com/AntonioMeireles/homebridge-vieramatic / https://www.npmjs.com/package/homebridge-vieramatic.

it mostly works already (it's a work in progress) and i just made it public - feedback is welcome!

A great weekend for all!

@AntonioMeireles nice work, I've got it working on a FZ952B. I can turn it on and off and change the volume all by Siri, but what commands do i use to change inputs with Siri?