After a longer period the inputs from my pi stop reacting.
Then i move a node and click deploy all and problem solved.
Now thinking about a cron job to deploy every night to prevent problems.
Is it possible to send a deploy all command from command line?
Or is there another way to do this?
Write the MQTT msg with a retain flag. Then, in your cron job, use a small Python or node.js (depending on your preference) script to listen for the topic, reset it and then restart the device.
In addition, I've shared before my own flow for restarting Node-RED and it is really easy on a Pi or other Linux device where you are using systemd to run Node-RED. The only thing you need to do is to ensure that the user id running Node-RED is able to do SUDO on the systemctrl command without requiring a password prompt (use visudo to make the change).