Little update : 127.0.0.1 works just fine !
How do I suppress this in my log?
08-01-2019:14:18:50,270 DEBUG [connection.py:24] Connect to adb server - 10.0.0.8:5037
08-01-2019:14:18:50,270 DEBUG [connection.py:75] b'0027host-serial:10.0.0.24:5555:get-serialno'
08-01-2019:14:18:50,271 DEBUG [connection.py:47] Connection closed...
08-01-2019:14:18:50,272 DEBUG [connection.py:24] Connect to adb server - 10.0.0.8:5037
08-01-2019:14:18:50,272 DEBUG [connection.py:24] Connect to adb server - 10.0.0.8:5037
08-01-2019:14:18:50,273 DEBUG [connection.py:75] b'0027host-serial:10.0.0.23:5555:get-serialno'
08-01-2019:14:18:50,273 DEBUG [connection.py:47] Connection closed...
08-01-2019:14:18:50,274 DEBUG [connection.py:24] Connect to adb server - 10.0.0.8:5037
08-01-2019:14:18:50,274 DEBUG [connection.py:24] Connect to adb server - 10.0.0.8:5037
08-01-2019:14:18:50,275 DEBUG [connection.py:75] b'001Dhost:transport:10.0.0.23:5555'
08-01-2019:14:18:50,276 DEBUG [connection.py:75] b'002Ashell:dumpsys power | grep "Display Power"'
08-01-2019:14:18:50,571 DEBUG [connection.py:47] Connection closed...
Cool, how does one do this? Running hassio ion a rpi3 at the moment!
Step-by-step
- Install the âPortainerâ add-on from the âCommunity Hass.io Add-Onsâ.
- Configure and start the add-on.
- Open Portainer (http://ip-of-hassio:9000) and add a new container with the settings like my sreenshot :
- Press âDeploy the containerâ to create the container. This may take a while so wait for the process to complete.
- When the deploy is ready connect to the shell of the new container, see screenshots :
-
When connected to the console enter the following commands :
apt-get update apt-get install android-tools-adb adb -a nodaemon server & adb connect _ip-of-androidtv_
After entering the adb connect command you should get a popup on your androidtv to trust the connection.
-
You now should be able to use the component with the following settings in your configuration.yaml :
- platform: androidtv host: ip-of-androidtv name: AndroidTV adb_server_ip: 127.0.0.1
I didnât test what happens when you restart the container. To make this fool proof you can add a startup script to the raspbian installation to start the adb server.
Thanks for your awesome instructions!
I think adding a crontab to connect to the device on restart, and also keep connecting to it, like every 10min would make a great Hass.io addons.
Following what @hvdheurik did, I think this ADB server addon works now. Please test it and let me know! https://github.com/JeffLIrion/hassio-adb-server-addon
First of all, love the idea of the add-on ! Makes it much easier to install. After starting the add-on the following error appaers in the log and the add-on stops :
/run.sh: line 9: 10 Segmentation fault (core dumped) adb -a nodaemon server
Thatâs odd, I definitely didnât get that error. Did you stop your other container?
Hi @JeffLIrion, this add-on is a great idea!!
I installed the add-on, but I receive the same error:
/run.sh: line 9: 10 Segmentation fault (core dumped) adb -a nodaemon server
Iâm running hassio on a Intel NUC
@hvdheurik and @matisaul, I replaced adb -a nodaemon server
with adb start-server
. I uninstalled and then reinstalled the addon, but now it wonât start for me. Iâm not sure what the problem is
Yes, i stopped my container but maybe it has something to do with the port (5037) being in use.
Same problem here how to suppress this log spamming? Thanks
my config:
-
Home assistant manual installation on debian in a virtual env
-
in configuration.yaml:
logger:
default: warn
So whars the status on this. Does it work ie should one test or is it not working at all currently?
I need help getting it to work. If you think you could fix it, then please give it a shot!
sorry ⌠whatâs the syntax to open an applicatio?n (for example, Kodi, Netflix, Plex âŚ)
{ âentity_idâ :âmedia_player.mibox3â, âintentâ: âxxxxxxxxâ }
If I had the knowhow I would! I appreciate your effort, hopefully it will get solved.
Hass.io ADB server addon (https://github.com/JeffLIrion/hassio-adb-server-addon ) failed to install with the following error
ERROR (SyncWorker_17) [hassio.docker.addon] Canât build a77d3ee3/amd64-addon-adb_server:0.1: The command â/bin/sh -c apt-get update && apt-get install -y jq android-tools-adbâ returned a non-zero code: 100
Yeah, it doesnât workâŚ
My next idea is to build from the hassioaddons/ubuntu-base-*
images, using the aircast addon as a template.
So I managed to get this working somewhat to my surprise!
My setup is running Hass.io in a VM that sits on unRAID. My Docker understanding is pretty limited to unRAID where i have a number of containers running.
I deployed the Docker container sorccu/adb to unRAID with the following settings
Network Type: Host
Privileged: Yes
Container Port: 5037
Container Path: /opt/platform-tools
I then extracted the latest platform-tools into the local path that was mapped to /opt/platform-tools, In my limited experience i had assumed the docker image would create these files, but aside from a small permissions change it seamed to work fine me manually supplying the platform-tools files.
I added the following to my media_player.yaml, pointing adb_server_ip to my unRAID servers IP
- platform: androidtv
host: 10.5.5.243
name: MiBox3
adb_server_ip: 10.5.5.10
and finally enabled USB / WiFi debugging on the Mi Box (had to connect it to USB before running adb tcpip 5555
)
Will report back after using the addon for a while.
Thatâs what I am doing. But you will find that after some amount of sleep, the ADB connection drops and then this component breaks. I created a cron job to execute adb connect every few minutes to force it to reconnect when the Mi Box wakes up again.