Hey,
I use HA 0.99.3 in a pure docker install (host network) as well as an adb server on the same host in docker (host network). I even tested 2 different forked adb-server images but it looks like the adb server itself is working fine.
It used to work for months and now suddenly it does not anymore, I can’t really specifiy what happened when it stopped working since there happened different things like Server change, OS change, common update of HA and so on.
The log says:
2019-10-03 17:25:10 ERROR (SyncWorker_16) [androidtv.adb_manager] ADB device is unavailable; encountered an error when searching for device.
2019-10-03 17:25:10 WARNING (SyncWorker_16) [homeassistant.components.androidtv.media_player] Could not connect to Nvidia Shield at 192.168.178.21:5555 using ADB server at 127.0.0.1:5037
2019-10-03 17:25:10 WARNING (MainThread) [homeassistant.components.media_player] Platform androidtv not ready yet. Retrying in 90 seconds.
2019-10-03 17:25:10 ERROR (SyncWorker_13) [androidtv.adb_manager] ADB device is unavailable; encountered an error when searching for device.
2019-10-03 17:25:10 WARNING (SyncWorker_13) [homeassistant.components.androidtv.media_player] Could not connect to FireTV at 192.168.178.27:5555 using ADB server at 127.0.0.1:5037
2019-10-03 17:25:10 WARNING (MainThread) [homeassistant.components.media_player] Platform androidtv not ready yet. Retrying in 90 seconds.
While the log of the adb server is fine:
Starting up ADB...
Server started. Waiting for 30 seconds...
Connecting to devices.
connected to 192.168.178.21:5555
connected to 192.168.178.27:5555
Done.
And also from within the container:
/ # adb devices
List of devices attached
192.168.178.21:5555 device
192.168.178.27:5555 device
emulator-5570 offline
emulator-5572 offline
Netstat shows the port:
tcp6 0 0 :::5037 :::* LISTEN 19102/adb
And checking from the HA container:
bash-5.0# nc -zv 127.0.0.1 5037
127.0.0.1 (127.0.0.1:5037) open
And my configs:
- platform: androidtv
name: Nvidia Shield
device_class: androidtv
host: 192.168.178.21
adb_server_ip: 127.0.0.1
adb_server_port: 5037
adbkey: "/config/adbkey"
apps:
"com.netflix.ninja": "Netflix"
"com.nvidia.tegrazone3": "NVIDIA Games"
"com.google.android.tvlauncher": "Launcher"
"com.amazon.amazonvideo.livingroom": "Amazon Prime"
"com.google.android.youtube.tv": "Youtube"
"com.plexapp.android": "Plex"
"com.spotify.tv.android": "Spotify"
"tv.twitch.android.app": "Twitch"
- platform: androidtv
name: FireTV
device_class: firetv
host: 192.168.178.27
adb_server_ip: 127.0.0.1
adb_server_port: 5037
adbkey: "/config/adbkey"
apps:
"com.amazon.tv.launcher": "Launcher"
"com.netflix.ninja": "Netflix"
"com.google.android.youtube.tv": "Youtube"
"com.plexapp.android": "Plex"
turn_on_command: "input keyevent 3"
turn_off_command: "input keyevent 223"
I really have no idea anymore what else to check… any ideas?
Thanks in advance.