breunigs / bravia-auth-and-remote

Shell snippets to auth and send remote control commands to Sony Bravia TVs
ISC License
249 stars 50 forks source link

Possible use of PSK #5

Closed wennes closed 8 years ago

wennes commented 8 years ago

i searched for

HTTP_CODE: 500 bravia

because my cookie seemed to fail again. I found https://www.domoticz.com/forum/viewtopic.php?t=8301 and followed this:

Enable pre-shared key on your TV: [Settings] → [Network] → [Home Network Setup] → [IP Control] → [Authentication] → [Normal and Pre-Shared Key] Set pre-shared key on your TV: [Settings] → [Network] → [Home Network Setup] → [IP Control] → [Pre-Shared Key] → [sony]

my new psk is "sony"

Then i edited the send_command.sh

code=$(curl -w "%{http_code}" --silent -XPOST http://$ipaddress/sony/IRCC -d "$cmd" -H 'Content-Type: text/xml; charset=UTF-8' -H 'SOAPACTION: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"' -H"Cookie: $cookie"-o /dev/null )

to

code=$(curl -w "%{http_code}" --silent -XPOST http://$ipaddress/sony/IRCC -d "$cmd" -H 'Content-Type: text/xml; charset=UTF-8' -H 'SOAPACTION: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"' -H"X-Auth-PSK: sony"-o /dev/null )

and now it works with a PSK.

appellemoipolo commented 8 years ago

Hi!

The connection with my kdl50w829b seems to work better with your solution.

With the cookie solution I always lost the connection (404 or 500) between my tv and that script after 2 or 3 weeks. It seems to work better now after 1-2 weeks. If the fail one more time, I will post here, but for the moment, it works better!

Thank you (and sorry for my bad english), polo