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

Lua scene help (Leaner)


flatfoot

Question

Hi

 

I'm very new to this.  I have a pair Fakro windows and a temperature sensor.  I'd like both windows to open when the temperature is 30 Degrees. Then have an overriding rule that the windows close 30 mins before sunset.  I've no idea where to start, can anyone point me in the right direction please?  I only bought the HC3L so it would control the windows as they often get left open at night and its a security risk if I'm away, just want to keep my family safe.

 

Hope someone can help me.

 

Many thanks
 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I think the scene below will do the job:

  1. It triggers 30 minutes before sunset;
  2. It triggers when the temperature from device with id 332 is equal or higher then 30 degr;
  3. The scene checks the time, sunset and sunrise;
  4. It sets the previous temp as a scene variabele and check this; else the windows keep opening every time the temp changes and it above 30;
  5. I check the sourceTrigger variable who triggers the scene, the sunset or the temp;
  6. When triggered I check the time, when it's 30 degr and night (between sunset and sunrise) the windows must not be opened.
  7. If the temperature gets below 28 degr, reset the scene variable, to let the windows open again. I set 2 degr below 30 to prevent flipping;
  8. When triggered 30 mins before sunset, close the windows.

Please change the id's of the devices in the declarations and actions field.

 

Note: I could not test this, I used my base scene I use to trigger my pool temperature sensor, that works with the same principle. If your windows stay open I'm not responsible for any damage or burglary! 

 

Create a Lua scene with the following code in the DECLARATION (trigger):
 

Please login or register to see this code.

 

Add this to the ACTIONS field:

 

Please login or register to see this code.

 

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