Closed pavolholes closed 2 years ago
homekit documentation homekit source (message by IssueLinks)
Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (homekit
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
The volume level or step is set via a service call for these
Hi @bdraco , I'm not sure if that meant that I should enable full HA debug and provide more logs, but I've done that. During the debugging I've done via Remote widget these steps:
In the log I see debug log lines Set remote key to
for all taps. But the debug logs for the push of the buttons Step volume by
are not there.
2021-12-30 22:19:06 DEBUG (MainThread) [homeassistant.components.homekit.type_media_players] media_player.tv_obyvacka: Set remote key to 5
...
2021-12-30 22:19:06 DEBUG (MainThread) [homeassistant.components.homekit.type_media_players] media_player.tv_obyvacka: Set remote key to 5
...
2021-12-30 22:19:07 DEBUG (MainThread) [homeassistant.components.homekit.type_media_players] media_player.tv_obyvacka: Set remote key to 5
...
2021-12-30 22:19:08 DEBUG (MainThread) [homeassistant.components.homekit.type_media_players] media_player.tv_obyvacka: Set remote key to 11
...
2021-12-30 22:19:08 DEBUG (MainThread) [homeassistant.components.homekit.type_media_players] media_player.tv_obyvacka: Set remote key to 11
...
2021-12-30 22:19:09 DEBUG (MainThread) [homeassistant.components.homekit.type_media_players] media_player.tv_obyvacka: Set remote key to 11
...
2021-12-30 22:19:13 DEBUG (MainThread) [homeassistant.components.homekit.type_media_players] media_player.tv_obyvacka: Set remote key to 4
...
2021-12-30 22:19:13 DEBUG (MainThread) [homeassistant.components.homekit.type_media_players] media_player.tv_obyvacka: Set remote key to 4
...
2021-12-30 22:19:14 DEBUG (MainThread) [homeassistant.components.homekit.type_media_players] media_player.tv_obyvacka: Set remote key to 4
Here is the debug log: home-assistant.log
Would that mean that the Remote widget is not sending the press of the hardware volume buttons to HomeKit?
Thanks!
EDIT:
If I understant correctly, this Recv decrypted: b'PUT /characteristics HTTP/1.1\r\nHost: Obyvacka
is what was received by HomeKit from the iOS device. And with that message I was able to find only the taps which I mentioned above. So would that really mean that iOS device is not sending the presses of the volume buttons? 🤔
So would that really mean that iOS device is not sending the presses of the volume buttons?
That is what is appears is happening.
That is what is appears is happening.
And do youm, please, have any clue why is it happening? Or where I should start investigating? Is that because of my Samsung TV integration? Or is that because the volume press is not monitored by the event in Home Assistant? I have no clue what to do now to make it work 😪 Thanks in advance.
Honestly I don't have enough information to guess how to debug this since Apple doesn't provide docs for the television accessory unless you are MFI certified
We just added diagnostics for HomeKit which may help figure this out.
Can you try updating to 2022.2.3 and send diagnostics for the config entry ?
Sure, it's awesome new function 🚀. Please see the diagnostics attached :) config_entry-homekit-35b04e47978358cf94f0b5c7543e0661.json.txt
{
"iid": 55,
"type": "E9",
"perms": [
"pr",
"ev"
],
"format": "uint8",
"valid-values": [
0,
1,
2,
3
],
"value": 1
},
{
"iid": 56,
"type": "EA",
"perms": [
"pw"
],
"format": "uint8",
"valid-values": [
0,
1
]
},
So the VolumeSelector
(EA) and VolumeControlType
(E9) look like they are there.
Here is what an certified device shows
{
"iid": 25,
"type": "00000113-0000-1000-8000-0026BB765291", # Speaker
"primary": false,
"hidden": false,
"linked": [],
"characteristics": [{
"iid": 26,
"type": "00000119-0000-1000-8000-0026BB765291", # Volume
"format": "uint8",
"value": 20,
"perms": [
"pr",
"pw",
"ev"
],
"ev": false,
"unit": "percentage",
"minValue": 0,
"maxValue": 100,
"minStep": 1
},
{
"iid": 27,
"type": "0000011A-0000-1000-8000-0026BB765291", # Mute
"format": "bool",
"value": 0,
"perms": [
"pr",
"pw",
"ev"
],
"ev": false
},
{
"iid": 28,
"type": "000000B0-0000-1000-8000-0026BB765291", # Active
"format": "uint8",
"value": 1,
"perms": [
"pr",
"pw",
"ev"
],
"ev": true,
"minValue": 0,
"maxValue": 1,
"minStep": 1
},
{
"iid": 29,
"type": "E9", # VolumeControlType
"format": "uint8",
"value": 3,
"perms": [
"pr",
"ev"
],
"ev": false,
"minValue": 0,
"maxValue": 3,
"minStep": 1
},
{
"iid": 30,
"type": "EA", # VolumeSelector
"format": "uint8",
"perms": [
"pw"
],
"minValue": 0,
"maxValue": 1,
"minStep": 1
}
]
},
Here is how Home Assistant is presenting your device's speaker
{
"iid": 51,
"type": "113",
"characteristics": [
{
"iid": 52,
"type": "11A",
"perms": [
"pr",
"pw",
"ev"
],
"format": "bool",
"value": false
},
{
"iid": 53,
"type": "23",
"perms": [
"pr"
],
"format": "string",
"value": "Obyvacka TV Volume"
},
{
"iid": 54,
"type": "B0",
"perms": [
"pr",
"pw",
"ev"
],
"format": "uint8",
"valid-values": [
0,
1
],
"value": 1
},
{
"iid": 55,
"type": "E9",
"perms": [
"pr",
"ev"
],
"format": "uint8",
"valid-values": [
0,
1,
2,
3
],
"value": 1
},
{
"iid": 56,
"type": "EA",
"perms": [
"pw"
],
"format": "uint8",
"valid-values": [
0,
1
]
},
{
"iid": 57,
"type": "119",
"perms": [
"pr",
"pw",
"ev"
],
"format": "uint8",
"minValue": 0,
"minStep": 1,
"unit": "percentage",
"maxValue": 100,
"value": 0
}
]
}
This is how volume is presented by Home Assistant for your device
..nothing here... since the device doesn't appear to support Volume
This is what an certified device looks like
{
"iid": 26,
"type": "00000119-0000-1000-8000-0026BB765291", # Volume
"format": "uint8",
"value": 20,
"perms": [
"pr",
"pw",
"ev"
],
"ev": false,
"unit": "percentage",
"minValue": 0,
"maxValue": 100,
"minStep": 1
},
I think the
supported_features
includes mandatorySUPPORT_VOLUME_MUTE
,SUPPORT_VOLUME_SET
andSUPPORT_VOLUME_STEP
bits. Here is the TV entity info:
So volume is only added if
if features & SUPPORT_VOLUME_SET:
self.chars_speaker.append(CHAR_VOLUME)
Hi @ollo69,
I don't know if I can do anything to fix the issue or something needs to be changed in your SamsungTV Smart Component
. Can you please look at Nick's findings above and let me know if I can help? This issue is child of the https://github.com/ollo69/ha-samsungtv-smart/issues/96.
Thanks!
@bdraco thanks a lot for the analysis!
This may be related or not.
My volume control via iOS remote works fine for about a day, then is either extremely delayed (30+ seconds) or stops working completely until I reboot HA.
Power and source changing continues to work via Apple Home app during this time. Volume control continues to work via HA media player card, so it’s not a matter of an issue between HA and the TV.
I have one HomeKit hub being an Apple TV 4K connected via Ethernet.
(I’m mobile right now, but will capture some logs)
EDIT: Of course, this morning, a HA reboot did not resolve like it has been for a few weeks. Even stranger is one of my TVs is working via iOS Remote widget volume control, but 2 others are not. Will continue to investigate.
Living Room TV diagnostics (this TV is not working) config_entry-homekit-f4419042382b1ae10fa90ddeeadd78c9.json.txt
Sofia TV diagnostics (working) config_entry-homekit-b5529fcffbfb8208a3f26f5e6638324a.json.txt
EDIT 2: Deleted the TV from Apple Home app, re-paired and is working for now.
Was there any progress on this? I have a similar issue
It started to work with update to 0.7.5 :)
Really good to know, but I don't think that is related to last component version. More probably is due to some changes in HA or eventually in your TV software.
The problem
Hello, I can't control volume of the TV via the Remote widget on my iPhone using the side hardware buttons. All other controls visible on the screen are working and I was able to catch them via event
homekit_tv_remote_key_pressed
. But when I press the hardware volume buttons the event is not received nor the volume of entity is changed. I'm able to control the volume viamedia_player
entity in Lovelace and also via service:I think the
supported_features
includes mandatorySUPPORT_VOLUME_MUTE
,SUPPORT_VOLUME_SET
andSUPPORT_VOLUME_STEP
bits. Here is the TV entity info:Below you can find my yaml configuration of the HomeKit Bridge in accessory mode.
I've enabled debug logging for HomeKit using below which I found here:
and below you can find the debug log. During the debugging I've done this in the Remote widget:
I don't understant all from the logs but I think I can see there only five taps of arrow_down (
{'characteristics': [{'aid': 1, 'iid': 15, 'value': 5}]}
) and five taps of arrow_up ({'aid': 1, 'iid': 15, 'value': 4}
), not the volume buttons presses between them.Can you please help me with this?
Thanks a lot.
Regards, Pavol
What version of Home Assistant Core has the issue?
core-2021.12.7
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
homekit
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homekit/#cant-control-volume-of-your-tv-media-player
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response