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 help - Why isn't my scene working?


Question

Posted

Hi all,

 

I am relatively new to LUA and am struggling with a scene I cannot get to work.

I was hoping someone could have a look with me. This is the scene I am working on, very simplified:


 

Please login or register to see this code.

 

In the real code 'AlamSensors' is built up from other variables, like 5 or 6. Also, I am closing blinds and switching off lights the same way in the same if-statement, which works flawlessly.

No of the devices however are set to 'Armed' after 180sec, as I am trying to achieve.

 

Could someone please check my code and see if I am am doing anything wrong here?

Like I said, parts are taken out here to have it simplified, but the lights do go out as intended, so it should be something with the arming-part..

 

Thanks, highly appreciated! :)

 

3 answers to this question

Recommended Posts

  • 0
Posted

I compared your code with mine and it looks ok. Difference is that I have separate scene that arms sensors, while other scene is calling it with this code:

Please login or register to see this code.

And then in arm alarm scene I used this code to arm devices in the loop with checking of the state:

Please login or register to see this code.

Have three different loops for motion sensors, doors and windows. This is because for me is easier to get different amount of armed sensors depending on situation if we are living house or going to sleep.

 

So , your code looks correct and I can't explain why sensors are not armed but I know that my code is working perfectly and sensors are always armed. 

 

  • 0
Posted
On 26/11/2016 at 10:14 AM, Sankotronic said:

I compared your code with mine and it looks ok. Difference is that I have separate scene that arms sensors, while other scene is calling it with this code:

Please login or register to see this code.

And then in arm alarm scene I used this code to arm devices in the loop with checking of the state:

Please login or register to see this code.

Have three different loops for motion sensors, doors and windows. This is because for me is easier to get different amount of armed sensors depending on situation if we are living house or going to sleep.

 

So , your code looks correct and I can't explain why sensors are not armed but I know that my code is working perfectly and sensors are always armed. 

 

 

Sankotronic, any chance you have the full LUA for this alarm? I have incorperated Hometable, and your VD's for main scene, and adapted my own alarm, but its a bit buggy...

  • 0
Posted
17 hours ago, shaunfrost said:

 

Sankotronic, any chance you have the full LUA for this alarm? I have incorperated Hometable, and your VD's for main scene, and adapted my own alarm, but its a bit buggy...

Hi @shaunfrost,

 

I have full LUA code to arm & disarm alarm and one scene that is activated if alarm is breached that takes care to send notifications and some other stuff. I still need to tide up code so it can be used by other systems (users) and it is integrated in such way that I will need to post some other scenes and VD before this come in the line. I already started with posting solutions and will continue.

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