code: function runCalc(node, msg, blinds, sunPosition, weather) {
      var i;
      for (i in blinds) {
        var previousBlindPosition = blinds[i].blindPosition;
        var previousSunInWindow = blinds[i].sunInWindow;
        var previousBlindPositionReasonCode = blinds[i].blindPositionReasonCode;
  
        calcBlindPosition(blinds[i], sunPosition, weather);
        if (
          blinds[i].blindPosition != previousBlindPosition ||
          blinds[i].sunInWindow != previousSunInWindow ||
          blinds[i].blindPositionReasonCode != previousBlindPositionReasonCode
        ) {
          msg.payload = blinds[i];
          msg.data = {
            channel: blinds[i].channel,
            altitude: sunPosition.altitude,
            azimuth: sunPosition.azimuth,
            blindPosition: blinds[i].blindPosition
          };
          msg.topic = "blind";
          node.send(msg);
        }
      }
    }
docs: /*
  For each blind, run the blind calculation process and if a different
  position is determined send a message with the new position for the
  channel.