That should be fixed now.
where are the files?
which file?
is it merged in patch-17
its working now and also vice versa,
from androidtv box to HA and HA to androidtv box
thanks
dear one small problem without any error
when i reduce or increase volume form HA to Andoidbox my device on HA shows me off and than comes back as it was.
dont know what might be the error as no error in log
Does it change to off or unavailable?
I donât know what could be causing that error. But when it comes back on, has the volume been successfully changed?
Yes, that does works
I reproduced the bug that you mentioned. It seems like thereâs a bug or hidden feature in Android where sending volume up/down commands in rapid succession causes it to do a quick power cycle.
I implemented a different approach. Let me know if it works. Youâll need to
- Update the media_player.py file
- Update the androidtv package (all files) from the next-version branch
no it doesnt work,
i does reflect the change from AndroidBox to HA
but doenst change when changed in HA
Try this command via the androidtv.adb_command
service (update youâre entity_id):
{
"entity_id": "media_player.fire_tv_living_room",
"command": "input keyevent 24; input keyevent 24; input keyevent 24; input keyevent 24; input keyevent 24; input keyevent 24; input keyevent 24; input keyevent 24; input keyevent 24; input keyevent 24; input keyevent 24"
}
Let me know if
- It bumps the volume up a bunch and
- It doesnât power cycle your device.
It turn off and on when using your code provided.
Ok, next attempt, same deal as before:
{
"entity_id": "media_player.fire_tv_living_room", "command":"(input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24 && sleep 1 && input keyevent 24) &"
}
Thanks for your help with testing this!
after clicking on it for so many times it does restart itself in UI
and it does reflect from Androidtv box to HA,
but doesnt reflect when changing in HA
And for testing, if your work is coding for helping community, itâs my duty to test it, if I want to use it.
actually your are putting more time than me,
So a big thanks to you.
I thought it would be easier to test this via the android.adb_command
service rather than constantly updating the package and component. So if sliding the volume for the media_player in the Home Assistant UI didnât do anything before, then it still wonât do anything, but thatâs not what that command was testing.
Are you saying that command doesnât result in the volume being bumped up a bunch?
Are you saying that if you send that command repeatedly, the device restarts? But if you just click it once or twice, it doesnât?
This addon seems to work well and I am able to control my Shield without buying any new hardware. So very happy so far. I am not sure about the reconnect every 90 seconds though. This seems to generate a ton of log messages saying âalready connected to 192.168.x.xx:5555â that appear regardless of the log level setting. Since Iâm running on a Pi SD card, disk IO is something I feel I should watch. Perhaps an enhancement to suppress this message or maybe an option to connect when needed instead of keeping the connection open?
Correct, it is to ensure if you device restarts or turned, regains network access or power is picked up quick enough.
Those messages are not written to disk/sd.
You canât tell, unfortunately. And in case of a restart of the shield, it doesnât report back itself with âHey Iâm back!â.
This is all based around a Debug tool for Android Application development. Which assumes it has a developer in control of the buttons.
Command had done its work by changing volume value, on my screen.
But , when I click 5-6 times testing command, it restart.
It doesnât restarted when I click for one or two times,
And due to that I was testing volume slider from my HA, which resulted in not changing volume level.
Dear, today i tried many attempts for clicking after updating available files from next-version branch.
and i dont see any restart.
now only thing left is to change volume when changed on HA
I just updated the androidtv
package and the HA component. As before, youâll need to update:
- The Home Assistant component: media_player.py
- The
androidtv
package, specifically androidtv.py
Let me know how this works. I think this might be the best that we can do.
@JeffLIrion
when i check next-release the file updated is basetv.py and your post shows me to update androidtv.py
what should i go for?