unfoldedcircle / feature-and-bug-tracker

Feature and bug tracker repository for Unfolded Circle products
22 stars 0 forks source link

[bug] Physical buttons not always working (not hardware related) #237

Closed uvjim closed 5 months ago

uvjim commented 6 months ago

Is there an existing issue for this?

Description

Originally reported here: https://unfolded.community/t/physical-buttons/1012

I’m creating an integration to control my Virgin Media TiVo. However, when I assign a media player action to a physical button it doesn’t work - no event is seen by the integration. However, if I add the same action to a soft button on the touch screen it works fine.

I have tried restarting the activity just in case that was a problem, but that doesn’t seem to be the case.

I have mapped an action from the Android TV integration to a physical button, and that works.

Is there anything special that I need to do in my integration to allow physical buttons to be used?

I may have narrowed this down a little more. If I create a button entity in my integration and map that to a physical button - it works.

Any action from a media player entity from my integration does not seem to work when mapped to a physical button, but does when it is mapped to a button on the touch screen.

I'm not sure if this might be related to the following: -

How to Reproduce

Using a custom integration the provides a media player...

  1. Add the media player to an activity
  2. Map a physical button to an action from the media player
  3. Stop the activity on the remote (if it was started)
  4. Start the activity on the remote

Expected behavior

Physical buttons to work with the media player entity from the custom integration.

System version

1.5.2

What part of the system affected by the problem?

No response

Additional context

No response

zehnm commented 6 months ago

I can't reproduce this and retested it with creating a new activity, adding a media-player and physical button mappings:

image

However, in 1.5.2 there's currently a UI bug where the physical buttons can be blocked after stopping an activity. If this happens, then UI navigation like up / down and switching profile pages with left / right also don't work anymore.

@uvjim please check if you are affected of the "button block" after stopping an activity. If that's not the case I need more information on how to reproduce your issue:

uvjim commented 6 months ago

I don't think this is a symptom of the button block because, as I mentioned, I can add a mapping for the android TV integration and that works.

I'll try and get some more info using the details you mention.

It's not a daily driver yet so it shouldn't cause too many issues. I just need to find the time to get it done.

Kamblian commented 6 months ago

I have exactly the same behavior.

Remote Two System version is 1.5.2. Core-Version of Home Assistant is 2023.11.3, running in a container on a Raspberry Pi 3B+.

Here my used integrations and entities:

Observations when inside an activity:

If you need the information as you've described above, please give me a short explanation how to get and provide the GET /api/activities/:entityId and GET /api/entities/:entityId responses.

uvjim commented 6 months ago

@zehnm - hopefully this is what you are looking for.

/api/activities/:entityId ```json { "entity_id": "uc.main.2b73e863-4542-4572-81df-2ab18b073ece", "entity_type": "activity", "integration_id": "uc.main", "name": { "en": "Watch TV" }, "icon": "uc:activity", "features": [ "start" ], "description": { "en": "" }, "options": { "button_mapping": [ { "button": "BACK" }, { "button": "HOME" }, { "button": "VOICE" }, { "button": "VOLUME_UP", "short_press": { "cmd_id": "media_player.volume_up", "entity_id": "uc_androidtv_driver.main.FC017C39709A", "params": {} } }, { "button": "VOLUME_DOWN", "short_press": { "cmd_id": "media_player.volume_down", "entity_id": "uc_androidtv_driver.main.FC017C39709A", "params": {} } }, { "button": "GREEN" }, { "button": "DPAD_UP" }, { "button": "YELLOW" }, { "button": "DPAD_LEFT" }, { "button": "DPAD_MIDDLE", "short_press": { "cmd_id": "media_player.cursor_enter", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec", "params": {} } }, { "button": "DPAD_RIGHT" }, { "button": "RED" }, { "button": "DPAD_DOWN" }, { "button": "BLUE" }, { "button": "CHANNEL_UP", "short_press": { "cmd_id": "media_player.channel_up", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec", "params": {} } }, { "button": "CHANNEL_DOWN", "short_press": { "cmd_id": "media_player.channel_down", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec", "params": {} } }, { "button": "MUTE", "short_press": { "cmd_id": "media_player.mute_toggle", "entity_id": "uc_androidtv_driver.main.FC017C39709A", "params": {} } }, { "button": "PREV" }, { "button": "PLAY" }, { "button": "NEXT" }, { "button": "POWER" } ], "included_entities": [ { "entity_commands": [ "media_player.on", "media_player.off", "media_player.volume", "media_player.volume_up", "media_player.volume_down", "media_player.mute_toggle", "media_player.play_pause", "media_player.next", "media_player.previous", "media_player.home", "media_player.back", "media_player.channel_up", "media_player.channel_down", "media_player.cursor_up", "media_player.cursor_down", "media_player.cursor_left", "media_player.cursor_right", "media_player.cursor_enter", "media_player.select_source" ], "entity_id": "uc_androidtv_driver.main.FC017C39709A", "entity_type": "media_player", "integration": { "icon": "uc:integration", "name": { "en": "Android TV" } }, "name": { "en": "KD-65XF9005" } }, { "entity_commands": [ "media_player.channel_up", "media_player.channel_down", "media_player.function_red", "media_player.function_green", "media_player.function_yellow", "media_player.function_blue", "media_player.cursor_up", "media_player.cursor_down", "media_player.cursor_left", "media_player.cursor_right", "media_player.cursor_enter", "media_player.fast_forward", "media_player.home", "media_player.back", "media_player.menu", "media_player.on", "media_player.off", "media_player.play_pause", "media_player.previous", "media_player.rewind", "media_player.stop" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec", "entity_type": "media_player", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_guide", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: Guide" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_info", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: Info" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num0", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 0" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num1", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 1" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num2", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 2" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num3", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 3" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num4", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 4" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num5", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 5" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num6", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 6" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num7", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 7" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num8", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 8" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num9", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: 9" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_record", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: Record" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_thumbsdown", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: Thumbs Down" } }, { "entity_commands": [ "button.push" ], "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_thumbsup", "entity_type": "button", "integration": { "icon": "uc:integration", "name": { "en": "Virgin Media TiVo (NEW DEV)" } }, "name": { "en": "Lounge TiVo: Thumbs Up" } } ], "prevent_sleep": false, "sequences": { "off": [], "on": [] }, "user_interface": { "pages": [ { "grid": { "height": 5, "width": 3 }, "items": [ { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_guide", "params": {} }, "icon": "custom:television-guide-custom__1_.png", "location": { "x": 2, "y": 4 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "media_player.previous", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec", "params": {} }, "icon": "custom:swap-horizontal-bold-custom__1_.png", "location": { "x": 1, "y": 4 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num0", "params": {} }, "icon": "custom:numeric-0-custom.png", "location": { "x": 1, "y": 3 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num1", "params": {} }, "icon": "custom:numeric-1-custom.png", "location": { "x": 0, "y": 0 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num2", "params": {} }, "icon": "custom:numeric-2-custom.png", "location": { "x": 1, "y": 0 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num3", "params": {} }, "icon": "custom:numeric-3-custom.png", "location": { "x": 2, "y": 0 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num5", "params": {} }, "icon": "custom:numeric-5-custom.png", "location": { "x": 1, "y": 1 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num4", "params": {} }, "icon": "custom:numeric-4-custom.png", "location": { "x": 0, "y": 1 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num6", "params": {} }, "icon": "custom:numeric-6-custom.png", "location": { "x": 2, "y": 1 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num8", "params": {} }, "icon": "custom:numeric-8-custom.png", "location": { "x": 1, "y": 2 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num9", "params": {} }, "icon": "custom:numeric-9-custom.png", "location": { "x": 2, "y": 2 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_num7", "params": {} }, "icon": "custom:numeric-7-custom.png", "location": { "x": 0, "y": 2 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_info", "params": {} }, "icon": "custom:information-variant-custom__1_.png", "location": { "x": 2, "y": 3 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "button.push", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec_record", "params": {} }, "icon": "custom:record-rec-custom.png", "location": { "x": 0, "y": 3 }, "size": { "height": 1, "width": 1 }, "type": "icon" }, { "command": { "cmd_id": "media_player.stop", "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec", "params": {} }, "icon": "custom:stop-custom.png", "location": { "x": 0, "y": 4 }, "size": { "height": 1, "width": 1 }, "type": "icon" } ], "name": "New page", "page_id": "main" } ] } }, "attributes": { "state": "ON" }, "enabled": true } ```
/api/entities/:entityId ```json { "entity_id": "uvjim_virginmediatv_dev_driver.main.fc5273bf14cd49d3b54cd4700b9771ec", "device_class": "set_top_box", "entity_type": "media_player", "integration_id": "uvjim_virginmediatv_dev_driver.main", "name": { "en": "Lounge TiVo" }, "features": [ "channel_switcher", "color_buttons", "dpad", "fast_forward", "home", "menu", "on_off", "play_pause", "previous", "rewind", "stop" ], "description": {}, "options": null, "attributes": { "state": "UNKNOWN" }, "enabled": true } ```
uvjim commented 6 months ago

@zehnm - still an issue in v1.6.0

Kamblian commented 6 months ago

Same for me. The issue has been mentioned by other users on discord in between (for example today in #development). Always related to the use of "Universel media player" in Home Assistant.

Here is the requested information for my test-case:

/api/activities/:entityId

`{"entity_id":"uc.main.cf87c966-66d5-4ccc-92d2-fae87cfc1661","entity_type":"activity","integration_id":"uc.main","name":{"en":"test","de":"test"},"icon":"uc:activity","features":["start"],"options":{"button_mapping":[{"button":"BACK"},{"button":"HOME"},{"button":"VOICE"},{"button":"VOLUME_UP"},{"button":"VOLUME_DOWN"},{"button":"GREEN"},{"button":"DPAD_UP"},{"button":"YELLOW"},{"button":"DPAD_LEFT"},{"button":"DPAD_MIDDLE"},{"button":"DPAD_RIGHT"},{"button":"RED"},{"button":"DPAD_DOWN"},{"button":"BLUE"},{"button":"CHANNEL_UP"},{"button":"CHANNEL_DOWN"},{"button":"MUTE"},{"button":"PREV"},{"button":"PLAY","short_press":{"cmd_id":"media_player.play_pause","entity_id":"hass.main.media_player.mopidy","params":{}}},{"button":"NEXT","short_press":{"cmd_id":"button.push","entity_id":"hass.main.input_button.taste","params":{}}},{"button":"POWER"}],"included_entities":[{"entity_id":"hass.main.input_button.taste","entity_type":"button","integration":{"icon":"uc:integration","name":{"en":"Home Assistant"}},"name":{"en":"Taste"}},{"entity_id":"hass.main.media_player.mopidy","entity_type":"media_player","icon":"uc:radio","integration":{"icon":"uc:integration","name":{"en":"Home Assistant"}},"name":{"de":"Mopidy","en":"Mopidy"}}],"prevent_sleep":true,"sequences":{"off":[],"on":[]},"user_interface":{"pages":[{"grid":{"height":6,"width":4},"items":[{"command":{"cmd_id":"media_player.play_pause","entity_id":"hass.main.media_player.mopidy","params":{}},"icon":"uc:play-pause","location":{"x":1,"y":4},"size":{"height":1,"width":2},"type":"icon"},{"command":{"cmd_id":"button.push","entity_id":"hass.main.input_button.taste","params":{}},"icon":"uc:power-on","location":{"x":1,"y":5},"size":{"height":1,"width":2},"type":"icon"}],"name":"New page","page_id":"main"}]}},"attributes":{"state":"OFF"},"enabled":true}`

/api/entities/:entityId

`{"entity_id":"hass.main.media_player.mopidy","device_class":"speaker","entity_type":"media_player","integration_id":"hass.main","name":{"de":"Mopidy","en":"Mopidy"},"icon":"uc:radio","features":["volume","select_source","mute","unmute","play_pause","stop","next","previous","repeat","shuffle","seek","media_duration","media_position","media_title","media_artist","media_album","media_image_url","media_type"],"description":{},"options":null,"attributes":{"media_album":"Radio Swiss Pop","media_artist":"Radio Swiss Pop","media_image_url":"http://homeassistant.local:8123/api/media_player_proxy/media_player.mopidy?token=7a00556f504043e6e80e0b43f0baba5aab34ee3325106086635c20a8845852f9&cache=94d3a54850d2aa7f","media_position":0,"media_title":"Aretha Franklin - I Say A Little Prayer","media_type":"music","muted":false,"repeat":"OFF","shuffle":false,"source_list":["christian_power_praise","energy_bern","flashbackfm","gospeldance","lifechannel","radiosender","srf1","srf2","srf3","srf4info","swissclassic","swissjazz","swisspop"],"state":"ON","volume":80},"enabled":true}`

albaintor commented 5 months ago

Same problem here I don’t know if it is only related to home assistant integration. One workaround : if I map a soft button to the media player entity, it unlocks the physical buttons

uvjim commented 5 months ago

@zehnm - still an issue in v1.6.4. Is there any more logs/information that you need to help pinpoint this?

Kamblian commented 5 months ago

Yes, still an issue in v1.6.4 for me too. I've tried to do a factory-reset of the remote as recommended in Discord, but that didn't change anything: hass-media-player-commands still work when assigned to soft buttons, they don't when assigned to hard buttons. Another recommendation on Discord was to assign a command (which is assigned to a hard button) in parallel to a soft button. This should unlock the function of the hard button. Doesn't work for me neither.

Quinterly commented 5 months ago

Still an issue for me as well.

Quinterly commented 5 months ago

Another firmware update with no fix. I have no idea what's required to get UC to actually pay attention to a critical bug.

zehnm commented 5 months ago

Unfortunately we still can't reproduce this error. I'm also using the Home Assistant integration on a daily basis with working physical buttons. This must be something quite specific, and we certainly fix it once identified.

Please post log files when you press configured buttons which don't work. Services: core service, user interface app and the involved integrations if you are not using an external custom integration.

@Quinterly please provide more information. Which integrations are you using and what entities are included in the activity? Posting the full activity data from the API call /api/activities/:entityId, as others did, will help trying to identify a pattern.

albaintor commented 5 months ago

I had it yesterday :

Next time I will grab log files and post them

Quinterly commented 5 months ago

@zehnm HA integration is not at issue. Here is what is at issue:

  1. AppleTV integration is broken. It requires a reboot to use any hard or soft buttons to interact with an ATV. This is happening with 2 different R2s in two different viewing areas, with two different AppleTV 4k units. Common denominator is the R2.
  2. Android TV integration requires exiting the activity and returning to use hard buttons. AppleTV, after a reboot, also requires this.

Because this bug has two different issues trackers, I posted info about the setup and the logs here: https://github.com/unfoldedcircle/feature-and-bug-tracker/issues/176#issuecomment-1902691314

To be clear it happens in both of these setups:

and:

I have factory reset the remote. I have removed and re-added the ATV integration. These steps do not resolve the issues.

zehnm commented 5 months ago

@albaintor please provide more information in which scenario the buttons don't work for you. Are you also using activities, or just the media-player entity? Please verify that the Home Assistant integration is connected or post a log file. If it works sometimes, this could be very well related to connectivity issues.

uvjim commented 5 months ago

@zehnm - I'm not sure that my logs will help at all. Unless I'm doing something wrong re: logging the only things that show when I get the logs for around the time this happens (just tested) are these: -

2024-01-30 14:24:44.755001 +00:00   core    NOTICE  Setting button backlight to: 0%
2024-01-30 14:24:18.897932 +00:00   core    NOTICE  Removed standby inhibitor: activity 'Watch TV' (on) (max 65s)
2024-01-30 14:24:18.897750 +00:00   core    NOTICE  [Watch TV] activity finished
2024-01-30 14:24:18.897434 +00:00   core    NOTICE  Added standby inhibitor: activity 'Watch TV' (on) (max 65s)
2024-01-30 14:24:18.896176 +00:00   core    NOTICE  Started activity 'Watch TV' (uc.main.2b73e863-4542-4572-81df-2ab18b073ece) with timeout of 60s
2024-01-30 14:24:14.612024 +00:00   core    NOTICE  Removed standby inhibitor: activity 'Watch TV' (off) (max 65s)
2024-01-30 14:24:14.611527 +00:00   core    NOTICE  [Watch TV] activity finished
2024-01-30 14:24:14.610728 +00:00   core    NOTICE  Added standby inhibitor: activity 'Watch TV' (off) (max 65s)
2024-01-30 14:24:14.606633 +00:00   core    NOTICE  Started activity 'Watch TV' (uc.main.2b73e863-4542-4572-81df-2ab18b073ece) with timeout of 60s
2024-01-30 14:24:11.956377 +00:00   core    NOTICE  Changed battery status: 99% Discharging, 4019mV, charger: false
2024-01-30 14:24:06.953509 +00:00   core    NOTICE  Changed battery status: 99% Not charging, 4189mV, charger: false
2024-01-30 14:24:04.880961 +00:00   core    NOTICE  Setting button backlight to: 100%

This coincides with me: -

  1. Removing from the dock
  2. Stopping the Watch TV activity
  3. Starting the Watch TV activity
  4. Pressing the volume up key (mapped to an Android TV volume up - worked)
  5. Pressing the volume down key (mapped to an Android TV volume down - worked)
  6. Pressing the channel up key (mapped to custom integration channel up for media player - didn't work)
  7. Pressing the channel down key (mapped to custom integration channel down for media player - didn't work)
  8. Pressing the OK key (mapped to custom integration Cursor enter for media player - didn't work)
  9. Pressing soft key (mapped to the custom integration button - worked)
  10. Pressing soft key (mapped to the custom integration button - worked)

As you can see, none of that appears in that time frame even though the log file was generated for all services across all time frames.

I'd also like to add, that many in here are talking about this issue being with Home Assistant. Whilst I have Home Assistant available and have the integration configured, it is not involved in this activity and is not part of the reason I raised this issue.

albaintor commented 5 months ago

@albaintor please provide more information in which scenario the buttons don't work for you. Are you also using activities, or just the media-player entity?

Please verify that the Home Assistant integration is connected or post a log file. If it works sometimes, this could be very well related to connectivity issues.

Hi,

When this happens I am in an activity with : a media player entity, IR devices and script entities. When this happens this only happens just after I start the activity. I don't remember it occurs after a sleep time inside the activity. I don't think it is related to home assistant as I was able to reproduce it with an Apple TV. The same rule applies in all cases : soft buttons on the screen assigned to home assistant script or Apple TV command DO work. However the physical button with the same command assigned don't.

This is not the same issue as the wake up issue after sleep time where no commands are processed while the remote reconnects to the dock or to the devices. So as pointed out I think this is more like a bug in the core process of the remote and not the integrations. I have tried to extract the logs last time but I didn't see anything abnormal. I'll try again

Last thing which is really weird : the volume buttons assigned to media player entity DO work also as reported above. Whereas the arrow buttons for ex don't as pointed out too

martonborzak commented 5 months ago

We've found the issue with media player key mappings not working in an activity. Fix is is the upcoming software update.

uvjim commented 5 months ago

Brilliant. Thanks @martonborzak and @zehnm. I'll get the firmware updated when available and report back.

albaintor commented 5 months ago

Great ! Keep on your good work !

dchone commented 5 months ago

I have a similar problem - after reboot when starting an activity the assigned physical buttons don't work but the soft buttons do. The unassigned buttons such as Power do work for the activity. This is normally fixed by closing down the activity and restarting it. On the second use of the activity the mapping all work correctly.

zehnm commented 5 months ago

@uvjim firmware 1.6.9 is out with a fix for button mappings in activities with a media-player UI element. The non-working button issue happens if the media-player entity doesn't have a volume control feature. Please report back if that fixes your issue.

uvjim commented 5 months ago

@zehnm Downloaded and installed.

It took me starting, stopping and starting the activity before the buttons would work, but they are working now.

I have even mapped the additional buttons I needed to from both the media player entity (yes you were right it didn't have volume controls) and standalone button entities. They all started to work after stopping and starting the activity again.

uvjim commented 5 months ago

Based on the previous comment, I'll close this off. All seems to still be working today and I've been able to use the remote more than I have done in the last few weeks.

@zehnm and @martonborzak - Thanks for the work in tracking this down and resolving it.

Kamblian commented 5 months ago

For me everything is working now as well. Thank you very much!

PS: I've observed that when starting an activity for the first time after a restart of the remote, it behaves slightly different than when starting the same activity for the second time (for me the difference is seen in the progress-circle animation and sometimes when loading the album-art in a media-player-entity for the first time). This could be related to the last report of @uvjim saying he has to start the activity twice to work normally.