Hello,
I'm going to try this approach, restarting the gateway every 2 hours. It's not pretty, in fact it's very, very ugly :)
I've got no credit for this code, a bit of reading of documentation, and a large part generated by an AI prompt (I'm doing with my limited means, sorry)
// Script to restart the Shelly BLU Gateway every 2 hours
// Print a message when the script starts
print("Shelly BLU Gateway restart script started.");
// Function to restart the device
function rebootShelly() {
// Call the reboot function via Shelly API
Shelly.call(
"Shelly.Reboot", // Use the API command to restart the device
{},
function(result, error_code, error_message) {
if (error_code === 0) {
print("Restart command sent successfully.");
} else {
print("Error sending restart command: " + error_message);
}
}
);
}
// Schedule the restart every 2 hours (7200000 ms)
let reboot_timer = Timer.set(7200000, true, function() {
// Print a message just before restarting
print("The Shelly BLU Gateway is about to be restarted.");
// Call the function to restart the device
rebootShelly();
});
I'll keep you posted and we'll see tomorrow :).