Denon: control subwoofer level

Hello,
i am trying to add my subwoofer channel level to home assistant,
i create the automation + configuration,

the real problem is how can i use template value to work in the action.

configuration:

input_number:
  subwoofer_level:
    name: Subwoofer Level
    initial: 0
    max: 12
    min: -12
    step: 0.5

automation:

- alias: '[Denon] Subwoofer Level'
  trigger:
    platform: state
    entity_id: input_number.subwoofer_level
  action:
  - service: denonavr.get_command
    data:
      entity_id: media_player.denon
      command: /goform/formiPhoneAppDirect.xml?CVSW%20{{ ( states("input_number.subwoofer_level") | float *10 + 500 ) | int }}

the template value is used to convert the input number ( -12 | 0 | +12 ) to numbers that the denon work with ( 380 | 500 | 620 )

Thank you

2 Likes

i fix it by changing the automation code.
for everyone who is interesting of control the Subwoofer level on denonavr

denonavr intergration is needed.

configuration:

input_number:
 subwoofer_level:
   name: Subwoofer Level
   initial: 0
   max: 12
   min: -12
   step: 0.5

automation:

- alias: '[Denon] Subwoofer Level'
  trigger:
    platform: state
    entity_id: input_number.subwoofer_level
  action:
  - service: denonavr.get_command
    data_template:
      entity_id: media_player.denon
      command: /goform/formiPhoneAppDirect.xml?CVSW%20{{ ( states("input_number.subwoofer_level") | float *10 + 500 ) | int }}

5 Likes

Thank you!
IN case anbody wants to use node red instead, here is the sequence for that:

[{"id":"ad9edf33.c56f","type":"api-call-service","z":"1fbf29be.b6c766","name":"Set subwoofer level","server":"5c29d263.09d2ac","version":1,"debugenabled":true,"service_domain":"denonavr","service":"get_command","entityId":"media_player.living_room","data":"{\"command\":\"/goform/formiPhoneAppDirect.xml?CVSW%20{{payload}}\"}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":950,"y":800,"wires":[[]]},{"id":"4e4471c7.224fd","type":"server-state-changed","z":"1fbf29be.b6c766","name":"subwoofer_niveau change","server":"5c29d263.09d2ac","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_number.subwoofer_niveau","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":480,"y":800,"wires":[["c3952812.3cac48"]]},{"id":"c3952812.3cac48","type":"calculator","z":"1fbf29be.b6c766","name":"x10","inputMsgField":"payload","outputMsgField":"payload","operation":"mult","constant":"10","round":true,"decimals":0,"x":670,"y":800,"wires":[["e2f37126.1f886"]]},{"id":"e2f37126.1f886","type":"calculator","z":"1fbf29be.b6c766","name":"+500","inputMsgField":"payload","outputMsgField":"payload","operation":"sum","constant":"500","round":true,"decimals":0,"x":790,"y":800,"wires":[["ad9edf33.c56f"]]},{"id":"5c29d263.09d2ac","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":false,"cacheJson":true}]

Doesn’t seem like we can read the value stored in the receiover (which would be usefull when the subwoofer volume is changed using the remote control).

1 Like

Sorry I know long time ago, but as much as your post helped me, also it doesn’t… :frowning:

I understand now what platform is used “telnet” but CVSW%20 is not working for me. What i don’t get is why are you using the “%20” after “ChannelVolumeSubWoofer”?

I hope you can help me with that :S

%20 is just space in ASCII Encoding.

You must check that your avr support this api method,
Which avr you have?