Hello,
I think the basic function works but it is difficult to verify. In addition I think the function can be improved as described a little further below.
To make it easier to verify the function, I suggest that you temporary change the time settings to much smaller values and then set the PC clock so that you are simulating a sun down state. I have made my settings like this:
I have two controllers running with the same settings and they are activating ON/OFF randomly with some difference in between as I expect. If you change the external trigger with "eg.plugins.Suntracker.SetMovingGhostON()" or "eg.plugins.Suntracker.SetMovingGhostOFF()" you will have to wait until the beginning of the next minute before it has an effect.
I defined two simple macros to toggle the function (just using a simple RF remote control, the disabling/enabling the macros when they are triggered, is not needed actually)
Also, a limitation with the current implementation, when the Global Moving Ghost (GMG) function ends, it leaves the lamps "as is" and there state will not be changed until the next standard ON/OFF event occurs (or if the GMG is started again). There is a little bug I found here as well; if you had synchronization checked, it will not start again after the GMG once have ended. There is room for improvements, including fixing the bug of course.
In the attached version below, I have made the changes accordingly:
- a running control with synchronization active will now correctly return to this when the GMG ends
- lamps will still be left "as is" when the GMG ends
- lamps will after this be correctly synchronized
- when the synchronization takes place (if selected and checked in the settings)
- at normal ON/OFF times
- if/when the GMG is started again
- you still have to allow time to elapse to the next minute until you see an effect when starting/ending the GMG
- there is now a printed statement in the log when the GMG is starting and ending (this can easily be commented out when we have verified that everything is working as expected)
Best regards, Walter
PS We do not have a problem with the Local Moving Ghost functions since there we are restarting the controller if you change the setting