| Author |  | 
      
        | rtt3821 Newbie
 
  
  
 Joined: September 07 2009
 Location: United States
 Online Status: Offline
 Posts: 6
 | 
          I'm trying the trial version and am a real dummy when it comes to C#. I want to turn ON a motor at 0900 and OFF at 1700 between November 1st and April 30th. I cannot seem to get the formula right. Can anyone help?
           | Posted: September 07 2009 at 20:02 | IP Logged |   |  
           | 
 |    | 
       
        | Back to Top |     | 
       
       
        |  | 
        | TonyNo Moderator Group
 
  
  
 Joined: December 05 2001
 Location: United States
 Online Status: Offline
 Posts: 2889
 | 
          Welcome aboard!
           | Posted: September 07 2009 at 20:30 | IP Logged |   |  
           | 
 |  
 What technology are you using, i.e. UPB, Insteon?
 
 ...and you don't need to know C#.
   
 Edited by TonyNo - September 07 2009 at 20:31
 | 
       
        | Back to Top |       | 
       
       
        |  | 
        | rtt3821 Newbie
 
  
  
 Joined: September 07 2009
 Location: United States
 Online Status: Offline
 Posts: 6
 | 
          I'm using Insteon.
           | Posted: September 08 2009 at 12:14 | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  | 
        | grif091 Super User
 
  
 
 Joined: March 26 2008
 Location: United States
 Online Status: Offline
 Posts: 1357
 | 
          You can create a PowerHome Timed Event using the Powerhome Explorer.  Have it fire on a daily basis starting Nov 1, 2009 09:00.  Use a Type of Raw Formula, the ID field would contain ph_macro("YOURMACRONAME"), and the following formula in the Boolean field...
           | Posted: September 08 2009 at 13:44 | IP Logged |   |  
           | 
 |  
 if((month(today()) >= 11 and month(today()) <= 12) or (month(today()) >= 1 and month(today()) <= 4), 1 , 0)
 
 EDIT:  a case statement is less involved than if ...
 
 case( month(today()) WHEN 11,12,1,2,3,4 THEN 1 ELSE 0 )
 
 The Timed Event will invoke the macro only if the month is Nov, Dec, Jan, Feb, Mar or April.  The macro will have the Insteon command(s) to control whatever you want to accomplish at 9:00 AM.   Code a second Timed Event that fires on a daily bases starting Nov 1, 2009 17:00, invoking the same or different macro to accomplish what you want to do at 17:00.  You can code logic in the macro to determine time of day so that you do On versus Off logic or code two different macros, one for On logic and one for Off logic.
 
 There are many ways to implement something in Powerhome.  This is only one of many approaches.
 .
 
 Edited by grif091 - September 08 2009 at 19:59
 
 __________________
 Lee G
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | rtt3821 Newbie
 
  
  
 Joined: September 07 2009
 Location: United States
 Online Status: Offline
 Posts: 6
 | 
          Thanks grif091. I will give it a go! Sure appreciate the help.
           | Posted: September 08 2009 at 14:35 | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  |