@mfalkvidd I was talking about MY_NODE_ID As each device will be a gateway with onboard sensors only they all have I think 1 as ID by default and that can not be changed.
MY_MQTT_CLIENT_ID is different as I create different MQTT user/pass for each device
For 2. I created a fake sensor that I update with 1 each minute.
present(99, V_VAR1, "Status");
Then at the software side (NodeRED) I create additional logic to find out if the device is dead.