code: function AvrYamahaNodeIn(config) {
      RED.nodes.createNode(this, config);
  
      // Save settings in local node
      this.device = config.device;
      this.deviceNode = RED.nodes.getNode(this.device);
      this.name = config.name;
      this.devdesc = config.devdesc;
  
      // Register at config node to receive new events
      var node = this;
      if (this.deviceNode) {
        this.status({fill:"red", shape:"ring", text:"disconnected"});
        if (this.deviceNode.connected) {
            this.status({fill:"green", shape:"dot", text:"connected"});
        }
  
        this.deviceNode.register(this);
        this.deviceNode.subscribe(function(topic, payload) {
          var msg = {topic:topic, payload:payload};
          if (node.devdesc) {
            msg.devDesc = node.deviceNode.devDesc;
          }
          node.send(msg);
        }, this.id);
  
        this.on('close', function(done) {
          if (node.deviceNode) {
            node.deviceNode.unsubscribe(node.id);
            node.deviceNode.deregister(node, done);
            node.yamaha = null;
          }
        });
      } else {
        this.error(RED._("avr-yamaha.errors.missing-config"));
      }
    }
docs: /* ---------------------------------------------------------------------------
  INPUT node
  -------------------------------------------------------------------------