Home Assistant Community Add-on: ADB - Android Debug Bridge

There is no intent parameter. See here for examples:

https://gist.github.com/mcfrojd/9e6875e1db5c089b1e3ddeb7dba0f304

I’m using your branch to connect to two Shields using Python ADB. So far the connection is stable and basic commands work. I’m not at home so I can’t do too much testing, but I’ll update if I find problems.

Thanks!

I think a good stress test would be to send the “BACK” command repeatedly from the services tab (say, 10+ times in rapid succession):

{"entity_id": "media_player.YOUR_ANDROID_TV", "command": "BACK"}

If the media player doesn’t become unavailable (check the log for error messages), then the connection is solid!

Done, the only thing I saw in logs was

Data_length 3787 does not match actual number of bytes read: 2872
Data_length 4096 does not match actual number of bytes read: 1424

Not sure how well it worked since I’m not at home to monitor, but that seemed to be okay.

Jeff thanks for the reply. Can you tell me where i am supposed to actually add these intents? I mean do I create a script and run that or do I need to add a special configuration file somewhere? I tried the call service and pasted that into the relevant entity but it just wouldn’t show me anything.

Sorry for the basic question.

deleted: Misplaced release notes


I think this is in the wrong subject?

addon unifi in adb debugging

I fixed my issue. Thanks for the assistance.

Oops, thanks!

1 Like

Hi guys, first of all I wanna thank you frenck for this fantastic addon! :slight_smile:

I’m using it on my Toshiba amazon fire tv edition, it’s a bit confusing still because technicly it’s based (like a normal fire tv stick) on android but when use some keys for androidtv not all are working. the thing I really wanna find out is how to get some app working, I can open netflix and other apps with no issues but I can’t go straight to the playng part of the video, For example I wanna start the news with my script alarm for the morning but when it turns on the tv doesn’t strart to play, if I do it from the fire tv remote app goes straight on to the streaming,what it can be? I tired to get the status of tv while is playing the news but If I copy and paste the whole string “com.corus.fire.amazon.amazonfirewrapper/com.corus.fire.amazon.amazonfirewrapper.ui.MediaPlayerActivity}” is not giving me the the JSON error but if I call the service doen’t work.
Hope somebody of you guys knows a fix, thank you!

Hi, I’m new to home assistant.
I’m trying to use this addon to control my nvidia shield but it’s not working

config:

{
“devices”: [
“192.168.1.25”
],
“reconnect_timeout”: 90,
“log_level”: “info”,
“keys_path”: “/config/androidkeys”
}

configuration.yaml

platform: androidtv
name: NVIDIA
device_class: androidtv
host: 192.168.1.25
adb_server_ip: 127.0.0.1

addon log:

Add-on version: 0.4.1
You are running the latest version of this add-on.
System: HassOS 2.12 (armv7 / raspberrypi3)
Home Assistant version: 0.94.2
Supervisor version: 166
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing

Log level is set to INFO
[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.
[10:37:49] INFO: Starting the Android Debug Bridge server

[10:37:49] INFO: Connecting to device: 192.168.1.25

connected to 192.168.1.25:5555
[10:39:20] INFO: Connecting to device: 192.168.1.25

already connected to 192.168.1.25:5555
[10:40:50] INFO: Connecting to device: 192.168.1.25

already connected to 192.168.1.25:5555

home assistant log:

2019-06-13 08:30:50 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.androidtv
2019-06-13 08:30:50 WARNING (SyncWorker_3) [homeassistant.components.androidtv.media_player] Could not connect to NVIDIA at 192.168.1.25:5555 using ADB server at 127.0.0.1:5037
2019-06-13 08:30:50 WARNING (MainThread) [homeassistant.components.media_player] Platform androidtv not ready yet. Retrying in 60 seconds.
2019-06-13 08:31:51 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.androidtv
2019-06-13 08:31:51 WARNING (SyncWorker_3) [homeassistant.components.androidtv.media_player] Could not connect to NVIDIA at 192.168.1.25:5555 using ADB server at 127.0.0.1:5037
2019-06-13 08:31:51 WARNING (MainThread) [homeassistant.components.media_player] Platform androidtv not ready yet. Retrying in 90 seconds.
2019-06-13 08:33:22 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.androidtv
2019-06-13 08:33:22 WARNING (SyncWorker_13) [homeassistant.components.androidtv.media_player] Could not connect to NVIDIA at 192.168.1.25:5555 using ADB server at 127.0.0.1:5037
2019-06-13 08:33:22 WARNING (MainThread) [homeassistant.components.media_player] Platform androidtv not ready yet. Retrying in 120 seconds.

can you please help me? :slight_smile:

:tada: Release v0.5.0

Full Changelog

This is a general maintenance release.

:hammer: Changes

  • :books: Removed outdated info regarding intents (#14)
  • :arrow_up: Upgrades add-on base image to v3.1.3
  • :pencil2: Maintaince -> Maintenance
  • :sparkles: Adds FUNDING.yml
  • :shirt: Fixes Markdownlint warnings

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

Could you elaborate on this a bit. I have been trying to get this function to work for some time now


Command I use:


{

"entity_id":"media_player.shield_tv",

"command":"plex://IAmAServerID/movie//library/metadata/movieID"

}

If this is the url I get when playing the video through a web browser:


https://app.plex.tv/desktop#!/server/abcdefghijklmnopqrstuvwxyz0123456789ABCD/details?key=%2Flibrary%2Fmetadata%2F3742

Is the abcdefghijklmnopqrstuvwxyz0123456789ABCD the server and F3742 the movieID?

so the call would look like:


{

"entity_id":"media_player.shield_tv",

"command":"plex://abcdefghijklmnopqrstuvwxyz0123456789ABCD/movie//library/metadata/F3742"

}

Or is that incorrect?

I also tried sending with “intent” instead of command, but it seems that “intent” is no longer supported?

You are right for the server.
the metadata is only the 4 figures after the F.

But unfortunately, it seems to not be working anymore.

below is what i was using but now plex is only throwing a crash report

{
"entity_id": "media_player.shield",

"command": "am start -a android.intent.action.VIEW -d plex://abcdefghijklmnopqrstuvwxyz0123456789ABCD/movie//library/metadata/3742"
}

Do you think this is a Plex issue or an ADB issue?

Hi could someone please help
I’ve been using the add on for months without issue yet since I rebooted this evening I’m seeing the following error message


2019-06-25 22:37:01 ERROR (SyncWorker_14) [root] ADB device is unavailable; encountered an error when searching for device.
2019-06-25 22:37:01 WARNING (SyncWorker_14) [homeassistant.components.androidtv.media_player] Could not connect to NVidia Shield at 192.168.1.184:5555 using ADB server at 127.0.0.1:5037
2019-06-25 22:37:01 ERROR (SyncWorker_14) [root] ADB device is unavailable; encountered an error when searching for device.
2019-06-25 22:37:01 WARNING (SyncWorker_14) [homeassistant.components.androidtv.media_player] Could not connect to NVidia Shield at 192.168.1.184:5555 using ADB server at 127.0.0.1:5037
2019-06-25 22:37:01 ERROR (SyncWorker_14) [root] ADB device is unavailable; encountered an error when searching for device.
2019-06-25 22:37:01 WARNING (SyncWorker_14) [homeassistant.components.androidtv.media_player] Could not connect to NVidia Shield at 192.168.1.184:5555 using ADB server at 127.0.0.1:5037

I’m running the latest 5.0 update and it states is connected

How do I get all my apps on android TV ?(miobox 3)

Hi i have a issue with this , the addon connect to my tvbox ,and say connected on log but the media player component on HA , say unavailible , after many reboots when TV Is on , and restarting also ha and the addon , i can see the media player component, but as soon reboot the HA the media player back to unavailible

I don’t know why my device looped as image, after restar the hassio addon, but when is looping , i don’t see any error or issue on logs