tomokas / pyviera

Control Panasonic VIERA TVs programmatically.
36 stars 13 forks source link

Can' seem to get a response from my Viera E30 #8

Open tddias opened 9 years ago

tddias commented 9 years ago

Hi,

This project seems really cool for an interesting smart home integration. I started by downloading this version and upgrading it to Python 3, as I was unable to get a response to the SSDP request from Viera I turned to Python 2 and redownloaded your original code. I'm still unable to get a response from Viera. I've tried WiFi and LAN, I can ping the Viera and even access http://192.168.0.100:55000/ (for which I get a 403). I've Wiresharked when using my iPhone Remote App that's working over Wifi. I was able to notice the SSDP is a little different, with ('ST', 'uuid:4D454930-0100-1000-8001-CC7EE77091B8'), and 3 packets being sent in sequence. I tried this ST with pyviera but still don't get a response. Is there something I might be trying wrong?

Btw, if the Python 3 version is of interested do let me know. At this point I can't test it due to this problem.

Thanks in advance, regards, Tiago Dias

baflo commented 6 years ago

Did you find a solution to this? I have the same problem and reduced it to the following command, which works on all devices but my Raspberry Pis:

curl 'http://192.168.178.142:55000/nrc/control_0' \
    -H 'soapaction: "urn:panasonic-com:service:p00NetworkControl:1#X_SendKey"' \
    --data-binary '<?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_MUTE-ONOFF</X_KeyEvent></u:X_SendKey></s:Body></s:Envelope>' \
    -w '%{http_code}'
tddias commented 6 years ago

Dear @baflo , I don't really recall as it was so long ago, I have a faint idea I was able to turn my tv on and off after some tweaks. I didn't do discovery I think and sent the command only like you did above.

Honestly now I'm using an IR solution with Broadlink RM 3 Pro, I also use it to control RF devices (light switches, gates, shutters and blinds).

baflo commented 6 years ago

I tried to avoid that solution, but at least because my TV doesnt support Wake by WiFi it will eventually a better solution.

I think the error is somewhere deep in the TCP stack. At least I compared the HTTP requests and there are no differences.