Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0

Sunset/Sunrise updates


jgab

Question

When is sunset/sunrise updated on your box?

Please login or register to see this code.

I get "00:16:32"... I would have expected 00:00:00... (I did verify it by a scene logging the value around midnight)

I don't know if it's consistently at that time or varies day by day...

Anyway, complicates things unnecessarily. Try to schedule something at sunrise, and do it a minute after midnight you get it wrong...

I believe that in the north of Sweden we have sunrise before 00:16 in the middle of the summer :-)

Have to test if api.get("/settings/info").sunriseHour updates more timely...

I run v4.540

Edited by jgab
Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

With your code I get 09:22:56 on my first HC2 and 08:47:08 on the other.

After restart, the values are 10:19:16 and 10:23:16 respectively.

Link to comment
Share on other sites

  • 0

In my case I get 00:00:18 on my main HC2. Can't test on developing HC2 because it is switched off when I'm not at home.

 

Link to comment
Share on other sites

  • 0
  • Inquirer
  • I expect the value being recalculated when the box restarts. However a lot of variation of when the value is recalculated after midnight is troubling....

    Link to comment
    Share on other sites

    • 0

    Just to mention that my HC2 was not restarted for last 20 days.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 19 minutes ago, Sankotronic said:

    Just to mention that my HC2 was not restarted for last 20 days.

    So you got 18s after midnight for a box with 20 days uptime. I got 16minutes after midnight for a box restarted the day before. Seems to be a wide distribution...

    @RH_Dreambox seems to be restart values and I hope that @Bodyart is after a restart around 06:00... or that would be a record delay.

    I may have to calculate my own daily sunrise/sunset values... because I may need them before they are updated on the box...

     

     

    Link to comment
    Share on other sites

    • 0

    I run a scheduler scene which is restarted on the change of sunriseHour.

     

    --[[
    %% autostart
    %% killOtherInstances
    %% properties
    1 sunriseHour
    --]]

     

    Restart times since last reboot are

    06 May: 00:08:03

    07 May: 00:08:05

    08 May: 00:08:08

    09 May: 00:08:10

    10 May: 00:08:13

    11 May: 00:08:16

    12 May: 00:08:18

    13 May: 00:08:21

    14 May: 00:08:24

    15 May: 00:08:30

    16 May: 00:08:31

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 14 hours ago, Alex de Bruin said:

    I run a scheduler scene which is restarted on the change of sunriseHour.

     

    --[[
    %% autostart
    %% killOtherInstances
    %% properties
    1 sunriseHour
    --]]

     

    Restart times since last reboot are

    06 May: 00:08:03

    07 May: 00:08:05

    08 May: 00:08:08

    09 May: 00:08:10

    10 May: 00:08:13

    11 May: 00:08:16

    12 May: 00:08:18

    13 May: 00:08:21

    14 May: 00:08:24

    15 May: 00:08:30

    16 May: 00:08:31

     

     

    that's a fun behaviour...and it will just continue to drift more and more? I have a hard time imagining how they implemented this. The easiest way would be to calculate the time on demand that first time it is accessed for each day. Alternatively make sure that it is updated every day at 00:00:00 before any script/VD tries to get hold of the value, a bit tricker but doable.

    Btw, api.get("/settings/info").sunriseHour is updated with the same delay, so it's nothing fishy with fibaro:getValue(1,...)

    Link to comment
    Share on other sites

    • 0

    Now that my HC2 (after the restart yesterday) has "rolled over" midnight, the values have changed to 00:19:35 and 00:23:33 respectively.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • On 5/17/2019 at 9:17 AM, RH_Dreambox said:

    Now that my HC2 (after the restart yesterday) has "rolled over" midnight, the values have changed to 00:19:35 and 00:23:33 respectively.

    Seems to confirm that sunset/sunrise are updated with a random delay after midnight, and not at midnight that would be expected.

    There are also signs that this delay is increasing daily ( @Alex de Bruin) i will add a check in my own system for that...

    Could be that they do it with a scheduled tasks that drifts depending on system load etc... They should instead calculate the value on demand and cashed it.

    Anyway, this implies that in worst case we can't be sure that sunrise is updated before sunrise happens... at least not in northern Scandinavia where sunrise is getting closer and closer to midnight...

     

    For most people and most cases this is probably not a problem, you just get a day old values for sunrise/sunset, and it's not more than a few minutes.

    ...you just need to understand that the sunset value you retrieve just after midnight is not the same sunset value you will retrieve a few hours later - something that caused a really difficult bug to find in my own system.

    Edited by jgab
    Link to comment
    Share on other sites

    • 0

    I can confirm that time when sunrise and sunset times are updated is drifting. Today I get 00:01:08

     

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • 2 hours ago, Sankotronic said:

    I can confirm that time when sunrise and sunset times are updated is drifting. Today I get 00:01:08

     

    So, the question is then: How much will they allow it to drift?

    or they know that people are forced for various reasons to reboot their boxes with regular intervals anyway ;)

    Link to comment
    Share on other sites

    • 0

    Just checked on other HC2 that was powered up 2 days ago afternoon and result is 00:18:52

    Link to comment
    Share on other sites

    • 0

    New results: ( last reboot on 21 May)

    22 May: 00:07:08

    23 May: 00:07:11

    24 May: 00:07:14

    25 May: 00:07:16

    26 May: 00:07:19

    27 May: 00:07:22

    28 May: 00:07:24

    29 May: 00:00:40

    30 May: 00:00:22

     

    Interesting change in behaviour. Wonder if something was changed by Fibaro.

    Link to comment
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...