 
   StaticJsonDocument<192> doc;
 
-  doc["ac_ok"] = digitalRead(AC_OK);
-  doc["battery_low"] = digitalRead(BAT_LOW);
+  // Because the pinup is set to pullup we read high for off.
+  doc["ac_ok"] = !digitalRead(AC_OK);
 
   JsonArray relays = doc.createNestedArray("relays");
   relays.add(is_relay_on(RELAY_0));

  pinMode(IS_2, INPUT);

  // Setup AC and Battery pins
  pinMode(AC_OK, INPUT);
  pinMode(BAT_LOW, INPUT);

  // Setup diagnosis enable pins
  pinMode(DEN_0, OUTPUT);

const char BOARD_NAME[] = "power_board";

// Meanwell UPS AC and Battery pins.
const int AC_OK = 11;
const int BAT_LOW = 12;

/*******************************************/
/* Shouldn't need to change anything below.*/
/*******************************************/

// Set initial states for each relay. Change as needed.
const bool DEFAULT_START_0 = HIGH;
