This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Start multiple scripts
#1
Hi, I need some guidance, I have 10 Event-based/Resident scripts that I need to be able to start from one button and stop from another button.

The scripts i have is as follows:

Event-based:

solenoid_address = '2/0/20'

value = event.getvalue()
script.set('solenoid_east', value)
grp.checkwrite(solenoid_address, value)

Resident:

solenoid_address = '2/0/20'
grp.checkwrite(solenoid_address, true)
os.sleep(60)
grp.checkwrite(solenoid_address, false)
os.sleep(300)

I have 10 similar scripts for different solenoids

If they press "start all" all the scripts should turn on, if one of the scripts was already started it just keeps running

If they press "stop all" all the scripts should stop no matter what.

And can i use the "start button" to indicate only if all solenoids is on?
And the "stop button" to indicate only if all solenoids is off.

Ohh and is it possible to add a delay so that I don't start all the scripts at the same time? (water pressure)


I don't know if my approach with individually scripts is the right way of doing it?

If not can you turn me in the right direction?
Reply


Messages In This Thread
Start multiple scripts - by Novodk - 07.11.2022, 08:13
RE: Start multiple scripts - by admin - 07.11.2022, 10:17
RE: Start multiple scripts - by Novodk - 08.11.2022, 20:28
RE: Start multiple scripts - by admin - 09.11.2022, 07:11

Forum Jump: