Page 1 of 1

Trigger a Python script

PostPosted: Tue Dec 12, 2017 12:19 am
by canalrun
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.

Re: Trigger a Python script

PostPosted: Tue Dec 12, 2017 2:14 am
by CliveS
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