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

Question

Posted

I have 2 question about lua code:

1- For close the shutter in the house I want to check if windows is closed. So i want make a table like

windows = { bedroom1,bedroom2,lounge}

And for each items check if is breached or not.

2- I use xbmc for the tv, so if the windows is open, how can I send http url with lua to have message on the tv windows open.

Thanks

2 answers to this question

Recommended Posts

  • 0
Posted

Assuming you are using relays to open/close the windows and window use fibaro door sensors then this should close them all if they are open...but not tested

Please login or register to see this code.

If it is critical to have windows closed before the shutter then you may want to include an inner loop to carry on testing for closed before allowing the shutter to close.

If this works please can you add to the list here..http://forum.fibaro.com/viewtopic.php?t=1367

The second is a fiddle just now as the net library is not in scenes. You can get round this by shelling to the OS or using a virtual device. I think you will find the snippets needed posted.

Hope this helps get you started.

  • 0
  • Inquirer
  • Posted

    Thanks you, I tried tomorrow and post if ok.

    [ Added: 2013-03-06, 11:37 ]

    Please login or register to see this code.

    [ERROR] 11:36:00: line 21: attempt to call global 'windowssensor' (a table value)

    If somebody can help me.

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