         motorShield.setM1Speed(0);
         motorShield.setM2Speed(0);
         if (phase != IDLE) {
-            logger("EMERGENCYSTOP");
+            logger("CMD=EMERGENCYSTOP");
         }
         phase = IDLE;
         roofState = STOPPED;

            roofState = CLOSED;
            phase = IDLE;
            encoderPosition = 0;
            logger(String("CLOSED,DURATION=") + (millis()-moveStartTime));
        } else if (roofState != CLOSED && roofState != OPEN) {
            roofState = ERROR;
            phase = IDLE;

                phase = IDLE;
                if (roofState == STOPPING)
                {
                    logger("STATE=STOPPED");
                    roofState = STOPPED;
                }
                else if (roofState == OPENING)
                {
                    logger(String("STATE=OPENED,DURATION=") + (millis()-moveStartTime));
                    roofState = OPEN;
                }
                else if (roofState == CLOSING)
                {
                    logger("STATE=TIGHTENING");
                    phase = CLOSE_TIGHTLY;
                }
            }
