Closed uvjim closed 5 months ago
I can't reproduce this and retested it with creating a new activity, adding a media-player and physical button mappings:
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:
GET /api/activities/:entityId
responseGET /api/entities/:entityId
responseI 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.
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.
@zehnm - hopefully this is what you are looking for.
@zehnm - still an issue in v1.6.0
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:
`{"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}`
`{"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}`
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
@zehnm - still an issue in v1.6.4. Is there any more logs/information that you need to help pinpoint this?
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.
Still an issue for me as well.
Another firmware update with no fix. I have no idea what's required to get UC to actually pay attention to a critical bug.
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.
I had it yesterday :
Next time I will grab log files and post them
@zehnm HA integration is not at issue. Here is what is at issue:
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.
@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.
@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: -
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 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
We've found the issue with media player key mappings not working in an activity. Fix is is the upcoming software update.
Brilliant. Thanks @martonborzak and @zehnm. I'll get the firmware updated when available and report back.
Great ! Keep on your good work !
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.
@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.
@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.
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.
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.
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...
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