Dear i updated media_player.py basety.py and androidtv.py.
volume change works from androidtv box to HA
but from HA to androidboxtv
if i drag my volume slider to max or min or 3 steps it just make 1(single) step change in androidtv box.
Dear i updated media_player.py basety.py and androidtv.py.
volume change works from androidtv box to HA
but from HA to androidboxtv
if i drag my volume slider to max or min or 3 steps it just make 1(single) step change in androidtv box.
Hereâs my theory.
Letâs say your max volume on your Android TV device is 15, and letâs say that your current volume is 3.
set_volume_level
sends an ADB command to your device like the one above, which will perform a volume up command every second for a total of 6 volume up commands.set_volume_level
command. At the time of the update, the volume has only been bumped once, so HA sees the volume as 0.266667 = 4/15.I think that if you wait for the next update (maybe 10-30 seconds) and donât do anything, the volume will then show as 0.6 = 9/15, as desired.
Can you check whether this theory is right. Of course, the actual numbers will depend on what your deviceâs max volume is. But if you wait and the volume in HA does get updated to what you expect, then that confirms my theory.
I tried,
waited for 30 to 40 secs,
But it changed single step.
If I change volume from min to max or any value in android tv box, it does reflect volume in HA,
But didnât worked from HA to Androidtv box, moves only single step and not in multiple of steps.
Iâm pretty much stumped. You could try:
settings get system volume_music
Note the output in the HA log. Then:
settings put system volume_music 10
Or some other number.
Sources:
How exactly do you do this on Hass.io? Is it not a core component and therefore updatable with a new hass.io version?
Download the contents of this androidtv folder and put them in /config/custom_components/androidtv
.
But you can also help by testing out the ADB commands in my previous post using the androidtv.adb_command
service.
Updated to hassio 91.0.
I have removed the custom component androidtv. Running Android Debug Bridge - Home Assistant
Getting this error message.
Unable to install package androidtv==0.0.14: Failed building wheel for pycryptodome python-jose-cryptodome 1.3.2 has requirement pycryptodome<3.4.0,>=3.3.1, but youâll have pycryptodome 3.8.1 which is incompatible. pyrebase4 4.3.0 has requirement oauth2client==4.1.2, but youâll have oauth2client 4.0.0 which is incompatible. broadlink 0.9 has requirement pycryptodome==3.4.11, but youâll have pycryptodome 3.8.1 which is incompatible. Command â/usr/local/bin/python3 -u -c âimport setuptools, tokenize;file=â/tmp/pip-install-y5t2jq0m/pycryptodome/setup.pyâ;f=getattr(tokenize, âopenâ, open)(file);code=f.read().replace(â\r\nâ, â\nâ);f.close();exec(compile(code, file, âexecâ))â install --record /tmp/pip-record-cqqy5d69/install-record.txt --single-version-externally-managed --prefix --compile --user --prefix=â failed with error code 1 in /tmp/pip-install-y5t2jq0m/pycryptodome/
Iâll fix this.
Same error after updating to 0.91
same error, can we get around this by using it as a custom component again until itâs fixed?
Dear, someone here guide me.
I would like to turn on my androidtv box with broadlink.
How to add custom command in turn on command provided in new config.
Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck
Not sure when it stopped to work, but does anyone have a woking intent for twitch?
My latest one dont seem to work anymore, all the other ones i have (youtube, kodi and so on) works still.
{"entity_id" :"media_player.shield", "command": "am start -a android.intent.action.VIEW -d -n tv.twitch.android.app/tv.twitch.android.apps.TVLandingActivity"}
It might be since there was an update of twitch to the new GUI on the shield?
I use an app called STBEmu and it has these colored coded buttons that some Android Boxes have on their remote: Yellow, Green, Blue and Red
Anyone knows the codes for these? Tried the following but it doesnât workâŚ
- type: horizontal-stack
cards:
- type: custom:card-modder
card:
type: entity-button
icon: mdi:disk
name: "BLUE"
entity: media_player.shield
hold_action: none
tap_action:
action: call-service
service: androidtv.adb_command
service_data:
entity_id: media_player.shield
command: "PROG_BLUE"
style:
background-color: rgba(56,60,69,1)
border-radius: 20px
border: solid 3px rgba(118,185,0,1)
box-shadow: 3px 3px rgba(0,0,0,0.4)
- type: custom:card-modder
card:
type: entity-button
icon: mdi:disk
name: "GREEN"
entity: media_player.shield
hold_action: none
tap_action:
action: call-service
service: androidtv.adb_command
service_data:
entity_id: media_player.shield
command: "PROG_GREEN"
style:
background-color: rgba(56,60,69,1)
border-radius: 20px
border: solid 3px rgba(118,185,0,1)
box-shadow: 3px 3px rgba(0,0,0,0.4)
- type: custom:card-modder
card:
type: entity-button
icon: mdi:disk
name: "RED"
entity: media_player.shield
hold_action: none
tap_action:
action: call-service
service: androidtv.adb_command
service_data:
entity_id: media_player.shield
command: "PROG_RED"
style:
background-color: rgba(56,60,69,1)
border-radius: 20px
border: solid 3px rgba(118,185,0,1)
box-shadow: 3px 3px rgba(0,0,0,0.4)
- type: custom:card-modder
card:
type: entity-button
icon: mdi:disk
name: "YELLOW"
entity: media_player.shield
hold_action: none
tap_action:
action: call-service
service: androidtv.adb_command
service_data:
entity_id: media_player.shield
command: "PROG_YELLOW"
style:
background-color: rgba(56,60,69,1)
border-radius: 20px
border: solid 3px rgba(118,185,0,1)
box-shadow: 3px 3px rgba(0,0,0,0.4)
I think that because it is an emulation app, you have to map these buttons within the application (settings->configure key maps->BTN_RED to long press 1 etcâŚ) and then use the mapped button for the command
https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_PROG_BLUE
Try using either of the following as the command for blue:
'KEYCODE_PROG_BLUE'
'input keyevent 186'
This is a general maintenance release that upgrades both ADB & the base image used.
Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck
Hi there,
I had adb addon worked but after upgrade to newest HA and Newest ADB addon, it stopped work.
I have error HA log:
Could not connect to NVIDIA TV at 192.168.0.230:5555 using ADB server at 192.168.0.250:5037
Platform androidtv not ready yet. Retrying in 150 seconds.
And on ADB addon there are constantly that messages:
[12:41:12] INFO: Starting the Android Debug Bridge server...
adb I 05-08 12:41:12 4832 4832 adb_auth_host.cpp:416] adb_auth_init...
adb I 05-08 12:41:12 4832 4832 adb_auth_host.cpp:174] read_key_file '/root/.android/adbkey'...
adb I 05-08 12:41:12 4832 4832 adb_auth_host.cpp:391] adb_auth_inotify_init...
[12:51:11] INFO: Connecting to device: 192.168.0.230...
connected to 192.168.0.230:5555
adb I 05-08 12:51:11 4832 4832 adb_auth_host.cpp:467] Calling send_auth_response
[12:51:13] INFO: Starting the Android Debug Bridge server...
adb I 05-08 12:51:13 4872 4872 adb_auth_host.cpp:416] adb_auth_init...
adb I 05-08 12:51:13 4872 4872 adb_auth_host.cpp:174] read_key_file '/root/.android/adbkey'...
adb I 05-08 12:51:13 4872 4872 adb_auth_host.cpp:391] adb_auth_inotify_initâŚ
My config is very simple:
{
"devices": [
"192.168.0.230"
],
"reconnect_timeout": 600
}
What went wrong?
That worked thanks!