     // Battery voltage should not drop too much
     if (selftest.batteryVoltageMv < conf.alertBatteryVoltage) {
       selftest.passed = false;
-      sprintf(buf, PSTR("Weak battery: %dmV"), selftest.batteryVoltageMv);
+      sprintf(buf, PSTR((char*)pgm_read_word(&(str_Weak_battery_dmV))), selftest.batteryVoltageMv);
       raiseAlert(DcPumpMalfunction, buf);
       return;
     }
     // Determine if water level was reduced enough
     if (selftest.startingHeight - selftest.endingHeight < 5) {
       selftest.passed = false;
-      sprintf(buf, PSTR("DC Pump failure: %dCM pumped in %d sec."), (selftest.startingHeight - selftest.endingHeight), (int)selftest.testLength);
+      sprintf(buf, PSTR((char*)pgm_read_word(&(str_DC_Pump_failure_dCM_pumped_in_d_sec))), (selftest.startingHeight - selftest.endingHeight), (int)selftest.testLength);
       raiseAlert(DcPumpMalfunction, buf);
       return;
     }

      
  if (range.distance > conf.alertWaterLevel) {
    char tmp[40];
    sprintf(tmp, PSTR("Water level: %d"), range.distance);
    raiseAlert(WaterLevel, tmp);
  }
  return range.distance;

{
  // Process RS-485 commands
  if (net.messageReceived()) {
    if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_alertPresent)))) || net.assertCommand(PSTR((char*)pgm_read_word(&(str_alarmPresent))))) {
      if (alert.present) {
        if (alert.acknowledged) {
          net.sendResponse(PSTR((char*)pgm_read_word(&(str_YES_Ack_ed))));
        } else {
          net.sendResponse(PSTR((char*)pgm_read_word(&(str_YES))));
        }
      } else {
        net.sendResponse(PSTR((char*)pgm_read_word(&(str_NO))));
      }
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_alertReason))))) {
      net.sendResponse(alert.condition);
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_getDistance))))) {
      net.sendResponse(itoa(readDistance(), buf, 10));
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_getPressure))))) {
      net.sendResponse(itoa(readPressure(), buf, 10));
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_getBattVoltage))))) {
      sprintf(buf, (char*)pgm_read_word(&(str_dmV)), readBatteryVoltage());
      net.sendResponse(buf);
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_getAcPumpOnTime))))) {
      if (acpump.currentlyOn) {
        sprintf(buf, (char*)pgm_read_word(&(str_d)), acpump.onSeconds + (now() - acpump.switchOnTime));
      } else {
        sprintf(buf, (char*)pgm_read_word(&(str_d)), acpump.onSeconds);
      }
      net.sendResponse(buf);
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_getLastSelfTest))))) {
      sendSelfTestResponse();
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_forceAlert))))) {
      raiseAlert(ExternallyForced, PSTR((char*)pgm_read_word(&(str_Force_command))));
      net.sendResponse(PSTR((char*)pgm_read_word(&(str_OK))));
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_resetAlert))))) {
      resetAlert();
      net.sendResponse(PSTR((char*)pgm_read_word(&(str_OK))));
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_startSelfTest))))) {
      dcSelfTestStart();
      net.sendResponse(PSTR((char*)pgm_read_word(&(str_OK))));
    } else if (net.assertCommandStarts(PSTR((char*)pgm_read_word(&(str_set))), buf)) {
      processSetCommands();
    } else if (net.assertCommand(PSTR((char*)pgm_read_word(&(str_debug))))) {
      sendDebugResponse();
    } else {
      net.sendResponse(PSTR((char*)pgm_read_word(&(str_Unrecognized_command))));
    }
  }
  
