Last active
August 8, 2025 19:56
-
-
Save liddiard/b7f80a18b9713dbf5489f85f3077f95d to your computer and use it in GitHub Desktop.
Revisions
-
liddiard revised this gist
Aug 8, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ // Simultaneously close for a few seconds, then open multiple relays to simulate an "open door" button press const relays = [0, 1]; for (const relayID of relays) { // https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Switch/#switchset -
liddiard renamed this gist
Aug 7, 2025 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
liddiard created this gist
Aug 7, 2025 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ // Simultaneously close for a few seconds, then open multiple relays to simulate an "open door" button press const relays = [0, 1] for (const relayID of relays) { // https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Switch/#switchset Shelly.call("Switch.Set", { id: relayID, on: true, toggle_after: 5, // turn off after 5 sec }); } // https://shelly-forum.com/thread/20984-how-to-instruct-to-end-script-within-script-itself/ Shelly.call('Script.Stop', { id: Shelly.getCurrentScriptId() });