Thanks for the encouragement and help! So it seems as I need to create this message handler function that is referenced in the gw.begin().. And from that point any incoming messages are routed through the function?
//
void incomingMessage(const MyMessage &message)
{
if (message.isAck())
{
Serial.println("This is an ack from gateway");
}
if (message.type == V_LIGHT)
{
// Change relay state
state = message.getBool();
Serial.print ("State = ");
Serial.print (state);
// Store state in eeprom
gw.saveState(ID, state);
Serial.print("Incoming change for sensor:");
Serial.print(message.sensor);
Serial.print(", New status: ");
Serial.println(message.getBool());
}
}
//