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

hc3 sunset scene


Question

Posted

Im trying to write a scene so when the sunsets 15 mins later the lights will come on how  do I do this 

6 answers to this question

Recommended Posts

  • 1
Posted

If you write it as a block scene, though, and you are running the current release of the HC3 firmware, there are bugs in the block scene UI that hinders you to save the scene when choosing the time as exact sunrise or sunset. What happens is that Save scene is greyed out then, and you can't save the scene. In order to be able to save the scene, you have to choose to set a time before or after sunrise/sunset, then switch back to AT sunrise or sunset, then you can save the scene.

 

In your specific case this is not an issue, but I post it here nevertheless so people who might have issues see a workaround.

  • Thanks 1
  • 0
Posted

In the LUA manual for the HC3 there is an example of that. 
 

Please login or register to see this link.

 

just replace the “120” In the example with your “15”. 

  • 0
Posted
1 hour ago, SmartHomeEddy said:

In the LUA manual for the HC3 there is an example of that. 
 

Please login or register to see this link.

 

just replace the “120” In the example with your “15”. 

 

Ahh, yes. The concept of reading the manual. No - it doesn't compute here either...

  • Like 1
  • 0
Posted (edited)

The forum and the manuals share a lot of information. 
 

In the manual, I mean this part for the trigger/condition:

 

Everyday 120 minutes after sunset.

 
1
2
3
4
5
6
7
{
    type = "date",
    property = "sunset",
    operator = "==",
    value = 120,
    isTrigger = true
}

 

and the action can be;

 

fibaro.call(2055, 'turnOn')
 

(With the right id of the light.)

 

And with the block scenes, it is a lot more easy, but with your question “write a scene”, I think you mean Lua. 
 


 

 

 
Edited by SmartHomeEddy
  • 0
Posted

I wrote this scene, but the time change doesn't work. Do you know what is wrong?

 

DECLARATIONS

{
    operator = "all",
    conditions = {
        {
            type = "device",
            id = 221,
            property = "value",
            operator = "==",
            value = true,
            isTrigger = true
        },
        {
            operator = "any",
            conditions = {
                {
                    type = "date",
                    property = "sunset",
                    operator = ">=",
                    value = 60,
                },
                {
                    type = "date",
                    property = "sunrise",
                    operator = "<=",
                    value = 0
                }
            }
        }
    }
}

 

  • Like 1
  • 0
Posted

Try this (in your code you also check some device 221). If you want to trigger once a day, 15 mins after sunset, this should work:
 

Please login or register to see this code.

 

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