Controlling a Denon AVR

@Maverick… This works perfect, thanks for sharing.

One thing that I can’t seem to find is how to set the Internet Radio presets using the API.
There are other versions of the Denon AVR Control Protocol document (like this v6 doc), but for whatever reason they miss the commands to manage the Internet Radio.

Also, setting a specific frequency for the (FM) Radio does not work for me.
I tried a couple of variants of the following, based on the documentation (for 104.1MHz)
/goform/formiPhoneAppDirect.xml?TFAN104.100
/goform/formiPhoneAppDirect.xml?TFAN0104.10

Did you manage to get this working, or anyone has any ideas?

1 Like

Hey @JoFie I made some presets for the radio, in my case I use DAB, but that seems to work the same as FM. In my case, my 6th radio preset is for Sky Radio, for which I have a button using:

command: /goform/formiPhoneAppDirect.xml?TPAN06

Looking at the Excel I shared, I don’t think you are allowed to use decimal separators. I have uninstalled the Denon integration atm, because of the log flooding errors with the current firmware, but I would try:

/goform/formiPhoneAppDirect.xml?TFAN104100

As for the Internet Radio, I haven’t tried that either. Will try this as soon as the firmware is fixed again :grinning:

My guess would be to try the Online Music section in the Excel sheet, and try the Preset Memory commands. The ones with NSC00

In this protocol pdf the example they provide is indeed in the format TFAN105000 (for an AM station), so your proposal looks logical. But, alas…

Zone Command Parameter Function Example
Tuner Control TF AN******
(6 digits)
****.** kHz at AM band (>050000 is AM.)
****.** MHz at FM band (<050000 is FM)
TFAN105000
(1050.00kHz at AM)

I now installed the Denon Remote App on my iPhone, and will see if I can capture the messages send to the Denon. I suspect that the (latest firmware) API does not support all the commands listed in those protocol docs. Maybe the Internet Radio falls in that category, as it is not even covered in the phone App. Maybe they want to push us to “radiodenon.com” so that we can hand them over some money.


Regarding the errors…
I also had a lot of Denon-related errors when the AVR was turned off, and managed to get rid of it with the below logger settings in configuration.yaml. Especially the last entry (DenonAVR: critical) did the trick for me.

logger:
  default: error
  logs:
    homeassistant.component.media_player.denonavr: critical
    homeassistant.components.denonavr.receiver: critical
    DenonAVR: critical
2 Likes

The excel with all the commands not only lists commands that make the Denon AVR do things, but also commands that are supposed to send you something back.
I’m very interest in the “TPAN?” command which is supposed to send back the number of that the tuner is set to.
I have no clue where the reply is being sent to.
Is there a way for the DenonAVR integration to capture the response and for me to then use it?
I assume there is because after all the DenonAVR integration also knows whether the AVR is on or off and the volume etc.

@JoFie to control internet radio I’m using the HEOS integration.

1 Like

I was also looking for a way to capture the response from those Denon APIs where you can query the state of some object, but I (still) don’t know how to do so and make the data visible in HA. I posted a question in another forum, but did not get any reply.

You can get some information from the AVR by using the attributes of your Denon entity (mine is “media_player.denon_avr_2113”). Depending on what you set your AVR source to, you will get different attributes.
e.g. when listening to a “Favorites” Internet Radio:

volume_level: 0.215
is_volume_muted: false
media_content_type: music
media_title: The Rolling Stones - Start me up
media_artist: ANTENNE BAYERN 80er Kulthits
source: Favorites
sound_mode: MUSIC
sound_mode_raw: PLII Music
friendly_name: DENON AVR-2113
entity_picture: >-
  /api/media_player_proxy/media_player.denon_avr_2113?token=bd68929&cache=70058e3f222
supported_features: 85949

You could then show the wanted attribute value in your UI using something like this:

${states['media_player.denon_avr_2113'].attributes.source}
${states['media_player.denon_avr_2113'].attributes.media_title}

And for the volume, you have to multiply the attribute value with 100 if you want to show it as an integer instead of a fraction:

${Math.round((states['media_player.denon_avr_2113'].attributes.volume_level)*100)}

My HA is currently down because of a corrupt SSD, else I could be more specific. It actually crashed the night I completed a reasonably nice Denon interface, so it was not included in a snapshot/backup yet. But if I’m lucky I can still recover the data on the SSD, then I will share it here.

So it turns out it is possible to get information about the status of the AVR using the commands documented in the Excel.
Basically you send a status request like /goform/formiPhoneAppDirect.xml?TPAN? (the command to ask what DAB channel is being used) using for example the DenonAVR integration.
You can then catch the reply using this node which you can install in the node-red addon:

Just to give some pointers for using the input from the node:

If you ask for the used DAB channel, the node will read the following:

> {"payload":{"event":"raw","data":[84,80,65,78,48,50,13]},"_msgid":"3364990b.711646"}

If you then link a function node to it with the following code:

msg.payload = msg.payload.data.toString();
msg.payload = msg.payload.replace(/\r/g,"");
return msg;

The output of that function node will be:

{"payload":"TPAN02","_msgid":"b645b255.5e441"}

You then know that the DAB channel is set to the second channel.
The reason the function node also has this replace functionality is that there is a carriage return “\r” at the end of TPAN02 that we need to remove to be able to work with it :slight_smile:
Obviously the DAB channel is just an example.

This input node will by the way also give feedback even if you don’t ask for it. So if you for example you use the remote control or denonavr to mute your receiver, this input node will return “MUON” as msg.payload.

1 Like

Thanks for that information.
I’ve been using the other Denon palette in Node Red, but it doesn’t provide the Denon’s reply.
Going to try this palette instead, and see how it works.

Randy

Below is a panel I made to control my Denon AVR, should anyone be interested.

Some notes:

  • It makes use of the Custom Button Card.
  • Replace my entity id “media_player.denon_avr_2113” with your own AVR entity.
  • The buttons only cover functions I want to use in HA, mainly internet radio. A lot of stuff is missing, like DVD controls etc. Change/add buttons as you need, using the API commands from this list .
  • I use scripts to help with some of the functionality. The definitions are given below.
  • Change the colors to match your scheme.



type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        entity: media_player.denon_avr_2113
        name: Denon
        color_type: label-card
        show_state: true
        icon: |
          [[[
            if (entity.state == 'off')
              return "mdi:amplifier-off"
            else if (entity.attributes.source == 'TV AUDIO')
              return "mdi:television-classic";
            else if (entity.attributes.source == 'DVD')
              return "mdi:music-circle-outline";
            else if (entity.attributes.media_title == 'AirPlay')
              return "mdi:cast-audio"
            else if (entity.state == 'playing' || entity.attributes.source == 'FM')
              return "mdi:radio"
            else
              return "mdi:cast-connected";
          ]]]
        size: 90%
        styles:
          card:
            - height: 175px
            - border-radius: 5%
            - background-image: >-
                linear-gradient(90deg, rgba(13, 44, 99,1) 0%, rgba(9, 34, 79,1)
                7%, rgba(81, 132, 224,1) 100%)
            - padding: 4%
            - padding-left: 6%
            - color: lime
            - font-size: 13px
            - text-shadow: 1px 1px 5px black
          icon:
            - color: lightgrey
            - margin-top: 1%
            - padding: 0px 10px 0px 0px
          img_cell:
            - justify-content: end
            - align-items: start
          name:
            - font-weight: bold
            - color: white
            - font-size: 33px
            - padding: 10px 0px 5px 170px
          state:
            - font-weight: bold
            - font-size: 16px
            - justify-self: middle
            - padding: 0px 10px
          grid:
            - position: relative
            - grid-template-areas: >-
                "n . i" "volume . i" "muted . i" "source . i" "title title
                title" "artist artist s" 
            - grid-template-columns: 1fr 1fr 1fr
            - grid-template-rows: 1fr min-content min-content min-content min-content
          custom_fields:
            volume:
              - padding-top: 15px
              - padding-bottom: 2px
              - align-self: middle
              - justify-self: start
            muted:
              - padding-bottom: 2px
              - align-self: middle
              - justify-self: start
            source:
              - padding-bottom: 2px
              - align-self: middle
              - justify-self: start
            title:
              - padding-bottom: 2px
              - align-self: middle
              - justify-self: start
            artist:
              - align-self: middle
              - justify-self: start
        custom_fields:
          volume: |
            [[[
              if ( entity.state == 'off' )
                return ``
              else 
                return `<ha-icon
                icon="mdi:volume-high"
                style="width: 18px; height: 17px; color: deepskyblue;">
                </ha-icon><span> &nbsp; Volume: &nbsp;<span style="color: var(--text-color-sensor);">${Math.round((states['media_player.denon_avr_2113'].attributes.volume_level)*100)}</span></span>`
            ]]]
          muted: |
            [[[
              if ( entity.state == 'off' )
                return ``
              else 
                return `<ha-icon
                icon="mdi:volume-off"
                style="width: 18px; height: 17px; color: deepskyblue;">
                </ha-icon><span> &nbsp; Muted: &nbsp; &nbsp;<span style="color: var(--text-color-sensor);">${states['media_player.denon_avr_2113'].attributes.is_volume_muted}</span></span>`
            ]]]
          source: |
            [[[
              if ( entity.state == 'off' )
                return ``
              else 
                return `<ha-icon
                icon="mdi:dlna"
                style="width: 18px; height: 17px; color: deepskyblue;">
                </ha-icon><span> &nbsp; Source: &nbsp; <span style="color: var(--text-color-sensor);">${states['media_player.denon_avr_2113'].attributes.source} </span></span>`
            ]]]
          title: |
            [[[
              if ( entity.state == 'off' || !(entity.attributes.title) )
                return ``
              else if ( entity.state == 'playing' || (entity.state == 'on' && entity.attributes.source != 'TV AUDIO') )
                return `<ha-icon
                icon="mdi:form-textbox"
                style="width: 18px; height: 17px; color: deepskyblue;">
                </ha-icon><span> &nbsp; Title: &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: var(--text-color-sensor);">${states['media_player.denon_avr_2113'].attributes.media_title} </span></span>`
              else 
                return ``
            ]]]
          artist: |
            [[[
              if ( entity.state == 'off' || !(entity.attributes.media_artist) )
                return ``
              else
                return `<ha-icon
                icon="mdi:account-voice"
                style="width: 18px; height: 17px; color: deepskyblue;">
                </ha-icon><span> &nbsp; Artist: &nbsp; &nbsp; &nbsp;<span style="color: var(--text-color-sensor);">${states['media_player.denon_avr_2113'].attributes.media_artist} </span></span>`
            ]]]
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MV15
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        color_type: blank-card
      - type: 'custom:button-card'
        entity: media_player.denon_avr_2113
        size: 25px
        name: power
        show_name: false
        show_state: false
        color_type: card
        color: 'rgb(45, 79, 140)'
        state:
          - value: 'off'
            icon: 'mdi:power'
            color: 'rgb(109, 117, 138)'
            styles:
              icon:
                - color: 'rgb(230, 235, 148)'
            tap_action:
              action: call-service
              service: denonavr.get_command
              service_data:
                entity_id: media_player.denon_avr_2113
                command: /goform/formiPhoneAppDirect.xml?MUOFF
          - operator: default
            icon: 'mdi:power-settings'
            styles:
              icon:
                - color: yellow
            tap_action:
              action: call-service
              service: denonavr.get_command
              service_data:
                entity_id: media_player.denon_avr_2113
                command: /goform/formiPhoneAppDirect.xml?MUON
      - type: 'custom:button-card'
        color_type: blank-card
      - type: 'custom:button-card'
        show_name: false
        icon: |
          [[[
            if ( states['media_player.denon_avr_2113'].attributes.is_volume_muted ) return 'mdi:volume-off';
            else return 'mdi:volume-high';
          ]]]
        size: 25px
        color_type: card
        color: 'rgb(45, 79, 140)'
        tap_action:
          action: call-service
          service: script.denon_mute_unmute
      - type: 'custom:button-card'
        icon: 'mdi:volume-minus'
        size: 25px
        color_type: card
        color: 'rgb(45, 79, 140)'
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MVDOWN
        double_tap_action:
          action: call-service
          service: script.denon_vol_decrease
          service_data:
            stepcount: 10
      - type: 'custom:button-card'
        icon: 'mdi:volume-plus'
        size: 25px
        color_type: card
        color: 'rgb(45, 79, 140)'
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MVUP
        double_tap_action:
          action: call-service
          service: script.denon_vol_increase
          service_data:
            stepcount: 10
      - type: 'custom:button-card'
        color_type: blank-card
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        name: 10
        color_type: card
        color: 'rgb(40, 69, 120)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MV10
      - type: 'custom:button-card'
        name: 15
        color_type: card
        color: 'rgb(40, 69, 120)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MV15
      - type: 'custom:button-card'
        name: 20
        color_type: card
        color: 'rgb(40, 69, 120)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MV20
      - type: 'custom:button-card'
        name: 25
        color_type: card
        color: 'rgb(40, 69, 120)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MV25
      - type: 'custom:button-card'
        name: 28
        color_type: card
        color: 'rgb(40, 69, 120)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MV28
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        icon: 'mdi:arrow-up-thick'
        size: 22px
        color_type: card
        color: 'rgb(35, 58, 99)'
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MNCUP
      - type: 'custom:button-card'
        icon: 'mdi:arrow-down-thick'
        size: 22px
        color_type: card
        color: 'rgb(35, 58, 99)'
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MNCDN
      - type: 'custom:button-card'
        icon: 'mdi:arrow-left-thick'
        size: 22px
        color_type: card
        color: 'rgb(35, 58, 99)'
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MNCLT
      - type: 'custom:button-card'
        icon: 'mdi:arrow-right-thick'
        size: 22px
        color_type: card
        color: 'rgb(35, 58, 99)'
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MNCRT
      - type: 'custom:button-card'
        name: Enter
        tooltip: Enter
        Xicon: 'mdi:subdirectory-arrow-right'
        icon: 'mdi:arrow-right-bold-outline'
        size: 22px
        color_type: card
        color: 'rgb(35, 58, 99)'
        show_name: false
        styles:
          name:
            - font-size: 14px
            - padding: 1px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?MNENT
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        name: Fav
        color_type: card
        color: 'rgb(50, 52, 97)'
        styles:
          name:
            - font-size: 16px
            - padding: 3px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?SIFVP
      - type: 'custom:button-card'
        name: iFav
        color_type: card
        color: 'rgb(50, 52, 97)'
        styles:
          name:
            - font-size: 16px
            - padding: 3px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?SIFAVORITES
      - type: 'custom:button-card'
        name: iRadio
        color_type: card
        color: 'rgb(50, 52, 97)'
        styles:
          name:
            - font-size: 16px
            - padding: 3px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?SIIRADIO
      - type: 'custom:button-card'
        name: Recent
        color_type: card
        color: 'rgb(50, 52, 97)'
        styles:
          name:
            - font-size: 16px
            - padding: 3px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?SIIRP
      - type: 'custom:button-card'
        name: TV
        color_type: card
        color: 'rgb(50, 52, 97)'
        styles:
          name:
            - font-size: 16px
            - padding: 3px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?SITV
      - type: 'custom:button-card'
        name: DVD
        color_type: card
        color: 'rgb(50, 52, 97)'
        styles:
          name:
            - font-size: 16px
            - padding: 3px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?SIDVD
      - type: 'custom:button-card'
        name: Tuner
        color_type: card
        color: 'rgb(50, 52, 97)'
        styles:
          name:
            - font-size: 16px
            - padding: 3px 0px
        tap_action:
          action: call-service
          service: denonavr.get_command
          service_data:
            entity_id: media_player.denon_avr_2113
            command: /goform/formiPhoneAppDirect.xml?SITUNER
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        name: Sky
        tooltip: Pop
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 1
      - type: 'custom:button-card'
        name: 538
        tooltip: Pop
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 2
      - type: 'custom:button-card'
        name: 100%NL
        tooltip: Dutch
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 3
      - type: 'custom:button-card'
        name: SLAM
        tooltip: Pop
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 4
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        name: SkyL
        tooltip: Lounge
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 5
      - type: 'custom:button-card'
        name: Arrow Rock
        tooltip: Rock
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 6
      - type: 'custom:button-card'
        name: Splash
        tooltip: Lounge
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 7
      - type: 'custom:button-card'
        name: Antenne
        tooltip: 80s Hits
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 8
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        name: Radio32
        tooltip: Oldies
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 9
      - type: 'custom:button-card'
        name: RTL
        tooltip: Pop
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 10
      - type: 'custom:button-card'
        name: 1Live
        tooltip: Pop
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 11
      - type: 'custom:button-card'
        name: Radio2
        tooltip: Dutch
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 12
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        color_type: blank-card
      - type: 'custom:button-card'
        name: 100% Classic
        tooltip: Cliassic
        color_type: card
        color: 'rgb(30, 45, 71)'
        styles:
          card:
            - height: 34px
          name:
            - font-size: 16px
            - padding: 2px 0px
        tap_action:
          action: call-service
          service: script.denon_favorite_station
          service_data:
            stepcount: 13
      - type: 'custom:button-card'
        color_type: blank-card
  - type: 'custom:button-card'
    color_type: label
    color: var(--primary-color)
    styles:
      card:
        - border-radius: 80%;
        - height: 20px
        - background-image: >-
            linear-gradient(90deg, rgba(13, 44, 99,1) 0%, rgba(9, 34, 79,1) 7%,
            rgba(81, 132, 224,1) 100%)


Below are the scripts used in the panel.

  • mute / unmute the AVR, based on its current status.
  • increase- and decrease volume. Double-click volume up/down will repeatedly send the volume command to the AVR 10x (effectively 5 stops, as the AVR changes 0.5 at a time).
  • selecting a station from the Favorites list. I could not find a command to directly select a specific Favorite station, so I start from the top each time and go down in the list for a specified count to find the desired position in the list. Slow, but it works.

  # 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.denon_avr_2113', 'is_volume_muted') }}"
          sequence:
            - service: denonavr.get_command
              data:
                entity_id: media_player.denon_avr_2113
                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.denon_avr_2113
              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.denon_avr_2113
                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.denon_avr_2113
                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.denon_avr_2113
          command: /goform/formiPhoneAppDirect.xml?SIFAVORITES
      - delay: 2.5
      - repeat:
          count: "{{ stepcount }}"
          sequence:
            - delay: 0.3
            - service: denonavr.get_command
              data:
                entity_id: media_player.denon_avr_2113
                command: /goform/formiPhoneAppDirect.xml?MNCDN
      - delay: 1.5
      - service: denonavr.get_command
        data:
          entity_id: media_player.denon_avr_2113
          command: /goform/formiPhoneAppDirect.xml?MNENT

9 Likes

Hi,

Does anyone have experience with Denon and Google assistant? I’m happy with the app control i currently have, but i would like to add voice control to my setup. All my light are fine, i can play and pauze, but i can’t change source. For example play spotify or play radio.

type: vertical-stack
cards:
  - type: entities
    entities:
      - type: 'custom:mini-media-player'
        entity: media_player.denon_avr_x2400h_2
        name: Woonkamer
        group: true
        source: icon
        info: short
      - type: 'custom:mini-media-player'
        entity: media_player.heos_3_l
        name: Eetkamer
        group: true
        hide:
          power: true
          source: true
        shortcuts:
          buttons:
            - id: 1
              name: Q-Music
              type: favorite
            - id: 2
              name: NPO 1
              type: favorite
            - id: 3
              name: NPO 2
              type: favorite
          columns: 3
  - type: 'custom:spotify-card'
    limit: 4
    spotify_entity: media_player.spotify_fschade
    account: default
    playlist_type: default
    default_device: Denon + Eetkamer
    hide_chromecast_devices: true
    always_play_random_song: true
    display_style: list
    hide_playback_controls: true
    hide_connect_devices: true

2 Likes

Also have an interest in it

Seems the link to the commands xlsx no longer works.
Googled for it, found this updated list: https://www.denon.com/-/media/files/documentmaster/denonna/fy21avr_denon_protocol_v02_04062020.xlsx

-edit: I downloaded the xlsx so I can use it for as long as I own my Denon :wink:

2 Likes

Anybody experience with Denon AVR-X2700H DAB?

If I go to my device
http://192.168.4.23
I’m redirected to
https://192.168.4.23:10443/‘

I tried to go to
https://192.168.4.23:10443/goform/formiPhoneAppDirect.xml?TPAN01’
but this does not seems to work.

I also tried other combinations of http/https and ports, but no response either…

Also
http://192.168.4.23/goform/Deviceinfo.xml’
gives an error…
What am I doing wrong?
Has the AVR-X2700H another API?

Any help is appreciated!

Kind regards,
Bart

Aaaaaarghhhhh

It’s listening on port 8080

http://192.168.4.23:8080/goform/Deviceinfo.xml

works!

Grtz
B

1 Like

Great that you worked it out :grinning:

Not sure if this is what you want, but within automations you don’t need the full URL and port, if you have setup the Denon integration in HA. It will provide the entities you can reach directly from HA. My automation to set the AVR to the radio tuner contains this…

data:
  command: /goform/formiPhoneAppDirect.xml?SITUNER
entity_id: media_player.denon_avr_x1600h_2
service: denonavr.get_command

edit: I’m on Denon AVR-X1600H DAB

1 Like

Hi @Maverick ,
Relative url’s are perfect.
But I’m on holiday now, so remotely I couldn’t check the results of the script (changing DAB channel), so I was just fooling around with the api over my VPN.
I could manage to power ON/STANDBY with your samples provided. I suppose changing DAB preset will work than also…

Thanx for follow-up.
When @home, I definitely will try this again.

Grtz
B

1 Like

Hi there,
i realy like the lay-out of this and trying to use it but, when i copy/paste it into my custom card i have got lots of errors like

Configuration errors detected:
bad indentation of a mapping entry (2:9)

1 | - type: ‘custom:button-card’
2 | entity: media_player.denon_avr_x …
-------------^
3 | name: Denon
4 | color_type: label-card

i have changed the entity name but still not working.
any idea how to solve this or… what am i doing wrong here.
super newby

This all looks very interesting, Just purchased an AVR x2800. BTW I have all the discrete Pronto IR codes if anyone needs them

I can see all the services available i.e. volume, source ect.

I would like to change the display brightness, i.e. if the amp comes on during the day set the display to be bright, but after sunset set to dim.

Anyone help with this?

Regards, Dave

Hi all, just got a Denon AVR and am looking into how I can control it with HA; useful thread!

Just wondering if anyone has managed to control the Bluetooth transmitter? I’m trying to get it so I can only play sound through the Bluetooth headphones late at night say, when I might be playing a game or something and not want to wake the family.

Being able to automate that would be great, or even having a toggle in the interface would mean I don’t need to find the remote and open the cabinet to use it.

Any pointers would be gratefully received!