This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.

[App][Beta testing]Sony Bravia(KD, KDL series 2013+) AndroidTV

245

Comments

  • Ok, do that tomorrow.

  • casedacaseda Member
    @LexJanssen ;
    That can't be an android TV television..
    That model is from 2013.
    Sony only started in 2015 with the first Android TV televisions 

    Reading the interwebs also confirmes it is a "Sony smart TV platform" a.k.a. Playstation like interface
  • @MarcoF

    Yesterday I installed the app using the instructions.
    Everything went ok, and the app showed up in the "Settings" section of Homey.
    But nowhere else. I expected it to show under devices where it can be added (and configurated) to the living room.

    Unistalled the app, restarted Homey and reinstalled the app. Unfortunately with no further results.

  • MarcoFMarcoF Member
    edited June 2016
    @Hindelaufen add/pair the TV with the big + sign in a zone.

    Follow the pre-setup settings for the TV and Try to pair the TV automagicly and/or manual.

    This should add the TV and make things work.
  • @Caseda, Ok that's too bad.

    ;With OpenRemote I can POST commands like this:
    For channel 1:
    URL: http://10.0.0.21/sony/IRCC?
    POST <?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_SendIRCC xmlns:u="urn:schemas-sony-com:service:IRCC:1"><IRCCCode>AAAAAQAAAAEAAAAAAw==</IRCCCode></u:X_SendIRCC></s:Body></s:Envelope>

    Return data:
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <s:Body>
            <u:X_SendIRCCResponse xmlns:u="urn:schemas-sony-com:service:IRCC:1">
            </u:X_SendIRCCResponse>
        </s:Body>
    </s:Envelope>
    
    Etc. etc, etc..........
    
    I think i have to use the HTTP APP and make for every command a flow.
  • MarcoFMarcoF Member
    @Caseda, Ok that's too bad.

    ;With OpenRemote I can POST commands like this:
    For channel 1:
    URL: http://10.0.0.21/sony/IRCC?
    POST <?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_SendIRCC xmlns:u="urn:schemas-sony-com:service:IRCC:1"><IRCCCode>AAAAAQAAAAEAAAAAAw==</IRCCCode></u:X_SendIRCC></s:Body></s:Envelope>

    Return data:
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <s:Body>
            <u:X_SendIRCCResponse xmlns:u="urn:schemas-sony-com:service:IRCC:1">
            </u:X_SendIRCCResponse>
        </s:Body>
    </s:Envelope>
    
    Etc. etc, etc..........
    
    I think i have to use the HTTP APP and make for every command a flow.
    Thats looking pretty the same for what I use for the app and this should work.

    You are able to install the app?
    Could you try to start pairing and add the TV manually;
    Name: Sony Bravia KDL- 46W905A
    IP: xxx.xxx.xxx.xxx
    PSK: 0000

    And see if you could make some flows and control the TV.
  • If I do that I get by adding an device the message Broken and Please set PSK.
    Making a new flow i get the message: connection error(timeout|refused)?

  • MarcoFMarcoF Member
    Is the device add to Homey and do you see the Sony Bravia TV device in the zone where you initiated the pair?

    If so, open settings of the device and see which PSK is set.
  • Yes it shows in the zone and the PSK is what I fill in 0000.


  • This is what i get:



  • MarcoFMarcoF Member
    hmmm looks like your TV isn't responding to one of the used request.

    Could you try to fire this request on your TV and post the results:

    method: 
    POST
    url:
    /sony/system HTTP/1.1
    header:
    Host: 10.0.0.21
    X-Auth-PSK: 0000
    Cache-Control: no-cache
    json payload: {"method":"getPowerStatus","params":[],"id":5,"version":"1.0"}
  • MarcoF said:
    @Hindelaufen add/pair the TV with the big + sign in a zone.

    Follow the pre-setup settings for the TV and Try to pair the TV automagicly and/or manual.

    This should add the TV and make things work.
    That is the problem: When I press the add button (big + sign) there is no option to choose for the TV. All the other devices (Hue, Klik aan Klik uit, Synology and Kodi) are there, but no Sony.

    The App is visible in Settings.
  • MarcoFMarcoF Member
    That's very(!) odd!

    Which Homey firmware are you running?

    Could you try to re-install the app with:
    athom project --install
    and post some screenshots of the install procedure, settings app page and pair popup?

  • Sure, I'll do when I am at home.
  • @MarcoF,
    hi where do i put this request, on the tv or in chrome.  
  • @MarcoF 
     I get this message: {"error":[404,"Not Found"]}.
    Maybe I do something wrong.
    When I post to http://10.0.0.21/sony/IRCC?
    data: <?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_SendIRCC xmlns:u="urn:schemas-sony-com:service:IRCC:1"><IRCCCode>AAAAAQAAAAEAAAAUAw==</IRCCCode></u:X_SendIRCC></s:Body></s:Envelope>
    
    TV goes on mute. that works!
    
    When I post to http://10.0.0.21/sony/system HTTP/1.1 without header I get {"error":[404,"Not Found"]}
  • MarcoFMarcoF Member
    edited June 2016
    Great!
    Do you have more info (sites/forum/etc) on how to communicate with the API of your TV?

    Oo and a bit more explaining;
    The specific API call has no endpoint on your TV's firmware.
    I use this call for 2 reasons;
    1. see if the TV is there
    2. whats the power status of the TV

    Because this call is failing, the app things the isn't there and because the app don't kwow the power status the on/off capabilities can't work.

    So if your TV has a endpoint for the power status, then i can make it work (i hope and think).
  • MarcoFMarcoF Member
    Again great and I will take a look at it!
    Didn't look at the links yet, but if the have the right info then I hope to fix it within the upcoming 1-2 weeks.
  • HindelaufenHindelaufen Member
    edited June 2016
    @MarcoF ;; and others

    Alright, as promised; the installation screenshots.
    Preparation: uninstalled  Sony Bravia app & restarted Homey, installed NODE.JS

    Step 1:
    A) npm install -g athom-cli
    B) athom login




    Then  athom project --create



    Finally athom project --install



    So far so good.

    Check in Homey > Settings > Apps:


    Sony Bravia is here! (and enabled).

    Go to devices and try to add a new device:



    No Sony Bravia... (not even after restart of Homey)

    I tried this procedure now 6 times, tried to disable the app - restart and enabled again.
    No luck.

    I hope one of you have some advice.

    thanks in advance!

    *the command sections are a bit off, but as you can see in the screen-shots, no typo was made.

  • MarcoFMarcoF Member
    @Hindelaufen ;
    This is not the procedure for installing apps. sorry.

    First download the app from githhub:
    https://github.com/freemann/com.sony.bravia.androidtv/archive/master.zip

    unzip the file in a certain dir/folder.
    go to that dir/folder and run;
    athom project -- run
    nothing more and nothing less.
  • MarcoFMarcoF Member
    edited June 2016
    @Hindelaufen @LexJanssen and other ;)

    Just did a small update, hopefully this fixes the older models and timeout/refused errors.
  • @MarcoF

    Ah, sorry about that, I just followed the instructions from the developers section on Athom.com.

    Can I use the --install command too?

    Thanks for your quick reply btw!
  • MarcoFMarcoF Member
    --install does a "real" which survives a reboot.
    --run doesn't survive a reboot.

    So you can use them both and its up to you which one you choose.
  • @MarcoF

    Hi, thanks. I will try this version tomorrow or in the weekend. 
  • @MarcoF

    Your instructions are helpful, the app installed as it should. Thank you for your help and the development of the app, I'll buy you a beer.

    A quick test resulted in controlling the TV. Genius.

    Thanks again.
  • MarcoFMarcoF Member
    edited June 2016
    @LexJanssen ;
    No hurry and let me your findings!

    @Hindelaufen
    Your welcome and have fun with the app and Homey!
    [edit] thanx for the beers!!
  • Great work, my non-Android  Sony TV is working and can be controlled with your app.. 
    One small thing ;), the "TV on" command isn't working yet... 

    My BRAVIA model number: KD-49X8505B

  • MarcoFMarcoF Member
    Martijn said:
    Great work, my non-Android  Sony TV is working and can be controlled with your app.. 
    One small thing ;), the "TV on" command isn't working yet... 

    My BRAVIA model number: KD-49X8505B

    Great to hear that other TV's are also working!
    Looks like Sony implemented this API on more TV's.

    "TV on", do you mean a Flow Card and if so, is it a "When" or "Then" card?

    Also another question to you;
    Is the device/mobile card showing the right power status of your TV?
Sign In or Register to comment.