const online = previousStatus || lastSeen === 0 ? lastSeen - 180000 > previousStatus : true;
My nodes are all stuck online and I cant get the offline trigger to fire. I assume its because this line is incorrect. I believe previousStatus gets read as true or false, and not time in milliseconds.