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


Recommended Posts

Posted

Hi I was wondering if someone had an idea on what to do

Just replaced my reticulate on box with 4 2x1.5 relays

1. Bore

2. Zone 1

3

4

9 zone 8

How can I link the zones to the bore to turn on . Have to make sure bore can't be on without a zone turned on...

Is it possible in the 4.023 beta?

Posted

Hi Mad-Cat,

Easy! Just need some Lua code:

Please login or register to see this code.

Just make sure you replace the "xx" bits with your device ID's (don't forget to put them into the header as well, all 8 zones and the bore!!!)

This will basically make sure that if any of the zones are on, the bore will be on too. If they are all off the bore will turn off. If someone tried to turn the bore on by itself the scene will also kick in and switch it back off again (providing you make sure the device ID of the bore is listed in the triggers section.)

Hope this helps!

Dan

  • Topic Author
  • Posted
    Hi Mad-Cat,

    Easy! Just need some Lua code:

    Please login or register to see this code.

    Just make sure you replace the "xx" bits with your device ID's (don't forget to put them into the header as well, all 8 zones and the bore!!!)

    This will basically make sure that if any of the zones are on, the bore will be on too. If they are all off the bore will turn off. If someone tried to turn the bore on by itself the scene will also kick in and switch it back off again (providing you make sure the device ID of the bore is listed in the triggers section.)

    Hope this helps!

    Dan

    Thanks man love to have ur level of skill in scripting.....

    Can't wait to try it out

    [ Added: 2014-12-18, 04:52 ]

    Hi

    Thanks again for the code is it possible to ask a question on the code.

    there where some or missing in the long line checking zone status ok.. now im getting

    [ERROR] 11:46:43: line 37: unexpected symbol near char(194)

    Sorry really don't know coding at all took me weeks just to read these basic ones.. getting better...

    thanks again

    --[[

    %% properties

    274 value

    276 value

    278 value

    280 value

    282 value

    284 value

    286 value

    288 value

    %% globals

    --]]

    local zone1ID = 276

    local zone2ID = 282

    local zone3ID = 284

    local zone4ID = 278

    local zone5ID = 280

    local zone6ID = 286

    local zone7ID = 288

    local boreID = 274

    local zone1Status = tonumber(fibaro:getValue(zone1ID, "value"))

    local zone2Status = tonumber(fibaro:getValue(zone2ID, "value"))

    local zone3Status = tonumber(fibaro:getValue(zone3ID, "value"))

    local zone4Status = tonumber(fibaro:getValue(zone4ID, "value"))

    local zone5Status = tonumber(fibaro:getValue(zone5ID, "value"))

    local zone6Status = tonumber(fibaro:getValue(zone6ID, "value"))

    local zone7Status = tonumber(fibaro:getValue(zone7ID, "value"))

    local boreStatus = tonumber(fibaro:getValue(boreID, "value"))

    fibaro:debug("Scene running")

    if (zone1Status == 1 or zone2Status == 1 or zone3Status == 1 or zone4Status == 1 or zone5Status == 1 or zone6Status == 1 or zone7Status == 1) then

       if boreStatus == 0 then

         fibaro:call(boreID, "turnOn")

       end

     else

      fibaro:call(boreID, "turnOff")

    end

    Posted

    No worries, glad to help!

    I just copied your code back into my HC2 here and didn't get an error on line 37 - it ran just fine.

    Is this the exact code you have running?

    Cheers,

    Dan

    Posted

    I tested it as well and it works fine.

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Reply to this topic...

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