HomeGenie Forum
Automation Program Plugins and Wizard Scripting => Help => Topic started by: mad on October 10, 2016, 04:55:00 PM
-
Hi,
I'm trying calling my program from Scheduler handler. What is the best way to communicate from scheduler to my program?
I try this method without effect:
$$.control.ApiCall("HomeAutomation.MAdThermostat", 1000, "Thermostat.SetPointValve" , "option1/option2", function(response){} );
And second question, how debug the javascript code starting from scheduler?
Finally, what is right syntax in javascript: $$.boundModules.each.Address.join('-') ?
Thank you very much!
-
You can look at that sample for Alarm module.
Replace "HomeAutomation.HomeGenieAutomation" and "90" by your domain name and module number. then you get a pointer to your module. And then perhaps you can try :
Alarm.Thermostat.SetPointValve("Value");
-
Event "When.ModuleParameterChanged" looks good, but there is a way raise from scheduler?
Event is fired after Command.Execute() call. I need call event before (and hit the command.execute from program)
There isn't javascript command $$.program.RaiseEvent
-
Problem solved with
$$.program.WithAddress(1000).RaiseEvent
I sent pull request to fix this function.