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.
Closed

APP idea: Sony Bravia

2»

Comments

  • MarcoFMarcoF Member
    Probably this week I will release a first version. I will open a new topic and create a git repo for it. You guys can test it through the CLI and I will submit it to the app store
     when it's "ready enough" for "release. 
  • jordenjorden Member
    Good, good! My girlfriend was mad at me for working on the LG TV app while we have a Sony TV... LOL.
  • MarcoFMarcoF Member
    edited June 2016
    LoL!!!

    I'm still experiencing some strange connection refused/timedout issues with the requests. 

    Very strange and annoying, especially because when I do the request with Homey the connection is refused and direct after it run a request through Chrome it works.
  • MarcoFMarcoF Member
    edited June 2016
    The last weeks my Homey has ups and downs with connecting to my TV and my laptop has a near 100% connectivity.

    Last night I ran some test and it resulted in a ~90% connection fail from Homey to the TV while my laptop at the same time had a 2% connection lost over 8u+ runtime.

    Both devices were using the same script in Node.

    Development is at a standstill, this because I can't guarantee a functioning app.

    more info:
    https://athomcommunity.slack.com/archives/developers/p1464845269001565
  • fiekfiek Member
    MarcoF said:
    The last weeks my Homey has ups and downs with connecting to my TV and my laptop has a near 100% connectivity.

    Last night I ran some test and it resulted in a ~90% connection fail from Homey to the TV while my laptop at the same time had a 2% connection lost over 8u+ runtime.

    Both devices were using the same script in Node.

    Development is at a standstill, this because I can't guarantee a functioning app.

    more info:
    https://athomcommunity.slack.com/archives/developers/p1464845269001565
    Too bad, but thnx for your efforts so far :smile: 
  • This is the code I use on Eventghost to control my Sony. Maybe it helps.

    import requests

    # Request cookie
    headers = {
    'Connection': 'keep-alive',
    'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36',
    'Origin': 'chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo',
    'Content-Type': 'application/xml',
    'Accept': '*/*',
    'Accept-Encoding': 'gzip, deflate',
    'Accept-Language': 'nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4'
    }
    content = '{"id":13,"method":"actRegister","version":"1.0","params":[{"clientid":"iRule:1","nickname":"EventGhost"},[{"clientid":"EventGhost:1","value":"yes","nickname":"EvetGhost","function":"WOL"}]]}'
    url = 'http://<sonyIP>/sony/accessControl'
    response = requests.post(url, data=content, headers=headers)
    authcookie = response.cookies['auth']
    #print(authcookie)
    #Request action
    headers = {
    'Connection': 'keep-alive',
    'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.91 Safari/537.36',
    'Origin': 'chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo',
    'Content-Type': 'application/xml',
    'Accept': '*/*',
    'Accept-Encoding': 'gzip, deflate',
    'Accept-Language': 'nl-NL,nl;q=0.8,en-US;q=0.6,en;q=0.4',
    'Cookie': 'auth=' + authcookie
    }
    content = '<?xml version="1.0"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><m:X_SendIRCC xmlns:m="urn:schemas-sony-com:service:IRCC:1"><IRCCCode xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">AAAAAgAAAJcAAAAyAw==</IRCCCode></m:X_SendIRCC></SOAP-ENV:Body></SOAP-ENV:Envelope>'
    url = 'http://<sonyIP>//sony/IRCC'
    response = requests.post(url, data=content, headers=headers)
    print(response)


  • Hello guys and gals. I have been trying for some time to use this codes to control my Sony Bravia 2015 using the amazon Echo. Since programming a skill for the Echo is way harder to do, I started by using the IFTTT channel/skill and the MAKER to get this going. I successfully was able to send the code request to the TV. The problem I ran to send commands is that the IFTTT and Maker only send a "body" to the address but no header.

    To be more precise I need a URL which is  ' http://<sonyIP>//sony/IRCC'
    a Method: GET, POST, PUT, HEAD, DELETE, PATCH, OPTIONS of which I use POST
    a Content Type: application/json, application/x-www-form-urlencoded, text/plain of which I have used text/plain
    and finally a Body: where I have put the codes discussed here

    Like I said before I can authenticate because that command doesnt require a header. But I dont know how to send the commands because there is not a header field to fill up. 

    Since this works from the web I setup a DMZ from my router and put the TV on a static address and made my router send all traffic from the DMZ to the TVs address.

    Any help would be greatly appreciated.

  • @aaabest : Amazon echo is an inferior crippled product.... You should use Homey :D
  • Its an european product. Here in america is all about the Echo. If everyone can share we probably get somewhere...
  • @aaabest
    It's exactly as you say.
    IFTTT does not support headers. 
    And probably won't do that for a while (they have been talking (complaining) about it for a while already) 
    So it's just not (easily) possible with "the American way" echo.

    If you really really want it, create a device (IE: Raspberry pi) that runs a callback server to add the header midway. 

    Or just buy a homey, cause it will work as perfectly as here in Europe, all settings can be easily changed to make it fully compatible there so the "it's an European product" is bull..
  • Update 0.4.3 is on Github now. It has a small bugfix which should prevent crashes.
    I will try out the update tonight to see if it works well, am not at home so I cannot test currently. 
  • @jorden ;

    Thanks for the great Sony Bravia app. I am trying to get it working with my KDL-32EX5000 (non Android TV) from 2014/2015.
    First problem is overlaying text and pictures in the setup screen:


    I am not able to enter the IP adres.

    Next, my non Android Bravia doesn't work with a PSK. When I connect the first time a four digit code shows up on the TV. When I enter this code in the software I can connect.
    I did some tests with a Bravia NodeJS library, this seems to work ok. I would like to help you to get your app also compatible with then non Android Bravia TV's.
    I managed to add a Bravia TV which i could turn off with your app, but nothing else, and the device was not present anymore after a few minutes.

    Gr. Remco
  • @RemcoHannink I am not sure how much of it will work on non-Android-TV's!
  • rowgeerowgee Member
    edited December 2016
    I have a KDL 55x8505B

    The result from my model looks likes this:

    {"id":10,"result":[{"bundled":true,"type":"RM-J1100"},[{"name":"PowerOff","value":"AAAAAQAAAAEAAAAvAw=="},{"name":"Input","value":"AAAAAQAAAAEAAAAlAw=="},{"name":"GGuide","value":"AAAAAQAAAAEAAAAOAw=="},{"name":"EPG","value":"AAAAAgAAAKQAAABbAw=="},{"name":"Favorites","value":"AAAAAgAAAHcAAAB2Aw=="},{"name":"Display","value":"AAAAAQAAAAEAAAA6Aw=="},{"name":"Home","value":"AAAAAQAAAAEAAABgAw=="},{"name":"Options","value":"AAAAAgAAAJcAAAA2Aw=="},{"name":"Return","value":"AAAAAgAAAJcAAAAjAw=="},{"name":"Up","value":"AAAAAQAAAAEAAAB0Aw=="},{"name":"Down","value":"AAAAAQAAAAEAAAB1Aw=="},{"name":"Right","value":"AAAAAQAAAAEAAAAzAw=="},{"name":"Left","value":"AAAAAQAAAAEAAAA0Aw=="},{"name":"Confirm","value":"AAAAAQAAAAEAAABlAw=="},{"name":"Red","value":"AAAAAgAAAJcAAAAlAw=="},{"name":"Green","value":"AAAAAgAAAJcAAAAmAw=="},{"name":"Yellow","value":"AAAAAgAAAJcAAAAnAw=="},{"name":"Blue","value":"AAAAAgAAAJcAAAAkAw=="},{"name":"Num1","value":"AAAAAQAAAAEAAAAAAw=="},{"name":"Num2","value":"AAAAAQAAAAEAAAABAw=="},{"name":"Num3","value":"AAAAAQAAAAEAAAACAw=="},{"name":"Num4","value":"AAAAAQAAAAEAAAADAw=="},{"name":"Num5","value":"AAAAAQAAAAEAAAAEAw=="},{"name":"Num6","value":"AAAAAQAAAAEAAAAFAw=="},{"name":"Num7","value":"AAAAAQAAAAEAAAAGAw=="},{"name":"Num8","value":"AAAAAQAAAAEAAAAHAw=="},{"name":"Num9","value":"AAAAAQAAAAEAAAAIAw=="},{"name":"Num0","value":"AAAAAQAAAAEAAAAJAw=="},{"name":"Num11","value":"AAAAAQAAAAEAAAAKAw=="},{"name":"Num12","value":"AAAAAQAAAAEAAAALAw=="},{"name":"VolumeUp","value":"AAAAAQAAAAEAAAASAw=="},{"name":"VolumeDown","value":"AAAAAQAAAAEAAAATAw=="},{"name":"Mute","value":"AAAAAQAAAAEAAAAUAw=="},{"name":"ChannelUp","value":"AAAAAQAAAAEAAAAQAw=="},{"name":"ChannelDown","value":"AAAAAQAAAAEAAAARAw=="},{"name":"SubTitle","value":"AAAAAgAAAJcAAAAoAw=="},{"name":"ClosedCaption","value":"AAAAAgAAAKQAAAAQAw=="},{"name":"Enter","value":"AAAAAQAAAAEAAAALAw=="},{"name":"DOT","value":"AAAAAgAAAJcAAAAdAw=="},{"name":"Analog","value":"AAAAAgAAAHcAAAANAw=="},{"name":"Teletext","value":"AAAAAQAAAAEAAAA/Aw=="},{"name":"Exit","value":"AAAAAQAAAAEAAABjAw=="},{"name":"Analog2","value":"AAAAAQAAAAEAAAA4Aw=="},{"name":"*AD","value":"AAAAAgAAABoAAAA7Aw=="},{"name":"Digital","value":"AAAAAgAAAJcAAAAyAw=="},{"name":"Analog?","value":"AAAAAgAAAJcAAAAuAw=="},{"name":"BS","value":"AAAAAgAAAJcAAAAsAw=="},{"name":"CS","value":"AAAAAgAAAJcAAAArAw=="},{"name":"BSCS","value":"AAAAAgAAAJcAAAAQAw=="},{"name":"Ddata","value":"AAAAAgAAAJcAAAAVAw=="},{"name":"PicOff","value":"AAAAAQAAAAEAAAA+Aw=="},{"name":"Tv_Radio","value":"AAAAAgAAABoAAABXAw=="},{"name":"Theater","value":"AAAAAgAAAHcAAABgAw=="},{"name":"SEN","value":"AAAAAgAAABoAAAB9Aw=="},{"name":"InternetWidgets","value":"AAAAAgAAABoAAAB6Aw=="},{"name":"InternetVideo","value":"AAAAAgAAABoAAAB5Aw=="},{"name":"Netflix","value":"AAAAAgAAABoAAAB8Aw=="},{"name":"SceneSelect","value":"AAAAAgAAABoAAAB4Aw=="},{"name":"Mode3D","value":"AAAAAgAAAHcAAABNAw=="},{"name":"iManual","value":"AAAAAgAAABoAAAB7Aw=="},{"name":"Audio","value":"AAAAAQAAAAEAAAAXAw=="},{"name":"Wide","value":"AAAAAgAAAKQAAAA9Aw=="},{"name":"Jump","value":"AAAAAQAAAAEAAAA7Aw=="},{"name":"PAP","value":"AAAAAgAAAKQAAAB3Aw=="},{"name":"MyEPG","value":"AAAAAgAAAHcAAABrAw=="},{"name":"ProgramDescription","value":"AAAAAgAAAJcAAAAWAw=="},{"name":"WriteChapter","value":"AAAAAgAAAHcAAABsAw=="},{"name":"TrackID","value":"AAAAAgAAABoAAAB+Aw=="},{"name":"TenKey","value":"AAAAAgAAAJcAAAAMAw=="},{"name":"AppliCast","value":"AAAAAgAAABoAAABvAw=="},{"name":"acTVila","value":"AAAAAgAAABoAAAByAw=="},{"name":"DeleteVideo","value":"AAAAAgAAAHcAAAAfAw=="},{"name":"PhotoFrame","value":"AAAAAgAAABoAAABVAw=="},{"name":"TvPause","value":"AAAAAgAAABoAAABnAw=="},{"name":"KeyPad","value":"AAAAAgAAABoAAAB1Aw=="},{"name":"Media","value":"AAAAAgAAAJcAAAA4Aw=="},{"name":"SyncMenu","value":"AAAAAgAAABoAAABYAw=="},{"name":"Forward","value":"AAAAAgAAAJcAAAAcAw=="},{"name":"Play","value":"AAAAAgAAAJcAAAAaAw=="},{"name":"Rewind","value":"AAAAAgAAAJcAAAAbAw=="},{"name":"Prev","value":"AAAAAgAAAJcAAAA8Aw=="},{"name":"Stop","value":"AAAAAgAAAJcAAAAYAw=="},{"name":"Next","value":"AAAAAgAAAJcAAAA9Aw=="},{"name":"Rec","value":"AAAAAgAAAJcAAAAgAw=="},{"name":"Pause","value":"AAAAAgAAAJcAAAAZAw=="},{"name":"Eject","value":"AAAAAgAAAJcAAABIAw=="},{"name":"FlashPlus","value":"AAAAAgAAAJcAAAB4Aw=="},{"name":"FlashMinus","value":"AAAAAgAAAJcAAAB5Aw=="},{"name":"TopMenu","value":"AAAAAgAAABoAAABgAw=="},{"name":"PopUpMenu","value":"AAAAAgAAABoAAABhAw=="},{"name":"RakurakuStart","value":"AAAAAgAAAHcAAABqAw=="},{"name":"OneTouchTimeRec","value":"AAAAAgAAABoAAABkAw=="},{"name":"OneTouchView","value":"AAAAAgAAABoAAABlAw=="},{"name":"OneTouchRec","value":"AAAAAgAAABoAAABiAw=="},{"name":"OneTouchStop","value":"AAAAAgAAABoAAABjAw=="},{"name":"DUX","value":"AAAAAgAAABoAAABzAw=="},{"name":"FootballMode","value":"AAAAAgAAABoAAAB2Aw=="},{"name":"Social","value":"AAAAAgAAABoAAAB0Aw=="}]]}

This discussion has been closed.