 void *server_running();           void animate_running();
 void *server_shutdown();          void animate_shutdown();
 void *server_shutdown_active();   void animate_shutdown_active();
-void *server_hungup();            void animate_hungup(byte del);
-void *server_reset();             void animate_reset();
+void *server_hungup();            void animate_hungup();
 void *server_locked();            void animate_locked();
+void *system_reset();             void animate_reset();
+void *system_shutdown();  //async trigger in function detect_heartbeat();
 
 //FSM
 typedef void *(*StateFunc)();
-StateFunc statefunc = server_bootable();
+StateFunc statefunc = server_bootable;
 
 //++++ cleanup due!
-
-byte button = 0;
-byte pushlock = UNDEFINED;
 
 int c_r = 0;
 int c_g = 0;

int cmode = 0;

int incomingByte = 0;
unsigned long heartbeat, track_last_heartbeat, track_missing_heartbeat, track_uart;
int show_missing_beat = 1;

void setup() {
  pinMode(PUSHLOCK_NO, INPUT_PULLUP);
  pinMode(PUSHLOCK_NC, INPUT_PULLUP);
  pinMode(BUTTON, INPUT_PULLUP);

  pinMode(LED_R, OUTPUT);
  pinMode(LED_G, OUTPUT);
  pinMode(LED_B, OUTPUT);
  pinMode(RUN, OUTPUT);

  attachInterrupt(digitalPinToInterrupt(BUTTON), isr_button_push, FALLING);
  attachInterrupt(digitalPinToInterrupt(PUSHLOCK_NO), isr_pushlock_change, CHANGE);
  //attachInterrupt(digitalPinToInterrupt(PUSHLOCK_NC), pushlock_open, CHANGE);

  pushlock = digitalRead(PUSHLOCK_NO);

  track_last_heartbeat = millis();
  track_missing_heartbeat = track_last_heartbeat;

    serial_flush();

    if (incomingByte == 0x108) {
      send_ok();
      signal_heartbeat_ack();
      return 1;
    } else {
      return 0;
