Venus OS on Raspi programed reboot

I have noticed that as days go past Venus os starts loosing digital input signals and sometimes even connection via usb to some devices. Or freezes the screen, gets slower, etc. I would like to reboot from the settings - general - reboot option periodically. ChatGPT suggests the following:

Sic

If you want to automate this clean reboot, you can use the DBus API in Venus OS. Here’s how you can schedule a safe reboot:

  1. Using the Command Line

You can trigger a safe reboot with:

dbus-send --system --print-reply --dest=com.victronenergy.system /Shutdown com.victronenergy.system.shutdown int32:1

This mimics the reboot option in the menu.

  1. Automate It with Cron

If you want to reboot automatically at, say, 3 AM every day:
1. Open the crontab:

sudo crontab -e

2.	Add this line:

0 3 * * * dbus-send --system --print-reply --dest=com.victronenergy.system /Shutdown com.victronenergy.system.shutdown int32:1

This will safely reboot Venus OS without abruptly cutting power.

Does this make sense? I’m not very proficient in programming.

If you load Node Red you can do this through a Node Red flow. You set the inject node to send a signal on your required schedule which goes to a trigger node which normally sends the number 0. When the scheduled reboot occurs the trigger sends the number 1 for 1 second to a custom output node which sends a reboot command to Venus OS. Images below along with a text file containing the json for the nodes.

image

Scheduled reboot.txt (1.7 KB)

Thanks for that clever angle i had not thought about! I will need to update mi Venus OS to Large and latest firmware. Fingers crossed!!