It looks very interesting. I complied and uploaded successful, but it ran without run the loop function at all. infrared sensor lighted up but no print out attached Serial.print.
Can you give us the url to the library #include <MySensors.h>?. I am using MySensors 2.3.1 loaded from Adruino IDE->Tools->Manage Libary->search My Sensors from https://www.mysensors.org
4:55:53.476 -> 60127 TSM:FAIL:RE-INIT
14:55:53.476 -> 60129 TSM TSM:FAIL:DIS
14:55:53.476 -> 900384 TSF:TDI:TSL
14:55:54.962 ->
14:55:54.962 -> __ __ ____
14:55:54.962 -> | / |_ / | ___ _ __ ___ ___ _ __ ___
14:55:54.962 -> | |/| | | | _ \ / _ \ _ \/ __|/ _ \|
_/ __|
14:55:54.962 -> | | | | || || | / | | _ \ _ | | _
14:55:54.962 -> || ||_, |/ ___|| ||/_/|| |/
14:55:54.962 -> |__/ 2.3.1
14:55:54.962 ->
14:55:54.962 -> 16 MCO:BGN:INIT NODE,CP=RNNNA---,REL=255,VER=2.3.1
14:55:54.962 -> 26 TSM:INIT
14:55:54.962 -> 27 TSF:WUR:MS=0
14:55:54.997 -> 33 !TSM:INIT:TSP FAIL
14:55:54.997 -> 35 TSM:FAIL:CNT=1
14:55:54.997 -> 37 TSM:FAIL:DIS