Hi,
sorry for all the questions, now that HG's up and running i'm like a school kid again lol.
like everyone I want to turn on the porch and garage scones on at sunset at turn them off at 10 pm
i created the applet based on the sample in the docs and was able to get it to work, except that i had to activate it manually via the module at the scheduled time, lol . So i'm not even sure if this is where the applet should be placed. (in the group)
So I changed the code up a little:
Program Code: var porchLights = Modules.InGroup(PROGRAM_OPTIONS_STRING).OfDeviceType("Dimmer,Light");
porchLights.On();
Net.SendMessage("[email protected]", "Porch Lights Turned On", "Porch Lights were turned on at sunset." );
Trigger Code:Program.Setup(()=>
{
Program.AddControlWidget("homegenie/generic/program");
});
var sunset = Scheduler.WithName("test");
if (sunset.IsScheduling())
return true;
else
return false;
Is this the best method to perform this?, i'm assuming the trigger code would be "if its sunset.. turn the light on".
I'm then trying to figure where/how to turn them off... Do I need to create another applet and assign it to the group, or is there a way to perform both tasks with the 1 applet, or should this be done else where?
I've attached a pic, of the group and the objects in it.
Thanks,
johnny