Logic Machine Forum
Disable A Schedule with a Script / Group Address - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Disable A Schedule with a Script / Group Address (/showthread.php?tid=2682)



Disable A Schedule with a Script / Group Address - jamesng - 11.06.2020

Hi

I have a number of schedules which run scripts to open / close blinds at various times of the day.   The same scripts can be run ad-hoc by adjusting sliders on a visualisation.

Is there a way to deactivate / activate a group of schedules from a script - ie: to temporarily stop the automated opening / closing of the blinds.

I contemplated calling script.disable() however I need the scripts to remain enabled at all times to support ad-hoc adjustments of the blinds.

Kind Regards
James


RE: Disable A Schedule with a Script / Group Address - Daniel - 11.06.2020

Schedulers have option to disable/enable by object.


RE: Disable A Schedule with a Script / Group Address - jamesng - 11.06.2020

Hi Daniel

Where do I specify the object to disable / enable a particular schedule?

I can't seem to find this only the option to run / not run on holidays. This would work too if I could dynamically / remove holidays with a script.

Kind Regards
James


RE: Disable A Schedule with a Script / Group Address - Daniel - 11.06.2020

Here
   


RE: Disable A Schedule with a Script / Group Address - jamesng - 11.06.2020

Hmm ... I don't have that option. For this project we're working with the Clipsal / Schneider 5500SHAC which seems to have an older version of the firmware without this.

Kind Regards
James


RE: Disable A Schedule with a Script / Group Address - Erwin van der Zwart - 11.06.2020

Hi,

Then you need to do it like we did in the past (before the option was added)

Create a scheduler to a virtual object and add this script to it:
Code:
blocking = '1/1/1'
output = '1/1/2'

if grp.getvalue(blocking) == false then
   grp.write(output, event.getvalue())
end
This creates a AND port on the scheduler and blocking object

BR,

Erwin


RE: Disable A Schedule with a Script / Group Address - jamesng - 11.06.2020

Hi Erwin

I'm not sure I understand.

I gather 'blocking 'is the object which the user would toggle on / off with a button on a visaalisation (to enable / disable a scheduler task)

And 'output' is my scheduler object - which in my case controls the position of the blind.

Where does the if statement go?

Kind Regards
James


RE: Disable A Schedule with a Script / Group Address - Daniel - 11.06.2020

Output of your scheduler goes let say to 0/250/0 and it triggers Erwin's script. Output is the group which goes to your script. The blocking group can be added to visu and if it is false then schedule events will be sent if it is true then schedule events will be blocked.


RE: Disable A Schedule with a Script / Group Address - jamesng - 11.06.2020

Ahhh .. I understand!

Thanks you both for explaining.

Kind Regards
James


RE: Disable A Schedule with a Script / Group Address - gkentsis - 26.12.2020

(11.06.2020, 13:41)Daniel. Wrote: Here

Hi

I setuped a scheduler on/off object but when i change activate option from scheduler tab, the object doesnt update it.

thxs


RE: Disable A Schedule with a Script / Group Address - Daniel - 27.12.2020

This works only one way.