Open n3on4s opened 8 months ago
I got a Xiaomi device, so integration becomes unavailable after turn off, and the bigger problem is that it never comes back. By never, I mean - even if the tv is on and ADB is available. It's not a solution for this particular issue , but I ended up having a script that turns on tv using IR remote and then reloading config entity of Android TV remote integration.
On my Philips I've changed the developer setting, reinstalled Android TV Remote, reconfigured it in HA and disabled power optimization for the remote app. Unfortunately nothing has worked for me.
If you have a Philips TV, please try this like @AssenDimitrov mentioned in his previous poste!
TV settings menu, I clicked "Android Settings" > "Device Settings", then Developer Options > Enable screen on when charging (or something like that).
Did you try it?
Yes, unfortunately it didn't help for me.
Can someone update the documentation with the workarounds mentioned so far?
Here is how to edit the documentation and create a pull request:
@home-assistant rename Android TV integration - TV unavailable when turned off
Not sure if it helps, but probably something to validate: I use the official philips integration, where the button to turn on the TV also regularily disappeared - until I turned on USB Debugging on the TV (NOT Enable screen on when charging, this is off on my TV).
Nothing helped, still TV Off/Unavailable, over and over. I've even tried setting the TV to a static IP address on both the TV and the router, nothing helps.
I have this issue but not as consistently and mentioned in this thread. It disconnects once in a while, but it keeps doing it every few days/hours. But clearly not every time it goes off.
Mine is a Chromecast with Google TV. I have turn off after 15min inactive, but that doesn't seem to be related. There's no "Screennless" option on mine.
Any ideas how to fix it? Is it a different issue?
I solved this problem with my TCL Android TV by activating the following option hidden far away here:
Settings -> System -> Network & Internet -> activate checkbox “Network Standby”
IT WORKS FOR ME %100
TCL ANDROID TV.
THANK YOU
Only working way I found for deep sleep problem is using Wakelock Revamped. It is on Play store, but not compatible with Android TV. So you have to sideload APK using flashdisk and any working file manager (Solid or X-Plore are TV compatible). You can download latest version of APK from developer Github. What this app does is keep wakelock or state of CPU/WiFi component out of sleep. Which is crucial, because then system doesn't run night cycles and your TV is powered much faster.
Tip for running it on TV as it seems to be setup as system app, not directly supporting Android TV, you wont find it in installed apps. Found workaround how to run it, go to: Settings -> Android settings -> Device preferences -> Storage -> Internal storage -> Apps -> See all apps -> scroll to bottom System apps -> scroll down to Wakelock v3 and click -> Open. Voila. Great UX!
I think I found one solution using adb in my TCL TV, asked chatGPT and sent me this commands: you should install adb in your computer through cmd, then connect to your IP like this: adb connect [your TV IP]
adb shell settings put global stay_on_while_plugged_in 3
adb shell dumpsys power | grep mWakefulness adb shell dumpsys deviceidle disable
adb shell svc power stayon true
adb shell dumpsys power
adb shell settings put global sleep_timeout 0
I has just sent all these commands and it solved the problem, none of the solutions worked for me, neither using wakelock, TCL seems not to like using this app or something about the android version, let me know if it works!
Thanks for sharing.
This command didn't work - "adb shell dumpsys power | grep mWakefulness"
Rest of commands were accepted but the device is still becoming unavailable.
On Tue, 10 Sept 2024 at 08:51, pablosuarez999 @.***> wrote:
I think I found one solution using adb in my TCL TV, asked chatGPT and sent me this commands: you should install adb in your computer, then connect to your IP like this: adb connect [your TV IP]
adb shell settings put global stay_on_while_plugged_in 3
adb shell dumpsys power | grep mWakefulness adb shell dumpsys deviceidle disable
adb shell svc power stayon true
adb shell dumpsys power
adb shell settings put global sleep_timeout 0
I has just sent all these commands and it worked for me, any of all the solutions worked for me, neither using wakelock, TCL seems not to like using this app or something about the android version, let me know if it works for some of you!
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/107649#issuecomment-2339288148, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARVUAIULH7APR2MFYXELVLLZVYRAFAVCNFSM6AAAAABBTCVLTGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZZGI4DQMJUHA . You are receiving this because you commented.Message ID: @.***>
@rutj87 I have wakelock v3 installed with processor turned on, if you wanna make sure...
The problem
So I encoutered problem with my Android TV (TCL), where whenver I shutdown TV, it becomes unavailable in HA:
I did some debuging, and narrowed down problem to android TV itself.
When TV is on, NMAP results:
After TV gets shutdown, by any way remote/HA/auto sleep:
I tried to change every tipe of settings in Android TV and nothing helped.
After some time I tried to wake up TV with WakeOnLan option and at first seems like TV had'nt woke up, however, nmap started responding with OK results, and TV become available (visible as turned off again) in HA again:
I know this happend not to all android TVs, however maybe you could add configuration option to enable, automaticaly resending WakeUpOnLan command, before the Heartbeat request, if tv is in Off/unavailable state?
What version of Home Assistant Core has the issue?
core-2024.1.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Android TV Remote
Link to integration documentation on our website
https://www.home-assistant.io/integrations/androidtv_remote/
Diagnostics information
config_entry-androidtv_remote-369036337b86e55921657a6ff3d5d5b9.json.txt
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
For anyone looking for fast fix, setting automation every 10s. to send magic wakeup packet, to TV's MAC when TV is off/unavailable fixed the issue for me.