Sony Android TV not responding to local network requests

by ztmztm

I am commanding my Sony Android TV via Siri (iPhone + Shortcuts) to switch on/off, start applications, etc.

To do this, I am using some local network requests like...

curl -v -XPOST http://192.168.0.11/sony/system -H 'X-Auth-PSK:XXX' -d '{"id":20,"method":"getRemoteControllerInfo","version":"1.0","params":[]}'

This often works, but sometimes it does not work to switch the TV on, while all the other commands always work fine.

I've investigated sending the requests from the PC at random times when the device was off and I've found out that sometimes it is not responding, so the requests are timing out after a number of seconds.

I've tried then sending a ping beforehand and sometimes the TV started responding, while some other times it took a lot of time (dozens of seconds), but it eventually started responding after I tried multiple times with ping, GET, POST, etc.

The TV resulted being correctly connected to the router with the appropriate IP address all the time (I checked the connected devices on the router control panel).

Why is the device sometimes randomly "sleeping" and responding to web requests only after a random period of time/attempts?

bdschuler

Well, I'll just throw in my experience and see if it helps you. My Sony TV had a bad habit or not having network whenever I would go into Amazon Video, etc. .it would take a second for the network to connect and then it would work. It seemed like the TV turned off the network as a power saving feature to me. Then when I found out Google Home integration worked, just was an issue because of this.. I went to town to find out how to fix it.

https://www.reddit.com/r/AndroidTV/comments/a4yx6o/reminder_check_your_android_tv_for_onoff/ebio59y/?context=3

I found these recommendations on the web and after using them all, my TV no longer disconnects at all.

  1. i went into my router and changed the wireless channel from automatic to a fixed channel (check what channel is currently active, and just use that channel). The wireless changing channels is thought to be one cause.
  2. I turned off any wireless power saving feature I saw. (WMMAPSD or WMM....)
  3. Then the last thing I did.. and this is only for Google Assistant.. is made sure all my devices were on the same network. If the outlets were on 2.4, make my TV on 2.4, etc...
  4. Turn off IPV6.

I think that was everything.. and since then.. I have not had a single time I turned the TV on and the wireless was not connected yet. That, and my Google Home integration is at 100% and works every time. So I really think it is an issue with wireless channel switching. If the above does not work for you.. try Googling the issue.. as I found a ton of forum posts, etc.. about it and I might have missed an item.

ztmztm

I might have found the solution to the issue. I had Simple IP Control disabled, as it wasn't the interface I was using (I tried REST API and IRRC-IP), but after enabling it, now all my network requests always succeed.

I tried it as the caption for the setting states "It might use more power when off" (or similar), so I thought that enabling it would have prevented the suspended power status, that turns the interfaces down.

The behaviour is still dodgy, as I would expect the interfaces to NEVER work when the TV is off, instead of working sometimes immediately or waking up at random, but on the Sony website there is specific documentation only about the Pro Display, that is behaving differently (it needs a WOL packet, while my TV does not), so there are no chances to get the exact logic.