Trigger a Python script

Posted on
Tue Dec 12, 2017 12:19 am
canalrun offline
Posts: 80
Joined: Jan 17, 2016

Trigger a Python script

Hello,
I would like to turn a switch off for 30 seconds then back on (to reset a computer device in the basement). I hope to trigger this via Domotics Pad.

(The computer device is my Internet modem and Wi-Fi router. Once I turn off the switch, my router power goes off, I lose Wi-Fi, and the ability to turn the switchback on unless it's turned on via Z-Wave from an already running script)

I'm not quite sure the best way to attack this – but I am thinking something like:

Write a Python script executed by Indigo which turns the switch off, waits 30 seconds, then turns the switchback on.

I'm not sure how to trigger the execution of this script. I'd like to do it from Domotics Pad, if possible. Is there a way?

I believe I once read that executing a Python script that contains a long sleep() will not affect Indigo if the script is run from a file. Is this true?

Thanks,
Barry.

Posted on
Tue Dec 12, 2017 2:14 am
CliveS online
Posts: 761
Joined: Jan 10, 2016
Location: Medomsley, County Durham, UK

Re: Trigger a Python script

All you need is an Action setup, no need for python.

Name 30SecOnOff
Type Turn Off (Light/Appliance Controls)
Device #Your Modem Switch#
Tick the Auto On After box and set to 30 Seconds
Click Ok

You can now run the action remotely from DomoPad and Indigo Touch

CliveS

Indigo 2023.2.0 : macOS Ventura 13.6.3 : Mac Mini M2 : 8‑core CPU and 10‑core GPU : 8 GB : 256GB SSD
----------------------------------------------------------------------------------
The best way to get the right answer on the Internet is not to ask a question, it's to post the wrong answer

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest