Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Checking what the last sunrise/sunset event was

  1. #11
    Join Date
    May 2004
    Posts
    2,589

    Default

    Sure thing.

    Code:
    sched = scheduler.GetScheduler(10051)
    tasks = sched:GetTasks()
    table.print (tasks)
    oh, and to get the names of the scheduled events I put an "s" on GetScheduler.
    I also found that I could get the name of the last sunrise/sunset event with
    Code:
    local lastevent = SunriseSunset:GetLastEvent()
    but again, no time for that event; only the name.
    Last edited by quixote; June 5th, 2009 at 05:17 PM.
    Beware of the robot.

  2. #12
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    Ah, I guess it won't work then

    Sorry to have misled you.

    I'll keep investigating then.

    However, the modification to the component should help.
    --Rob

  3. #13
    Join Date
    May 2004
    Posts
    2,589

    Default

    ok, well thanks for taking the time to look into that anyway. Too bad John isn't around anymore or we could ask him to modify the scheduler to have a configuration page and a few extra options / visible variables.
    Beware of the robot.

  4. #14
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    There is sort of a config page, but you can't change anything, just view the times. It's under Schedule/Time..|Daylight on the SunriseSunset tab.

    I'll take a look at the code for that
    --Rob

  5. #15
    Join Date
    May 2004
    Posts
    2,589

    Default

    I've used the scheduler quite a bit and it's very good (with a couple of hicups in the past). I had asked John to implement the new features that he added (timer randomizer and weekday/weekend day designation). Personally, I find these features indispensable.

    By a config page, I mean an additional tab that would allow users to do just as you showed me through modifying the lua file, but on a seperate tab instead, along with any other settings we can think of.

    An additional feature that I can think of off the top of my head would be another table in the sceduler variable table that would show each scheduled event (including sunrise and sunset events) with a variable under each of those which could easily be compared to other times. We could then use those variables instead of ambient light in a conditional for various tasks.
    Beware of the robot.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •