home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.81k stars 30.07k forks source link

TCL Android TV/Google TV Remote problem #113736

Closed litecross91 closed 4 months ago

litecross91 commented 6 months ago

The problem

Android TV Remote is not responding to "TV", "MENU", "INFO", "GUIDE", "CHANNEL_UP", "CHANNEL_DOWN" commands (remote.send_command) on TCL 65C805 / Android 12 / Model: Smart TV Pro.

What version of Home Assistant Core has the issue?

2024.3.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 6 months ago

Hey there @tronikos, @drafteed, mind taking a look at this issue as it has been labeled with an integration (androidtv_remote) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `androidtv_remote` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign androidtv_remote` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


androidtv_remote documentation androidtv_remote source (message by IssueLinks)

Drafteed commented 6 months ago

The remote control commands that your device can recognize depend on the model and manufacturer of your device.

Maybe some Android utilities for reassigning buttons (e.g. Button Remapper) will help you. You can try remapping the buttons recognized by your device to the ones you need.

You can also try sending other commands from the list: https://github.com/tronikos/androidtvremote2/blob/e54e33772e61e4ccb24b0c5ba6e0f2ad3efb2547/src/androidtvremote2/remotemessage.proto#L90-L832

litecross91 commented 6 months ago

I tried the Button Mapper from Play store. It works on some buttons on the physical remote control. But I don't know why this helps me in Home Assistant? I have it set up so that if I long press the BACK button on the remote, the TV comes on. But in Home Assistant it's still just BACK button with basic functions... I can see in Button Mapper what the Android name of the physical button is, e.g. TV_INPUT. When I type it in Home Assistant, it still does not respond to this command.

litecross91 commented 6 months ago

How can I implent two remote.send_command in one? If one hold the other one isn't? I want it to switch to the TV first (hold DEL) and then just type 76. They work separately, but I want them to work together.

  tv:
    service: remote.send_command
    target:
      entity_id: remote.tcl
    data:
      hold_secs: 1
      command: DEL
  mtv:
    icon: mtv
    service: remote.send_command
    target:
      entity_id: remote.tcl
    data:
      command:
        - '7'
        - '6'
hermanho commented 5 months ago

I had the same problem. It had the detail error message in the Home Assistant Core logging. After I clear the data, cache and re-authenicate, it works.

[datetime] ERROR (MainThread) [androidtvremote2] Device doesn't support sending keys. Try clearing the storage of the Android TV Remove Service system app. On the Android TV device, go to Settings > Apps > See all apps > Show system apps. Then, select Android TV Remote Service > Storage > Clear data/storage.

aholzel commented 5 months ago

I have the same issue with the same command, they just don't do anything. I have a 4k TV Box with android TV version 12. I tried clearing the cache of the remote service app but that doesn't resolve the problem.

I installed the buttom mapper app to see if that registers the command but it doesn't. If I try something like "BUTTON_A" it does register, any of the listed buttons just closes the popup and doesn't register the button.

tronikos commented 4 months ago

@litecross91 you cannot combine these 2 remote.send_command calls because one is using hold_secs while the other one isn't. But you can create a script.

Regarding the original issue, as Drafteed said, not all devices support all commands.

tronikos commented 4 months ago

@home-assistant close