code: public JSONArray construct(boolean server) {
          JSONArray dnd = new JSONArray();
          if (server){
              JSONObject srv = new JSONObject();
              srv.put("start_hour", start.getHourOfDay());
              srv.put("start_minute", start.getMinuteOfHour());
              srv.put("end_hour", end.getHourOfDay());
              srv.put("end_minute", end.getMinuteOfHour());
              srv.put("enabled", enabled ? 1 : 0);
              dnd.put(srv);
          } else {
              dnd.put(start.getHourOfDay());
              dnd.put(start.getMinuteOfHour());
              dnd.put(end.getHourOfDay());
              dnd.put(end.getMinuteOfHour());
          }
          return dnd;
      }
docs: Construct the message the vacuum sends to the controlling device or the device sends to the vacuum.
  @param server True if the constructed message is in the format from vacuum to controlling device.
  @return The constructed message.