Node-red failure detection

Hi, I use Node red as an interface to MQTT.
Node red server and mqtt server are both running on an orange pi.
Both these servers are stable but every few days I lose connection to the Blynk cloud server then I either have to re-deploy the node red nodes or reboot the orangepi.
I have a a python mqtt listener on the orangepi which enables me to send an mqtt command to reboot the machine.
I would like to be able to detect when a disconnection has taken place with the node-red environment and send the mqtt reboot command.
I have played about with the input/output nodes of blynk but have failed so far to find a way to detect the disconnection.
Does anyone have a suggestion of how to do this?
Thanks.

Latest attempt.
I have installed the node-red ping node and am pinging the blynk server at cloud.blynk.cc
If it fails then it will do a reset (with a bit of extra code so it will not reset continuously).
I’ve not had a disconnection yet so will see what happens.

Should be blynk-cloud.com

‘Should be blynk-cloud.com

ok thanks

Any idea why some nodes are disconnecting and some are not…