Jump to content

Program not running


binaryman

Recommended Posts

I'm not sure why, but this program isn't running.. I have variables that change based on day of month, year, etc. that all cycle perfectly.. however this program which I want to run on the first of the month doesn't run...  any ideas?

 

 

post-2784-0-42265600-1469638952_thumb.jpg

Edited by binaryman
Link to comment

yeah, it gets set correctly for sure..

 

 

It is an integer variable...  I've added a state variable called $DayOfMonth, and added to the end of the program that changes the date:

 

$DayOfMonth = $iDay.Of.Month

 

And changed the program to act on $DayOfMonth.

 

Should this do it?

Link to comment

These synchro programs can be difficult to keep running despite power blinks and user interaction causing them to stall.

 

This is how I do it.

Note I use scratchpad variables to do my calculations so programs don't uselessly trigger from the final state variable.

Set MM.DD - [ID 00B8][Parent 0006]

If
        Time is 12:00:01AM
     Or Time is  3:00:01AM
     Or Time is  6:00:01AM
 
Then
        $sISY.DayOfWeek Init To [Current Day of Week]
        $sISY.DayOfWeek  = [Current Day of Week]
        $sISY.DayOfMonth Init To [Current Day of Month]
        $sISY.DayOfMonth  = [Current Day of Month]
        $ISY_Date.scratchpad  = [Current Day of Month]
        $ISY_Date.scratchpad /= 100
        $ISY_Date.scratchpad += [Current Month (Jan=1, Feb=2, etc.)]
        $sISY.MM.DD Init To $ISY_Date.scratchpad
        $sISY.MM.DD  = $ISY_Date.scratchpad
 
Else
   - No Actions - (To add one, press 'Action')
 


I use the resultant $sISY.MM.DD variable for Christmas lighting and other annual events program triggering.

Edited by larryllix
Link to comment
Set MM.DD - [ID 00B8][Parent 0006]

If
        Time is 12:00:01AM
     Or Time is  3:00:01AM
     Or Time is  6:00:01AM
 
Then
        $sISY.DayOfWeek Init To [Current Day of Week]
        $sISY.DayOfWeek  = [Current Day of Week]
        $sISY.DayOfMonth Init To [Current Day of Month]
        $sISY.DayOfMonth  = [Current Day of Month]
        $ISY_Date.scratchpad  = [Current Day of Month]
        $ISY_Date.scratchpad /= 100
        $ISY_Date.scratchpad += [Current Month (Jan=1, Feb=2, etc.)]
        $sISY.MM.DD Init To $ISY_Date.scratchpad
        $sISY.MM.DD  = $ISY_Date.scratchpad
 
Else
   - No Actions - (To add one, press 'Action')
 

 

 

Are these variables that are set in another program? [Current Day of Week] [Current Day of Month]

 

EDIT: Nevermind just realized this is a v5 feature.

Edited by ghaynes27
Link to comment
  • 6 months later...

Those variables are only available to special people. :)

 

Larrylix, what's the latest and greatest documentation in ver 5 to do these dates?  My wife would like the Christmas lights to stop coming on.  Rather than just disable the programs I'd like to future proof the code so that it can handle month/day regardless of year like you are doing above.  I'm wondering if further v5 betas have further simplified this from your code above.

Link to comment

V5 variable features haven't changed any since decimals were added. AFAIK.

 

I have asked for small additions like an Integer function to tear off fractions.

 

An exponent function would be nice for windchill calculations now but I haven't asked yet.

 

Sent from a tiny keyboard. Response may be brief.

 

 

On a bad forum browser right now but my Xmas programs are all in a folder that is enabled from Dec 1 to Jan 11 each year. I need to add a detailed yearly notification describing the X10 and Insteon addresses of each light string so I know which ones are reserved for what task.

Edited by larryllix
Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...