Controlling Marantz (and Denon) AVR’s

I have created an app for the Homey by Athom to control Marantz AVR’s over ethernet (I have the NR1604 model myself). See https://apps.athom.com/app/nl.marcovandenhout.marantz (version 0.0.1 has been published, 0.0.2 is in review)

This page is meant to provide some generic links and information about the protocol used. Bugs or feature requests for the app itself can be added at https://github.com/hilvarenbeek/nl.marcovandenhout.marantz/issues

PDF with possible commands (written for Denon AVR’s): http://www.awe-europe.com/documents/Control%20Docs/Denon/Archive/AVR3311CI_AVR3311_991_PROTOCOL_V7.1.0.pdf

Found out that Marantz has quite extensive documentation on their own website, for example go to http://us.marantz.com/us/Support/Pages/Manuals.aspx and you can download Excel sheets with the command lists, and also which model supports which command 🙂

Models to add:

  • Marantz NR1604 (I have this one myself, and Homey forum user MennoVanGrinsven)
  • Marantz SR5007 (Homey forum user Floris)
  • Denon AVR X2200W (Homey forum user RobertLijkendijk)
  • Denon AVR X4000 (Homey forum user JacquesHeijnders)
  • Denon AVR X2100W (Homey forum user MarkVanDerHeijden)
  • Denon AVR X1200W (Homey forum user Panda)
  • Denon AVR X1000 (Homey forum user Bart)

Athom Homey

On the 10th of February, 2016 I received my Homey by Athom. It’s a home automation hub which listens to you and speaks back, and can control all kinds of devices. It has just been released, which means there’s still quite some bugs. So I will list here what has worked for me, and what hasn’t.

Currently on version 0.8.39 (started on 0.8.17)

Bugs I’ve encountered myself:

  • https://github.com/athombv/homey/issues/94 – philips hue, lux lamps wont (all) turn off or on with command all lights off or on

Works:

  • Adding and controlling Philips Hue lights. I have an existing Hue setup with Hue, Hue Lux, Hue Whites, Livingwhites, Livingcolors and LivingAmbience lamps. Homey added them all very easily by pairing with the hub (I have a first generation hub). You can then place the lamps in rooms so you can tell homey “OK Homey, turn of the lights in the living room” and that actually works 🙂
  • Adding and controlling Eurodomest 433MHz remote sockets. I bought a set of 3 sockets and a remote at Big Bazar for €10. They work nicely. Homey can add a socket by copying the remote’s radio signal, or by pairing with the socket directly after putting it into learning mode (press the on-off button on the socket itself for a few seconds)
  • Asking the time (“OK Homey, what time is it?”). Other built-in commands: what version are you, what are you doing, testing 1 2 3… voice recognition isn’t as good as Siri (Apple iOS) or OK Google (Android) though.
  • Adding a flow that turns on and off a light at a specific time. The turn off card has a delay so it first turns on the light then after a few seconds turns it off again.
  • Fibaro Motion sensor FGMS-001. A device that looks like an eyeball and uses Z-Wave. It was quite easy to pair, however the pairing wizard doesn’t know it is a Fibaro Motion Sensor and in stead adds some generic device. On the Homey forum I read that it was supposed to be on association group 3. Whatever that means 🙂 I’m new to this Z-Wave stuff.

Doesn’t work (yet ;):

  • Adding a bluetooth speaker. Confirmed that it doesn’t work yet, although it is being worked on by Athom.
  • cloning IR remotes isn’t working very well. Tried to copy my Philips TV remote but it won’t register even though the tv itself does (while pointing the remote at Homey!)

LED ring color meanings:

Yellow: Homey is starting, please wait

Red: Homey is dead, please disconnect power and restart

Blue: Homey is downloading something, you can still use me

Pink: Homey is updating, do not disconnect power

Orange: Homey is listening to your voice command

White: Homey is analysing your voice online

Rainbow: Homey is operational and waiting for an event

REST API:

Find the bearer token to use with the Authorization: Bearer HTTP header in the REST API:

go to my.athom.com, log in to your account, copy the link address of the homey picture, paste as text in a text editor, write down the bearer_token

tip: use https://www.getpostman.com/ to create the proper requests

Programming for Homey

I got my first Homey app working thanks to the documentation at https://developers.athom.com/library/introduction. I am creating an app to control my Marantz NR1604 receiver over the network (using the telnet-like interface over TCP).

The app (driver) is now online 🙂 https://apps.athom.com/app/nl.marcovandenhout.marantz

It should also work for similar Denon AVR’s which have the same network interface.

 

Kringloopwinkelen

Kringloopwinkels zijn altijd leuk om even rond te neuzen en om spullen te kopen die iemand anders niet meer nodig had, maar die nog bruikbaar zijn.

De volgende kringloopwinkels heb ik bezocht:

Rotterdam 2015/01/18

Today I had a great day, seeing Marike Jager perform at ‘Kantine Walhalla’ in Rotterdam. The show was amazing, not only Marike’s awesome songs and voice, and Henk Jan Heuvelink’s expressive piano playing, but also because of the addition of a live ‘projectionist’. Visuals were not done simply using an LCD projector, but using real ‘analog’ items on an overhead projector or by actual shadow play. Just like with Audiomachinist’s machines on the ‘Here comes the night’ tour, the additions work very well.

At the show I didn’t take any pictures, but afterwards I took some while walking through the city of Rotterdam. Have a look at the slideshow!

Good company, bad company

Quite often you read about companies or shops doing ‘good’ and ‘bad’ things, like recycling materials or using sweatshops. It’s quite hard to keep track of this. So for myself I decided to make a list of products I care about and what I learn about the companies that sell them. It’s a personal list that will never be complete, but that’s not the goal.

    Other lists and organisations that help determining good and bad things about companies

  • Fair Wear Foundation
    Bad or questionable raw materials

  • Angora wool. Often plucked in a violent way from live rabbits (source: Tros TV Kassa, 2013/11/25)
  • Sheep wool is sometimes bad, e.g. when mulesing is involved.
  • Fur. Fur animals are bred only for their skin, which is worse than leather. Fur can be imitated quite succesfully using synthetic materials
  • Silk. Silkworms are boiled alive

Controlling Philips Hue lamps with a Pebble smartwatch

As far as I know, at this moment there is no direct way to control Philips Hue lamps using a Pebble smartwatch. A workaround is possible though, with the help of a webserver that sends the right commands to the Hue bridge as you visit a specific webpage. Here’s how I did it.

Short demonstration on Youtube

What I used:

  • Philips Hue starter pack including Hue bridge (plus several Hue, Living Colors and Living Whites lamps which can be controlled by the bridge)
  • iPhone 4S
  • Pebble smartwatch
  • Smartwatch Pro app for iOS and the included WatchApp to be run on the Pebble
  • PC acting as a webserver (eeepc 4G, an older and relatively cheap netbook) on my local network
  • Debian GNU/Linux with Apache, PHP5, Phue, Composer, php5-curl

The steps as I recall them:

  • Make sure you can control the lamps using the Hue app for the iPhone.
  • Register your own ‘username’ with the Hue bridge as explained in http://developers.meethue.com/gettingstarted.html (Phue includes a tool to do this as well). You can test if you can control the lamps from your web browser using the Clip debugger.
  • Install Debian GNU/Linux on a suitable machine (just about any pc-like system that you can keep running on your network). For installation instructions, see http://www.debian.org/distrib/ At installation, make sure you select the task webserver. A full desktop system is not necessary for this purpose.
  • The Apache webserver and PHP5 should already be installed. If not already done, install package php5-curl (aptitude install php5-curl) as well.
  • Install Composer. At this moment it’s not an included package, so you can use these steps:
apt-get install curl
curl -s https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
  • Make a subdirectory (folder) in /var/www where your webpages will be located.
  • Install Phue by creating a composer.json file in the web folder
{        
"require": { "sqmk/phue": "*" }
}

and then running

composer install
  • create php webpages like the following (call it lamp1.php for example). Make sure you have the right IP address of the Hue bridge and the previously registered username.
<html>
  <head>
    <title>Turn on lamp 1</title>
  </head>
  <body>
     <h1>Lamp 1</h1>

<?php

require_once 'vendor/autoload.php';

$client = new PhueClient('192.168.1.2', 'thisismyhueusername');

try {
    (new PhueCommandPing)->send($client);
} catch (PhueTransportExceptionConnectionException $e) {
    echo 'There was a problem accessing the bridge';
}

// Manually send command to get light by id
$light = $client->sendCommand(
    new PhueCommandGetLightById(1)
);
echo $light->getName(), "n";
$light->setOn(true);
// Setting brightness (0 for no light, 255 for max brightness)
$light->setBrightness(255);
// Set color temp (153 min, 500 max), changes color mode to 'ct'
$light->setColorTemp(400);

?>

  </body>
</html>
  • Open the created webpage from a web browser in your network and see if it works.
  • Install the iOS app Smartwatch Pro, run it and install the watchapp on your Pebble. It doesn’t have to be Smartwatch Pro, but any app that can open a web address by pushing a button on the Pebble.
  • In Smartwatch Pro on the iPhone, enable the HTTP requests option, and add a HTTP request to the webpage you just created.
  • In the Smartwatch watchapp on your Pebble, select the HTTP request and enjoy 🙂

To see what you can do with Phue, check https://github.com/sqmk/Phue and the Hue developers information at http://developers.meethue.com/

 

The accident

On July 7th, 2013 I was photographing the FIA GT Series race at Circuit Park Zandvoort, when the number 14 Audi R8 LMS Ultra of Portuguese driver César Campaniço had a problem braking for the Tarzan corner and smashed right into the guardrail behind which I was crouching. The car bounced back, spinning across the track and ended up badly damaged in the gravel on the outside of the corner. Luckily no other cars were hit and the driver walked away from the car on his own.

I wasn’t so lucky myself. When the car hit the guardrail, it flexed just enough to send me flying. I ended up on the grass a few meters away, noticed I couldn’t stand up and waved for the marshalls. Right away help came, and being at a circuit the medical staff was very quick to arrive as well. I had a neck brace put on and was taken to the circuit’s medical room. Another ambulance brought me to hospital for surgery. I have had surgery to the knee and hip again at another hospital. Recovery will take months but luckily my other leg and upper body are fine. For those who don’t know, I was not a spectator but an accredited photographer and it was a relatively safe spot but anything can happen in motorsports with ‘only’ a barrier inbetween you and a fast car.

There’s plenty of news articles and YouTube clips if you want to see the crash and me flying. Needless to say I won’t be leaving home a lot in the coming months…

update 2013/11/03: I can now walk with crutches and stand on two feet, which is a relief. Still a long way to go for full recovery, but getting better in little steps…

update 2016/01/09: A lot has changed since the last update, I can walk, ride my bicycle, climb and go down stairs without aids. I’m working full-time again. I still have ‘drop foot’ but I’m not afraid of tripping. Still need physiotherapy twice a week and can’t go running but I pretty much lead a normal life again 🙂

1 2 3