Ive been trying to get this to work.
I had to get a new SD card for my pi, and I figured I would do this from scratch- knowing that it is possible to throw on one of my snapshots. That said, I set up the ADB on HA, I included the IPs for the 2 Shields I wanted to use, on one ( the most pressing one) I accepted the connection on the Shield, and of course put them in my config.
Any help, or advice would be helpful. THANK YOU.
The configuration. yaml looks like:
Copy to clipboard
media_player:
- platform: androidtv
host: 192.168.86.57
name: "Second NVidia Shield"
adb_server_ip: 127.0.0.1
adb_server_port: 5037
- platform: androidtv
host: 192.168.86.56
name: "Livingroom NVidia Shield"
adb_server_ip: 127.0.0.1
adb_server_port: 5037
The Config in the add-on ADB looks like:
Copy to clipboard
devices:
- 192.168.8x.5x
- 192.168.8x.5x
reconnect_timeout: 90
The log for the ADB, insists that it is connected to the devices:
Copy to clipboard
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] adb.sh: executing...
[cont-init.d] adb.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[22:41:13] INFO: Starting the Android Debug Bridge server...
[22:41:14] INFO: Connecting to device: 192.168.86.57...
connected to 192.168.86.57:5555
[22:41:14] INFO: Connecting to device: 192.168.86.56...
connected to 192.168.86.56:5555
[22:42:44] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:42:44] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:44:15] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:44:15] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:45:45] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:45:45] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:47:16] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:47:16] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:48:46] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:48:46] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:50:17] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:50:17] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:51:47] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:51:47] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:53:17] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:53:18] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:54:48] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:54:50] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:56:21] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:56:21] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
[22:57:51] INFO: Connecting to device: 192.168.86.57...
already connected to 192.168.86.57:5555
[22:57:53] INFO: Connecting to device: 192.168.86.56...
already connected to 192.168.86.56:5555
And these are the errors I get:
Copy to clipboard
Log Details (WARNING)
Logger: homeassistant.components.media_player
Source: helpers/entity_platform.py:202
Integration: Media player (documentation, issues)
First occurred: 10:42:44 PM (6 occurrences)
Last logged: 10:52:50 PM
Platform androidtv not ready yet. Retrying in 60 seconds.
Platform androidtv not ready yet. Retrying in 90 seconds.
Platform androidtv not ready yet. Retrying in 120 seconds.
Platform androidtv not ready yet. Retrying in 150 seconds.
Platform androidtv not ready yet. Retrying in 180 seconds.
Copy to clipboard
Log Details (ERROR)
Logger: androidtv.adb_manager
Source: components/androidtv/media_player.py:218
First occurred: 10:42:13 PM (7 occurrences)
Last logged: 10:52:50 PM
ADB device is unavailable; encountered an error when searching for device.
Copy to clipboard
Log Details (ERROR)
Logger: homeassistant.components.media_player
Source: components/androidtv/media_player.py:215
Integration: Media player (documentation, issues)
First occurred: 10:42:13 PM (1 occurrences)
Last logged: 10:42:13 PM
Error while setting up androidtv platform for media_player
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/components/androidtv/media_player.py", line 215, in setup_platform
state_detection_rules=config[CONF_STATE_DETECTION_RULES],
File "/usr/local/lib/python3.7/site-packages/androidtv/__init__.py", line 52, in setup
aftv = BaseTV(host, port, adbkey, adb_server_ip, adb_server_port, state_detection_rules, auth_timeout_s)
File "/usr/local/lib/python3.7/site-packages/androidtv/basetv.py", line 100, in __init__
self.device_properties = self.get_device_properties()
File "/usr/local/lib/python3.7/site-packages/androidtv/basetv.py", line 206, in get_device_properties
constants.CMD_MAC_ETH0)
File "/usr/local/lib/python3.7/site-packages/androidtv/adb_manager.py", line 435, in shell
return self._adb_device.shell(cmd)