Trigger a Python script

Posted on
Tue Dec 12, 2017 12:19 am
canalrun offline
Posts: 62
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 offline
Posts: 415
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 7.4.0 : MacOS High Sierra 10.13.6 : Mac mini Server (Mid 2011) : 2 GHz Core i7. : 8 GB. : 2 x 256GB Samsung EVO 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