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 LUA not sync with time zone


Question

Posted

Hello, this summer I created some scenes using blocks and some others using LUA.
All these scenes have the condition (not trigger) to work only after sunset and before sunrise (for example lights turning on with movement).
The scenes created with blocks work well and adapt to the daily sunset sunrise time.

The scenes created with LUA work only much after sunset. Looks like they don't adapt to the new sunset time...

 

Please login or register to see this code.

 

Any idea?

5 answers to this question

Recommended Posts

  • 1
Posted

@Patryk Kopaczewski

In general, after sunrise works till sunset.
And after sunset works till sunrise.

If this would be any way around, it will that those conditions are always true.
In general you could use just "after sunset" as a condition and this would be enough. 

  • 1
Posted

Hey mate,

Try this scene to rule out any logic issues with your running scene:

Please login or register to see this code.

If they are also completely wrong there, it is a config issue, not a scene issue.

 

I had my 'address' set, but not the right lat/long locations - the address wouldn't resolve in search and the coordinates were still set to Poland even though the address was in Aus.

 

I changed my lat/long and rebooted and got it working. I was also playing with my local time settings around the same time - these shouldn't effect things as I understand it, but I was just turning NTP off and on around the same time - might be worth trying if nothing else seems to work.

  • 0
Posted

sunset and sunrise are based on the location, not time zone.
Make sure to set correct location and reboot the hub just in case.

 

  • 0
  • Inquirer
  • Posted

    Hi Roszak, the location is correct of course. And there were reboots in the last weeks due to power outages. 
    I have a doubt about the logic. After Sunset and before Sunrise: for example these days at 4PM we are after sunset but logically also after sunrise... same at 7PM (when the logic works) but eventually the system at 7PM will ignore that we are after sunrise but not at 4PM.

    • 0
  • Inquirer
  • Posted

    Hello @m.roszak , thank you very much for your explanation. You solved the problem. Using just "after sunset" not only works till sunrise but solved all the issues which I mistakenly attributed to the time zone.

    • Like 1

    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...