@QbaF first of all, close the ports that you opened on your router. Thatâs irrelevant and insecure.
@Amaurgit@paddy0174 I think @QbaFâs issue is that with a tablet, before you can connect via ADB over WiFi, you first have to connect over USB and issue the command adb tcpip 5555 (I think thatâs right). And if you restart the tablet, then youâll need to repeat that step. At least, that was the case for my Kindle Fire tablet when I tried it a year or two ago.
Thanks @JeffLIrion. It looks like we are closer. I connected tablet to PC, get key, made adb tcpip 5555 and it is now connected to 192.168.1.71:5555. Also via WiFi
I did try to connect it as well to RPI (is it needed?), get info about charging but this time no RSA key message provided. Is it ok?
And what next steps? Supplement integration with adb server and start ADB add-on?
It used to be the case that the Python implementation was unreliable for newer devices, making it necessary to use an ADB server (such as the add-on). But I rewrote the backend Python library used for sending ADB commands and itâs been solid for a handful of releases. At least, I havenât heard of any issues with it. The ADB server approach is still supported because
I canât guarantee that the Python ADB implementation is as reliable as using the official ADB binary (running separately and acting as a middleman)
Forcing people to use the Python implementation would be a breaking change
A small percentage of people might already have an ADB server up and running that they use for reasons outside of HA
I just started using the Android TV integration with my Fire TV 4K stick and it works well when it works
I am trying to figure out a problem where my device state goes to Unavailable and logs indicate that the Fire TV canât be connected to. I tried both the built in python adb implementation as well as running an adb server locally. I can still ping the Fire TV so i know itâs online and I can see that the 5555 adb port is open with nmap. I try to manually connect using the adb command line and although it shows as connected, it is not listed in âadb devicesâ.
I suspect that the Fire TV might kill all adb connections after being off for some time. The only way I can get the integration working again, is to toggle the ADB Debugging setting from On to Off in the Fire TV settings. Has anyone faced a similar issue or have a suggestion here?
I have it working with a ugreen Ethernet adapter on a mibox s, I had issues with the mibox going into wifi sleep mode and only staying connected to my 2.4 wifi and Plex was suffering. The only way to get it off the 2.4 was to disable wifi and re-enable and it would connect to the right band again. The Ethernet adapter works but itâs a little finicky, basically with USB debugging enabled the adapter wonât power on you have to go into developer settings and disable USB debugging then Ethernet will connect but before you re-enable USB debugging you have to select the USB configuration and change it from charging to RNDIS (USB Ethernet) after that is selected you can enable USB debugging again and everything will work. This works perfectly until the mibox reboots and then you have to do it again. Itâs not that big of a deal as it doesnât reboot often but it does do it randomly sometimes which I am sure anyone with a mibox has experienced.
Thanks for the reply! Iâll try to see if I can replicate that using your method.
Iâve tried all of the above, but not necessarily in that order. Spose to rain all day tomorrow anyway so maybe I can find some time to play with it.
Let me know how it goes, Iâve tested speed with it and I get a steady 200mbps x 200mbps. Just after I wrote that reply up my Plex was stuttering again even with the Ethernet connected I was only getting 20mbps, I had to reboot and reconfigure but it all worked like a charm after.
Anyone happen to find a way to recognize which Hdmi input a FireTV (Toshiba) is on? It seems that the âwakelock sizeâ etc is the same for all 3 HDMI inputs⌠unless I am missing something
Hi,
replying to the old question, it is possible to use the addon through the ethernet port too,
just need a first connection via wifi for enable the port and to authorize the connection (remember to check the box to authorize permanently) and then in the developer menu âSelect USB Configurationâ and choose RNDIS (USB Ethernet) and thatâs it. Little problem, the box loose this config every time reboot so youâll see the box doesnât have connection (Wifi is off), but it is fast to reconfigure it.
I played around with the settings and got all sources to be shown, but I donât see all apps, for an example netflix and spotify is not shown.
I tried to ad them manually, ie âcom.netflix.ninjaâ, but still it not shown, if I choose an available source and rename them, they are shown with my custom name. Any idea why I donât see all apps?
Hello not sure if this is the right place but I am trying to get my amazon fire tv set up in to home assistant however, I am almost certain I have done everything right but I there is no device appearing.
Please see below for my settings.
That seems to happen from time to time, maybe once a week to once a month if I had to guess. Aside from toggling ADB off and then back on, restarting the device should fix it.
If someone posts a debug log, Iâll take a look. But that might just be the way it is.
Iâm having a few problems with AndroidTV (in my case a TV-Stick from german provider Telekom) for a few months now, but since a few days ago, I have one more error message, that annoys me very much, as it comes up a lot (meaning yesterday within 15 hours around 6000 messages in the logâŚ).
So here we go, I got a few error messages:
This is the ânew oneâ
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 272, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 463, in async_device_update
await self.async_update() # type: ignore
File "/usr/src/homeassistant/homeassistant/components/androidtv/media_player.py", line 357, in _adb_exception_catcher
return await func(self, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/androidtv/media_player.py", line 658, in async_update
) = await self.aftv.update(self._get_sources)
File "/usr/local/lib/python3.8/site-packages/androidtv/androidtv/androidtv_async.py", line 73, in update
screen_on, awake, audio_state, wake_lock_size, current_app, media_session_state, audio_output_device, is_volume_muted, volume, running_apps = await self.get_properties(get_running_apps=get_running_apps, lazy=lazy)
File "/usr/local/lib/python3.8/site-packages/androidtv/androidtv/androidtv_async.py", line 125, in get_properties
output = await self._adb.shell(constants.CMD_ANDROIDTV_PROPERTIES_LAZY_RUNNING_APPS)
File "/usr/local/lib/python3.8/site-packages/androidtv/adb_manager/adb_manager_async.py", line 498, in shell
return await self._adb_device.shell(cmd)
File "/usr/local/lib/python3.8/site-packages/androidtv/adb_manager/adb_manager_async.py", line 43, in shell
return await asyncio.get_running_loop().run_in_executor(None, self._device.shell, cmd)
AttributeError: 'NoneType' object has no attribute 'shell'
These are âold onesâ
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 39, in real_ip_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 882, in get
data, content_type = await player.async_get_media_image()
File "/usr/src/homeassistant/homeassistant/components/androidtv/media_player.py", line 357, in _adb_exception_catcher
return await func(self, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/androidtv/media_player.py", line 500, in async_get_media_image
media_data = await self.aftv.adb_screencap()
File "/usr/local/lib/python3.8/site-packages/androidtv/basetv/basetv_async.py", line 149, in adb_screencap
return await self._adb.screencap()
File "/usr/local/lib/python3.8/site-packages/androidtv/adb_manager/adb_manager_async.py", line 476, in screencap
return await self._adb_device.screencap()
File "/usr/local/lib/python3.8/site-packages/androidtv/adb_manager/adb_manager_async.py", line 39, in screencap
return await asyncio.get_running_loop().run_in_executor(None, self._device.screencap)
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/site-packages/ppadb/command/transport/__init__.py", line 48, in screencap
if result[5] == 0x0d:
IndexError: bytearray index out of range
and
Updating androidtv media_player took longer than the scheduled update interval 0:00:10
and
Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: ERROR: 'FAIL' 0006closed
All things seem to work as expected, beside the possibility to turn on/off the Magenta-TV-Stick. I can circumvent this by turning on/off the TV itself (another AndroidTV-SonyBravia) and CEC does the rest. Correction, since the ânewâ error message I canât control the MagentaTV-Stick in any way, it simply doesnât work (what Iâd have expected after the shell error).
Updating androidtv media_player took longer than the scheduled update interval 0:00:10
I suspect that is due to the fact that you have the screencap option enabled.
Failed to execute an ADB command. ADB connection re-establishing attempt in the next update. Error: ERROR: âFAILâ 0006closed
Iâm not sure about that one, but it could be a bug with pure-python-adb
Just a guess, but the last two issues could be related: the device could be unresponsive, causing the update command to hang forever, causing the next update command to fail. I use the Python ADB implementation, so maybe this doesnât apply, but every few weeks or so my Fire TV stick stops responding to ADB commands sent by HA and I have to restart the Fire TV, after which HA successfully reconnects.