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

Hi We’re you able to get it working

I’m wanting to update but worried it’ll break my shield connection

So it did eventually work. I followed the instructions above and for some reason it kept giving me errors. I ended up restarting a couple times and clearing the cache without any luck. It eventually just started working again without me doing anything in particular. Not sure why.

1 Like

I’ve the androidtv component set up for my firetv (as androidtv/media_player.py) and it’s getting loaded and such with no errors in the logs.
Problem is though, my firetv shows up as off at all times. Restarting the ADB server does nothing bar cause the media player to show as unknown until I try turning it on, then it just shows as off again.
Wanted to use this component as it said it should work for firetv and showed better info in sources than the firetv component.

Any one else get this working with a firetv on 0.88?

:tada: Release v0.2.0

Full Changelog

Changed

  • Adds link to list with intents (#4)
  • Bump androidtv to 0.0.7; make HA imports backwards compatible (#5)
  • Upgrades add-on base image to 2.3.1
  • Updates AndroidTV HA component to support HA 0.88+

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

4 Likes

could someone please help me get a youtube intent to work

a redditor came up with away to capture the latest youtube video from a channel

- platform: scrape
  resource: 'https://www.youtube.com/feeds/videos.xml?channel_id=UCNvzD7Z-g64bPXxGzaQaa4g'
  name: yt_gameranx
  select: yt\:videoid

i set up a script to play the video on my shield using media extrator

youtubegameranx:
   alias: Gameranx
   sequence:
   - service: media_extractor.play_media
     entity_id: media_player.shield
     data_template:
      media_content_id: "https://www.youtube.com/watch?v={{ states('sensor.yt_gameranx') }}"
      media_content_type: video/youtube

my issue is the quality it cast is really poor, so that lead me to this app

if i use the following it loads the video

aaaaa:
   alias: aaaaa
   sequence:
   - service: media_player.androidtv_intent
     data:
      entity_id: media_player.nvidia_shield
      intent: "https://www.youtube.com/watch?v=tkN3E9QgMnk"

yet the below doesn’t

aaaaa:
   alias: aaaaa
   sequence:
   - service: media_player.androidtv_intent
     data:
      entity_id: media_player.nvidia_shield
      intent:"https://www.youtube.com/watch?v={{ states('sensor.yt_gameranx') }}"`

can someone please help me out

I’m having some trouble installing this through the Hass.io add-on store on my aarch64 device:

19-02-27 20:02:33 INFO (SyncWorker_18) [hassio.docker.interface] Pull image hassioaddons/adb tag 0.2.0.
19-02-27 20:02:34 ERROR (SyncWorker_18) [hassio.docker.interface] Can't install hassioaddons/adb:0.2.0 -> 404 Client Error: Not Found ("no such image: hassioaddons/adb:0.2.0: No such image: hassioaddons/adb:0.2.0").

Replace data: with data_template:

data_template:
      entity_id: media_player.nvidia_shield
      intent:"https://www.youtube.com/watch?v={{ states('sensor.yt_gameranx') }}"
1 Like

im a muppet i didn’t notice data and data_template

many thanks

Hi,

A couple of days ago, I updated to HA 0.88.2 and then updated ADB Hass.io addon as well as the custom_component(grabbed the latest version on github and moved it to the right place according to the new folder structure introduced in HA 0.88). Basically, I’m up to date everywhere.

Now, the media_player entity in HA for it isn’t created at all.

In HA’s log, I always get the two following lines:

2019-03-05 23:20:41 INFO (MainThread) [homeassistant.components.media_player] Setting up media_player.androidtv
2019-03-05 23:21:41 ERROR (MainThread) [homeassistant.components.media_player] Setup of platform androidtv is taking longer than 60 seconds. Startup will proceed without waiting any longer.

No matter how many times I restart HA, or the addon, or both.

 

I did not change the media_player entity entry in configuration.yaml since I updated to 0.88 but I don’t think any change was required for that part.

- platform: androidtv
  host: !secret shield_ip_addr
  name: nvidia_shield
  adb_server_ip: 127.0.0.1
  adb_server_port: 5037

Basically, it was working on HA before 0.88 and now it isn’t.

ADB addon reports connecting to the Android device so that part is working at least.

I tried removing the pycache folder in the custom_component folder but other than that and restarting HA over and over, I don’t know what to do to fix this.

I would like to set automations depending on what app is playing, i know that there is a senser that generally does that for other media player, but androidtv doen’t use “source” for its states. is there antway to configure the code i have here to make it work?

  • platform: template
    sensors:
    playstation_4_source:
    value_template: ‘{{ states.media_player.playstation_4.attributes[“source”] }}’
    friendly_name: ‘Playstation 4 Source’

Hi Guys, can anyone help me, I am completely new comer to Hassio
I have installed this addon and it seem to connect fine to my Zidoo an Android (7.1) based player, I can control the player with the play button i.e. play/pause, but for some reason the status never changes from idle.
I am using Hassio installed on raspbian on a raspberry pi 3 B+

Anyone have any ideas for me to try, think I am just going round in circles.
What I am trying to achieve is get the play/ pause/stop status to control the lights

Thanks

Just has a side note
Debug mode is active on the player, usb debug is enabled , but can’t find the network debug

Wait for next release, new android component is coming

1 Like

It is not the issue of ADB add-on but the component itself. The upcoming realise will unlikely solve the issue with incorrect state (idle). Hopefully, the android component will continue to to develop by the community after the official realise and the logic how to identify state will be improved.

1 Like

It’s already done,
Wait until next release

1 Like

Done what? What I can see in the code, the logic is still the same or could you, please, provide a link with the update that I might not aware?

Dear wait for few days,
Your waiting will lead to an excellent component.
Which is already in Dev branch of homeassistant

thank you, dear. I’ve seen what is in the dev branch, nothing new re the state logic so far.

Did u tried this,

The library used there androidtv==0.0.10 doesn’t have an updated logic. Unfortunately, it detects incorrectly state as idle for some android devices.

I have mini m8s2 and it does detects my device,
I have a problem.
Some times it doesn’t detects poweroff states.