I’m using this to control my Sonos system and I’m finding that rotating for volume up and volume down is very slow. Is there a way to make the volume more responsive?
Second, and not sure this is possible, since I’m using this for my Sonos I would like to be able to define the action for the single press. I need the volume control to work on all of the sonos speakers on the floor but the skip track feature should only be applied to a single media player. If I apply it to all of them then I get multiple skips because I am telling all of the speakers to skip.
I suppose this could be avoided if there were some sort of “increase volume of the sonos group” service but I don’t think there is. Even then, I would need a custom action for the volume up and volume down.
It also uses the script mode of “always” to better handle the volume changes - spinning the device starts the volume up or down loop, and when it stops that interrupts the running blueprint, stopping the volume change.
The various delays seem to be working okay for me right now.
blueprint:
name: ZHA - IKEA Symfonisk sound controller for media
description: 'Control media with an IKEA Symfonisk sound controller (the spinny
ones).
Single press will toggle Play/Pause on your selected media player.
You can set functions for double press and triple press.
Rotating left/right will change the volume smoothly of the selected media player,
if that function is possible.'
domain: automation
input:
remote:
name: Remote
description: IKEA Symfonisk controller to use
selector:
device:
integration: zha
manufacturer: IKEA of Sweden
model: SYMFONISK Sound Controller
media_player:
name: Media Player
description: The media player to control
selector:
target:
entity:
domain: media_player
double_press:
name: Double press
description: Action to run on double press
default: []
selector:
action: {}
triple_press:
name: Triple press
description: Action to run on triple press
default: []
selector:
action: {}
source_url: https://community.home-assistant.io/t/zha-ikea-symfonisk-sound-controller-for-media-the-spinny-one/266130/3
mode: restart
trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input 'remote'
action:
- variables:
command: '{{ trigger.event.data.command }}'
cluster_id: '{{ trigger.event.data.cluster_id }}'
endpoint_id: '{{ trigger.event.data.endpoint_id }}'
args: '{{ trigger.event.data.args }}'
- choose:
- conditions:
- '{{ command == ''stop'' }}'
- '{{ cluster_id == 8 }}'
- '{{ endpoint_id == 1 }}'
sequence:
- delay: 0.1
- conditions:
- '{{ command == ''toggle'' }}'
- '{{ cluster_id == 6 }}'
- '{{ endpoint_id == 1 }}'
sequence:
- wait_for_trigger:
- platform: event
event_type: zha_event
event_data:
device_id: !input 'remote'
endpoint_id: 1
cluster_id: 8
command: 'toggle'
timeout:
milliseconds: 500
continue_on_timeout: true
- service: media_player.media_play_pause
target: !input 'media_player'
- conditions:
- '{{ command == ''step'' }}'
- '{{ cluster_id == 8 }}'
- '{{ endpoint_id == 1 }}'
- '{{ args == [0, 1, 0] }}'
sequence: !input 'double_press'
- conditions:
- '{{ command == ''step'' }}'
- '{{ cluster_id == 8 }}'
- '{{ endpoint_id == 1 }}'
- '{{ args == [1, 1, 0] }}'
sequence: !input 'triple_press'
- conditions:
- '{{ command == ''move'' }}'
- '{{ cluster_id == 8 }}'
- '{{ endpoint_id == 1 }}'
- '{{ args == [0, 195] }}'
sequence:
repeat:
while:
- condition: template
value_template: "{{ repeat.index < 10 }}"
sequence:
- service: media_player.volume_up
target: !input 'media_player'
- delay: 0.1
- conditions:
- '{{ command == ''move'' }}'
- '{{ cluster_id == 8 }}'
- '{{ endpoint_id == 1 }}'
- '{{ args == [1, 195] }}'
sequence:
repeat:
while:
- condition: template
value_template: "{{ repeat.index < 10 }}"
sequence:
- service: media_player.volume_down
target: !input 'media_player'
- delay: 0.1
Does this mean you can’t “accelerate” the turning up or down of volume by quickly turning the wheel in little steps or one big step but instead have to wait until it reaches the desired volume by itself?
So how you turn the wheel doesn’t make any difference?
Sorry…hope you get my point. It’s hard to describe what I mean…
Yeah, I understand what you mean - I don’t think there is a way to detect how fast the knob is spinning, only when it started spinning and when it stopped spinning.
I’ve also found at times it gets a bit behind, and events keep coming in seconds after interaction has stopped. Hence my kids are not allowed to touch the “black knob”, which is hooked up through HA.
(To be honest though, I think I have seen that behaviour with the IKEA hub connected one too, so they really aren’t supposed to play with the “white knob” either)
I’m still learning how everything works so sorry if my question is stupid. But why is my Symfonisk sound controller not selectable in the automation?
ZHA is just the integration method, not hardware. I’m guessing however that it’s likely not possible to use the ZHA integration with an IKEA zigbee hub. I’m currently using a Conbee2.
Hi sparkydave, so you replaced the Ikea hub with the Conbee 2? So you don’t use the Ikea integration? I integrade via the Conbee2 and link all the ikea lights etc via Conbee 2?
You can do it that way although surely the Symfonisk can be used with the IKEA Integration, just not with this Blueprint. Perhaps the Blueprint can be modified slightly to work with the IKEA Integration, I’m not sure as I haven’t yet tried creating a Blueprint. All my existing automations are in YAML.
I got it working. The symfonsik controller is connected via ZHA the plueprint is in. The only part which doesn’t work yet is the HEOS volume control. What are the next steps to take? Can you help me with that?
I have been tinkering with your code and came up with a template that would read the current
media player volume value and add/subtract a floating value in order to try to smooth the stepping even further (I think).
Unfortunately I am having trouble with inserting selectors into my template so the media player entities are manually added. Give it a go and see what you think after merging, I’ll continue to work on the code in the meantime.