diff --git a/src/main/java/org/myrobotlab/service/InMoov2.java b/src/main/java/org/myrobotlab/service/InMoov2.java index 247d8d37db..bd794195b8 100644 --- a/src/main/java/org/myrobotlab/service/InMoov2.java +++ b/src/main/java/org/myrobotlab/service/InMoov2.java @@ -927,10 +927,13 @@ public void onPirOn() { led.interval = 500; // FIXME flash on config.flashOnBoot invoke("publishFlash"); - String botState = chatBot.getPredicate("botState"); - if ("sleeping".equals(botState)) { - invoke("publishEvent", "WAKE"); - } + ProgramAB chatBot = (ProgramAB)getPeer("chatBot"); + if (chatBot != null) { + String botState = chatBot.getPredicate("botState"); + if ("sleeping".equals(botState)) { + invoke("publishEvent", "WAKE"); + } + } } // GOOD GOOD GOOD - LOOPBACK - flexible and replacable by python