Jump to content
🌟 NEW Shelly Products Reveal Video! 🌟 NEUE Shelly-Produkte-Enthüllungsvideo! 🌟 ×
NOTICE / HINWEIS: iOS 18 Update and Today Widgets ×

Delay Start as an option


tavi

Recommended Posts

There are places with fluctuating power, sometimes with frequent glitches. This is not healthy for compressor appliances, like refrigerators. 

A very handy feature would be a delayed start function, ofc defaulting to 0s as factory setting. 

When auto start is set to on, to have a numeric field where the user can add the desired delay. 

IMG_0452.jpeg

Link to comment
Share on other sites

  • 3 months later...
  • QA members
On 6/1/2024 at 6:15 AM, tavi said:

There are places with fluctuating power, sometimes with frequent glitches. This is not healthy for compressor appliances, like refrigerators. 

A very handy feature would be a delayed start function, ofc defaulting to 0s as factory setting. 

When auto start is set to on, to have a numeric field where the user can add the desired delay. 

IMG_0452.jpeg

It can be done with this script

 

// Script: Delayed Relay Activation

// Delay in milliseconds (20000ms = 20 seconds)
let delay_time = 2000;

// Function to activate the relay after the delay
function activate_relay() {
    Shelly.call("Switch.Set", { id: 0, on: true });
}

// Set a timer that calls the activate_relay function after delay_time
Timer.set(delay_time, false, function(){
    activate_relay();
});

// Initialize the script at startup
Shelly.call("Switch.Set", { id: 0, on: false }); // Ensures that the relay is off at startup
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Erstelle neue...