Things to do with your network-connected Denon/Marantz receiver

This post will focus on the things you can do with your network-connected Denon/Marantz receiver. I bought my Denon AVR-3808 in 2007, so it’s actually my very first IoT device. Unfortunately my receiver doesn’t support the newer HTTP/XML-based protocol or streaming services, but the old telnet-based AVR protocol still gives a lot of opportunities.

So without further ado, a walk-through of options I know of…

App control
Denon doesn’t support the AVR protocol in their app, so third party apps are the only options for me. If you have a newer receiver you won’t have that problem. I’ve been using AVR-Remote for Denon/Marantz for years. It’s a bit old, but still works.

Control with Yatse
Another use within Android is volume control and more within Yatse. Yatse is a full-featured Kodi remote control app and much more. If you have a Kodi media center and an Android device, you should definately give Yatse a chance. And if you use Yatse and own a Denon/Marantz receiver, you should try the Denon/Marantz plugin. Please note that this is a shameless recommendation, since I’m the developer of this plugin.

Control with Tasker
Into automation and using Tasker? Yet another use within Android. Use Denon/Marantz plugin to automate interaction with your receiver. Yes, this is the same plugin as mentioned in previous chapter. Example usages:

  • Mute receiver when phone rings.
  • Use as clockradio: Turn on receiver on radio at 6:00 in the morning.
  • Turn off the receiver when leaving home.
  • Well, whatever you can think of.

openHAB
Staying with automation, integrate your receiver into your home automation when using openHAB. I’m not using this binding myself, since it constantly occupies the only connection available for the AVR, so it would block all other usages. If you have a newer receiver, you won’t have that problem. Instead, I can integrate through the Logitech Harmony binding.

Linux shell script
I wrote this small script years ago and scheduled it to to be run by cron daemon on my server at midnight. Purpose was to save energy in case I’d forgotten to turn off my receiver. It demonstrates how to send a simple command from a shell script, but other than that it’s obsoleted today by openHAB rules or similar.

#!/bin/bash
# Written by Jacob Laursen , 2009-2011.
#
# This script turns off a Denon receiver if none of the listed
# hosts to be checked are up and running.
#
# Options:
# --force : Skip host checking, just turn it off.

HOST_CHECK=`echo {"ps3","smarttv"}`
HOST_DENON="denon"

standby ()
{
        {
                sleep 2
                echo -n -e "PWSTANDBY\r"
                sleep 2
        } | telnet >/dev/null 2>&1 $HOST_DENON
}

if [ "$1" == "--force" ]; then
        standby
        if [ $? == 0 ]; then
                echo "Power turned off"
        else
                echo "Already turned off"
        fi
        exit
fi

host_up=0

for host in ${HOST_CHECK}
do
        ping >/dev/null -c 1 $host

        if [ $? == 0 ]; then
                host_up=1
                break
        fi
done

if [ $host_up == 0 ]; then
        standby
fi

Logitech Media Server/Squeezebox plugin
For controlling volume from my Squeezebox Receiver I’m using DenonSerial v0.1.42 extension by Peter Watkins. I’m not sure where to find it today, as it’s quite old – but still working nicely. An alternative might be DenonAvpControl, but I haven’t tried that.

The purpose of this extension is to set fixed volume to 100% on the Squeezebox Receiver and instead control volume on the Denon receiver. Using this extension should work no matter how you control your Squeezebox Receiver. However, the app (or whatever) must support sending volume commands even for players with fixed volume configured. The Android app Squeeze Ctrl supports this. The ancient, but still excellent, Squeeze Commander does not.

Controlling IKEA Trådfri bulbs with Philips Hue bridge

I wanted to be able to control a specific lamp with my Logitech Harmony remote, so I did bit of research. I wanted to join the Philips Hue ecosystem, but haven’t been able to find the bulbs I need so far. For this specific lamp I needed an E27 bulb with 1,000 lumen and preferable a CRI higher than 90. Otherwise I would compromise the quality of the light just for playing around. If I was to going to play, I should at least be able to maintain what I already had.

I found out Philips Hue as well as IKEA Trådfri actually implements the same standard: Zigbee Light Link (ZLL), and should be able to work together. Well, at least since recently. From what I learned, IKEA seriously fucked up in their first versions which supported only Zigbee Home Automation (ZHA) instead of ZLL. And at the other end, Philips removed support for ZLL to ZHA fallback. So, now I needed a pretty recent bulb, or a firmware update of the bulb with an IKEA Trådfri gateway I wasn’t planning on buying.

Products
I bought the following to get started:

Adding the bulb
I followed this guide to pair the IKEA bulb with the Hue bridge. My bulb was from batch 1746 (printed on the box close to the barcode) and is firmware version 1.2.214 which is good enough (should be at least 1.2.x). I had to retry the pairing process a few times, probably because I didn’t turn the bulb on/off fast enough (six times) when trying to reset it. But finally it showed up in the Hue app, and I was able to turn it on/off as well as dim it. Excellent!

Philips Hue Bridge 2.1
The bridge was super easy to configure and just works. I haven’t played with API’s etc. yet, but can enjoy the big Philips Hue ecosystem and endless integration possibilities. I see absolutely no reason to start building a system based on the relatively new IKEA gateway when you only need the slightly more expensive Hue bridge to use everything developed for the Hue system.

Integrations
First thing after being able to control the bulb with the Hue app and the Dimmer switch was to set up my Harmony remote. This turned out to be difficult because of bugs in the Logitech Harmony software. I already had Hue set up for a Hue emulator running on openHAB, so I removed this. After doing so, the Harmony app kept detecting the Hue bridge without being able to pair with it, even when disconnecting both openHAB and the Hue bridge from the network. The trick/work-around was to search for a Hunter Douglas PowerView Hub. Cancel the search, then try again to search for the Hue bridge. After this I was able to pair with it. The same problem occurred after changing IP address of the Hue bridge. Having two bridges is not supported and you can’t even configure the right one if you actually have two – so one of them must go offline before configuring Harmony. Great work, Logitech.

Anyway, after setting it up, it was very easy to configure the “Watch TV” activity to dim the bulb down using the pre-configured Nightlight scene. However, this immediately turned out to be a problem: If the bulb is already off when turning on the TV, it should stay off. It seems that even simple rules like this requires more sophisticated methods.

openHAB
In openHAB 2.2 it was very easy to get the Philips Hue binding working, and the first project was already defined: Dim the bulb to 30% when turning on the TV and the current dim value is higher than 30%. First thought was to use the Hue emulator in Hue, so the Harmony would control this and then build the logic in openHAB from there. However, I decided to simplify this while at the same time decoupling the logic from the Harmony remote and make it generic. By using the Samsung binding for my TV (alternatively a network binding would suffice), I could create an item-based rule like this:

rule "TV"
when
    Item TV_is_on changed from OFF to ON
then
    if (DimmableLight1_Brightness.state > 30)
    {
        DimmableLight1_Brightness.sendCommand(30)
    }
end

Power consumption

  • Philips Hue Bridge 2.1: 1.7 W
  • IKEA Trådfri E27 1000 lumen LED bulb: 13.0 W (on)
  • IKEA Trådfri E27 1000 lumen LED bulb: 0.3 W (off)

Future
Philips is planning on supporting Zigbee 3.0 in the bridges in first quarter of 2018. This will be backwards compatible with ZLL, so IKEA bulbs should continue to work, since they now got the ZLL implementation right with the latest firmware.