Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

New Sony Bravia TV - Plugin or HTTP Control


Question

Posted

Has anyone been able to integrate the new Sony Bravia TV's (my particular one is KD75X8500C) with Fibaro?

Recommended Posts

  • 0
Posted

Fibaro leraning manual says: 

"the user defines a designated button, and defines the communication to be sent after the button is used. The system supports string communicates (text data type).

For example, turn ON command line for Toshiba projector will be as follows: GET /cgi-bin/webrc.cgi?P_ON=OK HTTP/1.10x0D0x0A0x0D0x0A"

 

I am not sure what is string communicates (text data type), ie what coding should I use.

 

This is example of code that works from my terminal, but not from VD:

curl -w "%{http_code}" --silent -XPOST http://192.168.1.37/sony/IRCC -d "<?xml version=\"1.0\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\"><s:Body><u:X_SendIRCC xmlns:u=\"urn:schemas-sony-com:service:IRCC:1\"><IRCCCode>AAAAAgAAAMQAAABLAw==</IRCCCode></u:X_SendIRCC></s:Body></s:Envelope>" -H 'Content-Type: text/xml; charset=UTF-8' -H 'SOAPACTION: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"' -H "X-Auth-PSK: 0000" -o /dev/null

 

 

  • 0
Posted (edited)

TV sony kd 55x8505c

I have some errors

debug ping, wol, Setpower its ok.

Please login or register to see this attachment.

Please login or register to see this attachment.

Please login or register to see this attachment.

 

But debug SendCmd i have error.

Please login or register to see this attachment.

Buttons is not work.

 

Edited by Flash226
  • 0
Posted

By looking at your last image the error seems to be that you have not created a global variable to contain the command. Create a global called "tvCmd" and try again. 

 

Note that I only posted my code for you guys to get started and to learn a bit about how controlling the TV is possible, it is by no means a "finished product". 

  • 0
Posted (edited)

Please login or register to see this code.

Thanks for your work.

Edited by Flash226
  • 0
Posted

Happy to know that somebody found the work useful! :-)

  • 0
Posted

Last night my TV updated to a new software version and the HTTP control stopped working. Turns out the setting for PSK was turned back to default during the update. Turning it back solved the problem. I'll just cut and paste the process again from 

Please login or register to see this link.

 

You need to set your TV to use a pre-shared key.

  1. Navigate to: [Settings] → [Network] → [Home Network Setup] → [IP Control]
  2. Set [Authentication] to [Normal and Pre-Shared Key]
  3. There should be a new menu entry [Pre-Shared Key]. Set it to 0000. If you choose anything else, you need to change the PSK in the send_command.sh script.
  • 0
Posted
On 02.05.2017 at 0:24 PM, Flash226 said:

TV sony kdl 55x905a

I have some errors

debug ping, wol, Setpower its ok.

Please login or register to see this attachment.

Please login or register to see this attachment.

Please login or register to see this attachment.

 

But debug SendCmd i have error.

Please login or register to see this attachment.

Buttons is not work.

 

Please login or register to see this code.

  • 0
Posted

Please login or register to see this code.

  • 0
Posted

Thanks for posting this virtual device. It works perfectly with my Sony KD-55XD8005. Please keep us posted if you would have a new version of your virtual device.

  • 0
Posted

I have updated the virtual device with 4 buttons to select each HDMI input.

Please login or register to see this attachment.

Please login or register to see this attachment.

  • 0
Posted (edited)

Where or how do you enter the tvCmd global variable? I have no idea about this? :)

I have created a variable called tvCmd with value 0 (as thats default), but still when i press a button it wont work i get:

[ERROR] 16:19:57: line getGlobal("tvCmd")..."]:24

 

Nvm, I forgot to set the IP Control > Pre-shared key to 0000 :)

Edited by tcviper
  • 0
Posted

Hi All,

 

I think there's possibly a few struggling with @StarkJohan VD without understanding you need to create a variable called "tvCmd" in your HC2 first.

 

IP in the Advance settings screen of VD = IP of your TV (with NO :port number on the end)

Port in the Advance settings screen of VD= 80

You need to have the tv set up as per @StarkJohan post previous from github. setting authorization code to 0000

here:   

Please login or register to see this link.

 

Once you set up as per github, use sony app "Video and TV Sideview" to test if you can control your tv via IP.

 

Then check all settings above and VD should work.

 

 

@StarkJohan thanks for the VD. Working well. Now time to modify and Add custom commands.

 

  • 0
Posted

I would just like to add that the numbering of the buttons in the example file, fibaro-sony-bravia-pilot.vfib, is a bit wrong and stopped me from saving the VD.

I had to re-number the buttons. I used the far left button as 0,1,2,3,4. But remember that you have to re-number the EMPTY sections as well but un-ticking the empty button, then changing the button name, then checking the button again.

 

I have added some pictures from my notes, as this took ,e ages to figure out. Hope it helps someone!

 

 

Please login or register to see this attachment.

  • 0
Posted (edited)

To continue from my post above:

 

As noted earlier in this thread, there is a problem that the variable "IP_PSK", when created for some reason will not update.

I tried to hard code the PSK into the scenes and not use the variable but i didn't get anywhere.

 

I ended up setting the variable via the REST API and the resetting the HC2. (not sure if the restart was needed)

This is not a perfect solution as the its not the way it SHOULD work. I should be able to change the variable in the variables panel, but hey, it works.

 

Please login or register to see this image.

/monthly_2019_07/image.png.5fff3262acd3cae2325ffb2d5cf7e778.png" />

 

Edited by Fodder1
  • 0
Posted

super very interesting thread. Thanks for sharing this info :-) Using the sh files recommended above I was able to get the codes for my SONY OLED AG9. Maybe are useful for someone:

 

Please login or register to see this code.

 

 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...