Controlling a Denon AVR

Does anyone have it done to read the mute status with the HA Configuration?

If I view Developer tools → Current entity states → media_player.denon_avc_x3700h → State attributes (YAML, optional)
Mute state is always “is_volume_muted: false”

Otherwise I must make a sensor (every 10 seconds and, run the script if press te button)


  - scan_interval: 10
    resource: http://<IP-ADDRESS>:8080/goform/formZone2_Zone2XmlStatusLite.xml
    sensor:
      - name: "AVR_zone2_volume"
        value_template: "{{ value_json.item.MasterVolume.value }}"
      - name: "AVR_zone2_power"
        value_template: "{{ value_json.item.Power.value }}"
      - name: "AVR_zone2_mute"
        value_template: "{{ value_json.item.Mute.value }}"

response from formZone2_Zone2XmlStatusLite.xml:

<?xml version="1.0" encoding="utf-8" ?>
<item>
<Power><value>ON</value></Power>
<MasterVolume><value>-48</value></MasterVolume>
<Mute><value>off</value></Mute>
</item>

Hi,
I am new to Home Assistant and also have a Denon Reciever.
Thank you for this nice application to control the Denon. I managed to create the Custom button card.
However, when I want to save the script I get the following message:
Message malformed: extra keys not allowed @ data[‘denon_mute_unmute’]

The standard controls (volume, device) now work well, but because I cannot save the scripts I cannot call them.

This is an old post, so it is possible that there have been adjustments in Home Assistant over time, which means that saving the scripts is no longer possible.

Please post that script here.

# Denon AVR - Mute OR Unmute sound (toggle)
  service: adenon_mute_unmute:
    description: Toggle Denon Mute/Unmute status
    sequence:
      - choose:
        # IF Denon is currently MUTED, then unmute
        - conditions: "{{ state_attr('media_player.office_2', 'is_volume_muted') }}"
          sequence:
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MUOFF
        # IF Denon is currently UNMUTED, then mute (Note: few seconds delay in state update after change)
        default:
          - service: denonavr.get_command
            data:
              entity_id: media_player.office_2
              command: /goform/formiPhoneAppDirect.xml?MUON

  # Denon AVR - Increase the volume by nr of steps provided by parameter
  denon_vol_increase:
    description: Increase Denon volume by specified nr of steps
    fields: 
      stepcount:
        description: Number of UP steps
    variables:
      stepcount: "{{ stepcount | default(2) }}"
    sequence:
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.1
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MVUP


  # Denon AVR - Decrease the volume by nr of steps provided by parameter
  denon_vol_decrease:
    description: Decrease Denon volume by specified nr of steps
    fields: 
      stepcount:
        description: Number of DOWN steps
    variables:
      stepcount: "{{ stepcount | default(2) }}"
    sequence:
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.1
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MVDOWN

  # Denon AVR - Favorites + nr of steps down
  denon_favorite_station:
    description: Denon Favorite Station
    fields: 
      stepcount:
        description: Number of DOWN steps
    variables:
      stepcount: "{{ stepcount | default(0) }}"
    sequence:
      - service: denonavr.get_command
        data:
          entity_id: media_player.office_2
          command: /goform/formiPhoneAppDirect.xml?SIFAVORITES
      - delay: 2.5
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.3
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MNCDN
      - delay: 1.5
      - service: denonavr.get_command
        data:
          entity_id: media_player.office_2
          command: /goform/formiPhoneAppDirect.xml?MNENT

Yoy copy/pasted wrongly.

As for # Denon AVR - Mute OR Unmute sound (toggle) change to:

# Denon AVR - Mute OR Unmute sound (toggle)
  denon_mute_unmute:
    description: Toggle Denon Mute/Unmute status
    sequence:
# Denon AVR - Mute OR Unmute sound (toggle)
  denon_mute_unmute:
    description: Toggle Denon Mute/Unmute status
    sequence:
      - choose:
        # IF Denon is currently MUTED, then unmute
        - conditions: "{{ state_attr('media_player.office_2', 'is_volume_muted') }}"
          sequence:
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MUOFF
        # IF Denon is currently UNMUTED, then mute (Note: few seconds delay in state update after change)
        default:
          - service: denonavr.get_command
            data:
              entity_id: media_player.office_2
              command: /goform/formiPhoneAppDirect.xml?MUON

  # Denon AVR - Increase the volume by nr of steps provided by parameter
  denon_vol_increase:
    description: Increase Denon volume by specified nr of steps
    fields: 
      stepcount:
        description: Number of UP steps
    variables:
      stepcount: "{{ stepcount | default(2) }}"
    sequence:
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.1
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MVUP


  # Denon AVR - Decrease the volume by nr of steps provided by parameter
  denon_vol_decrease:
    description: Decrease Denon volume by specified nr of steps
    fields: 
      stepcount:
        description: Number of DOWN steps
    variables:
      stepcount: "{{ stepcount | default(2) }}"
    sequence:
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.1
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MVDOWN

  # Denon AVR - Favorites + nr of steps down
  denon_favorite_station:
    description: Denon Favorite Station
    fields: 
      stepcount:
        description: Number of DOWN steps
    variables:
      stepcount: "{{ stepcount | default(0) }}"
    sequence:
      - service: denonavr.get_command
        data:
          entity_id: media_player.office_2
          command: /goform/formiPhoneAppDirect.xml?SIFAVORITES
      - delay: 2.5
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.3
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MNCDN
      - delay: 1.5
      - service: denonavr.get_command
        data:
          entity_id: media_player.office_2
          command: /goform/formiPhoneAppDirect.xml?MNENT

Exactly the same error message?

Which Denon Receiver do you have? Check the available attributes through

Developer Tools → States → media_player.office_2

and post the results here.

Also please make sure your Denon Receiver is listed HERE.

Ik have a Denon DRA-900H and it’s not listed here :frowning:
But i can use volume and aux selection.

:point_up: :thinking:

Wondering because the below yaml-code is valid:

# Denon AVR - Mute OR Unmute sound (toggle)
  denon_mute_unmute:
    description: Toggle Denon Mute/Unmute status
    sequence:
      - choose:
        # IF Denon is currently MUTED, then unmute
        - conditions: "{{ state_attr('media_player.office_2', 'is_volume_muted') }}"
          sequence:
            - service: denonavr.get_command
              data:
                entity_id: media_player.office_2
                command: /goform/formiPhoneAppDirect.xml?MUOFF
        # IF Denon is currently UNMUTED, then mute (Note: few seconds delay in state update after change)
        default:
          - service: denonavr.get_command
            data:
              entity_id: media_player.office_2
              command: /goform/formiPhoneAppDirect.xml?MUON

Use the Template Editor to validate:

HA → Developer Options → Template → Template Editor

Template Editor to validate:

When i past it in script and ik want to save is:

Hello
I have a x2800dab denon and the same problem

I don’t find a solution at this time

Did you ever get this working?

If you can do it with the remote then likely you “train” an IR device like a broadlink to control it.

X4800h and same problem. Anyone find a fix? Thanks

So I was able to trigger the command to switch the output mode to “Mon 1” (vs Mon 2 or Auto) in the receiver by using the following code.

action: denonavr.get_command
metadata: {}
data:
  command: /goform/formiPhoneAppDirect.xml?VSMONI1
target:
  device_id: (here is where the ID of my device goes)

Can’t remember where I got it from. Either here, or AI, or another source. It does seem to work.

HOWEVER…HA is suddenly showing an error where updates are usually listed in the settings screen, which says the following:

The automation “Theater - Movie Mode” (automation.theater_movie_mode_in_work) has an unknown action: denonavr.get_command.

This error prevents the automation from running correctly. Maybe this action is no longer available, or perhaps a typo caused it.

To fix this error, [edit the automation] and remove this action.

Select Submit below to confirm you have fixed this automation.

Which is odd since it does work. Is there a better way of writing this YAML?

Nevermind. I decided to ignore the error as everything is working fine. Until it becomes an issues, I’ll consider the error to be a false alert.

I have a Denon AVR-X2300W and i never got it to work within music assistant. i tried via these: air-play, dlna, all kinds of differend codecs pcm stream, dolby codecs you name it i tried them all. i can control is via power on/off volume control no problem there. but it never plays any audio from music assistant.

i checked that the Denon AVR-X2300W is on the supported list Denon AVR Network Receivers - Home Assistant
MA works very well on all of my other speakers thru bluetooth and google-cast speakers.

really frustrated, i plan to buy another receiver that works out of the box like any receiver that supports google-cast like Onkyo TX-NR5100
Would that be a good buy for MA? or is there anyone in here who can tell me what i’m doing wrong?

Have you tried the denon HEOS integration? Or only the denon network AVR receivers integration?

Edit: I see HEOS is added a few hours ago for 2.8.0 beta 8:

No i haven’t yet. i will try that tonight. thanx!

i tried to add HEOS integration, it asks for an ip-address while adding. i entered the ipaddress of my Denon AVR-X2300W but returned an error it could not connect. i doublechecked the ip it’s correct (web interface works)

it turns out that Denon AVR-X2300W does not have HEOS compatibility