rwifall/homebridge-sonybraviatv

Does it work on wifi connection?

Closed this issue · 17 comments

I've configured my TV to use WiFi. It turns off perfectly, but I can't turn it on. Is it because WiFi?

It should work over a Wifi connection. Does the AndroidTV smart phone app turn on your TV?
What model TV do you have?
Can you also show me what the home bridge log shows when you try to turn on your TV?
It can often be found in /var/log/homebridge.log

Also verify that Remote Start is set to ON.
This can be found in Settings->Network->Remote Start

I had "Remote Start" set to ON. This is Sony Bravia X8505 series.

[9/29/2016, 11:39:06 AM] [Sony Bravia] Getting whether Sony TV is on...
[9/29/2016, 11:39:24 AM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.28:80
[9/29/2016, 11:39:29 AM] [Sony Bravia] Getting whether Sony TV is on...
[9/29/2016, 11:39:32 AM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.28:80
[9/29/2016, 11:39:33 AM] [Sony Bravia] Getting whether Sony TV is on...
[9/29/2016, 11:39:35 AM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.28:80
[9/29/2016, 11:39:35 AM] [Sony Bravia] Getting whether Sony TV is on...
[9/29/2016, 11:39:38 AM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.28:80
[9/29/2016, 11:39:39 AM] [Sony Bravia] Getting whether Sony TV is on...
[9/29/2016, 11:39:41 AM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.28:80
[9/29/2016, 11:39:41 AM] [Sony Bravia] Getting whether Sony TV is on...
[9/29/2016, 11:39:44 AM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.28:80

But this is nothing strange, nmap doesn't see any open ports... It seems that you can't wake up tv on wifi...

PS
Have you seen this - http://shop.kindermann.com/erp/KCO/avs/3/3005/3005000168/01_Anleitungen+Doku/Steuerungsprotokoll_1.pdf?

That error means that the TV is not present on the network, which would seem to be an issue with the settings of the TV.
Yes I have seen that link.

My Television works fine on Wifi. It's XBR65X810C I believe. Thanks for this project. There are 6 or 8 of these out there. So far this is the only one taking PSK into account. Works well for off/on.

@kusmierz
Ok, so I checked my TV on WiFi and it worked for me as well.
It sounds like you must not have something setup correctly if your TV is showing no ports open.

The things that I would confirm are:

  • Make sure that you are on the latest Software/Firmware update for your TV
  • Check all the TV Network settings and make sure they all seem correct.
  • Double check Remote start is set to On
  • Make sure IP Control Authentication is set to Normal and Pre-Shared Key and the Pre-Shared Key is set.
  • Check power settings to see if there are any ECO/Power settings that might be causing the TV to be completely power down when turned off.
  • Check to see if your TV has an energy saving switch on the back of the TV and if it is in the proper position for remote start to work.
  • Verify that Sony official apps like "Video & TV SideView" work to power on your TV. If the app doesn't work, then it is not likely this plugin will work.

I haven't been able to reproduce this problem and based on your description it sounds like this is an issue with your TV settings and not with the plugin itself. As such I am going to close this issue.

I checked everything, and Sony's "Video & TV SideView" app can switch on the TV. But custom "Sony Mote" couldn't turn it on.

Your plugin reports:

[10/5/2016, 8:04:27 PM] [Sony Bravia] Getting whether Sony TV is on...
[10/5/2016, 8:04:45 PM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.20:80
[10/5/2016, 8:05:17 PM] [Sony Bravia] Getting whether Sony TV is on...
[10/5/2016, 8:05:20 PM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.20:80
[10/5/2016, 8:05:25 PM] [Sony Bravia] Getting whether Sony TV is on...
[10/5/2016, 8:05:28 PM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.20:80
[10/5/2016, 8:05:36 PM] [Sony Bravia] Getting whether Sony TV is on...
[10/5/2016, 8:05:39 PM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.20:80
[10/5/2016, 8:05:41 PM] [Sony Bravia] Getting whether Sony TV is on...
[10/5/2016, 8:05:42 PM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.20:80
[10/5/2016, 8:05:47 PM] [Sony Bravia] Getting whether Sony TV is on...
[10/5/2016, 8:05:50 PM] [Sony Bravia] Error getting TV status: Error: connect EHOSTUNREACH 192.168.144.20:80

Can you telnet to that IP on port 80 from your homebridge host? Or even use a browser depending on your environment? Perhaps AP Isolation mode is turned on for your Access Point/router? That error doesn't suggest an issue with homebridge, it suggests a network issue.

@russellh76 not really. My network is fine for sure, and both devices (phone with "Video & TV SideView" app and a server with homebridge) are in the same network, connected to the same router, same way, etc...

I can't connect to TV's IP on any port (using telnet, netcat or a browser). There is no port opened (as I described it above by scanning all ports).

But! I can turn on my TV using WOL! So probably Sony's app using WOL. I could try to sniff it some day, and check if I'm right.

Oh indeed you did. I'm looking on openremote.org for your model presently. To be clear, I'm merely a user of this particular accessory. Just trying to help as I've gotten so little myself with similar issues. I can issue all of the commands possible via HTTP (with PSK) now, so I should be able to get them all functioning in Homebridge.

@rwifall I suspect I'm missing something, but I'm a noob and see nowhere else to ask questions regarding the project. I think I can easily modify your index.js such that a function exists for all of the major functionality (mute, channelUp, blah, blah, blah). The part that I'm missing is how is this exposed to homebridge/homekit? I've missed a step (or 3) somewhere. My HTML mockup is here: https://dl.dropboxusercontent.com/u/11118349/SonyTV/TV.html

@kusmierz Ok, great info that you are able to turn on your Sony Bravia with WOL. That is different from the model that russelh76 and I have. I'll change this to a enhancement request for adding WOL support. I think that should be pretty straight forward but I won't have a way to test.

@russellh76 You should add a new issue for new topics. I've created a new one for your question in issue #5 and will follow up there.

Cool, thank you for the patience. I know I'm fumbling about here.

@kusmierz Ok, I added support for Wake-on-Lan to the plugin in commit 11c1338
Can get the latest, add the macaddress field with the MAC address from your TV into your configuration and see if that works for you?

Example:

"accessories": [
    {
        "accessory": "SonyBraviaTV",
        "name": "My TV Name",
        "macaddress": "01:02:03:04:05:06",
        "ipaddress": "YOUR TV IP ADDRESS HERE",        
        "presharedkey": "YOUR PRESHARED KEY HERE"
  }
    ]

@rwifall I'll check later, but I think there would be a problem with "Getting whether Sony TV is on" (see my error above).