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

Open/Close the gate


Question

Posted

I'm trying to build two scenes (Home center 2) for the garage door.

But so far without success :(

I have a qubino to open the gate and a Fibaro Door Sensor to indicate whether it is open or closed

 

The 1st scene was to open the gate when it is closed and if the gate is already open do not turn on the qubino

The 2nd scene was to close the gate when it is open and if the gate is already closed do not turn on the qubino

 

At this moment when I turn on the scene to open the gate and if it is already open then the qubino turns on and closes the gate

 

I'm sorry for my english :(
I hope you understand

17 answers to this question

Recommended Posts

  • 0
Posted

Can you share your scenes (code or block) ?

  • 0
  • Inquirer
  • Posted (edited)

     

    if the gate is open and I turn on the scene, the gate will close, and I don't want that. because i want it to open

     

    Please login or register to see this attachment.

    the idea is for me to be home and as I don’t see the gate,
    then turn on the scene to close the gate but if it is already closed it will open

     

    Edited by Vitor
    • 0
    Posted

    This scene is triggered by the sensor. If breached (the gate is open), then turn on the switch. 

    • 0
    Posted
    10 hours ago, SmartHomeEddy said:

    This scene is triggered by the sensor. If breached (the gate is open), then turn on the switch. 

    I assume that if you set the scene into Manual Mode that will fix your problem.

    • 0
    Posted

    Yes, so if I understand your purpose right, you have two scenes, one to open and one to close the gate.
     

    But the scene must only do its job, when the gate is in the opposite position, open when closed and closed when open. 

    • 0
  • Inquirer
  • Posted (edited)
    3 hours ago, SmartHomeEddy said:

    Sim, então se entendi bem o seu propósito, você tem duas cenas, uma para abrir e outra para fechar o portão.
     

    Mas a cena só deve fazer seu trabalho, quando o portão está na posição oposta, aberto quando fechado e fechado quando aberto. 

     

     

    yes, that's what i'm trying to do. but so far  without success :(

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by Vitor
    • 0
    Posted

    But if this scene is to open the gate, should the sensor != breached ? 
     

    If the sensor == breached the gate is open and you don’t want the “open scene” to do anything

    • 0
  • Inquirer
  • Posted
    10 minutes ago, SmartHomeEddy said:

    But if this scene is to open the gate, should the sensor != breached ? 
     

    If the sensor == breached the gate is open and you don’t want the “open scene” to do anything

     

    yes, i have tried many ways and the result is always the same. :( the gate changes its state (Open / Close).

    This scene was very important to me.

    I have Alexa and I tell her to close the gate but if the gate is already closed it opens, and I don't want that. :(

    • 0
    Posted

    Can you convert the block scene to Lua and post it? 
     

    Then we can see what your scene does. 

    • 0
  • Inquirer
  • Posted
    2 hours ago, SmartHomeEddy said:

    Você pode converter a cena do bloco para Lua e postá-la? 
     

    Então podemos ver o que sua cena faz. 

    --[[
    %% autostart
    %% properties
    387 value
    %% weather
    %% events
    %% globals
    --]]

    local startSource = fibaro:getSourceTrigger();
    if (
     ( tonumber(fibaro:getValue(387, "value")) > 0 )
    or
    startSource["type"] == "other"
    )
    then
        fibaro:startScene(152);
    end

    • 0
    Posted

    This “open the gate” scene does exactly what you don’t want it to do. If the gate is open, turn on the power and therefor close it. And if the gate is closed, it doesn’t open. 
     

    Can you try this (I don’t have a HC2) ?

     

    Please login or register to see this code.

     

    • 0
  • Inquirer
  • Posted
    14 hours ago, SmartHomeEddy said:

    Essa cena de “abrir o portão” faz exatamente o que você não quer. Se o portão estiver aberto, ligue a energia e feche-a. E se o portão está fechado, ele não abre. 
     

    Você pode tentar isso (eu não tenho um HC2)?

     

    Please login or register to see this code.

     

    :( Not Working 

    [DEBUG] 09:39:55: 2020-08-07 09:39:55.944919 [ fatal] Unknown exception: /opt/fibaro/scenes/263.lua:12: ')' expected (to close '(' at line 10) near 'then'
    [DEBUG] 09:40:16: 2020-08-07 09:40:16.834625 [ fatal] Unknown exception: /opt/fibaro/scenes/263.lua:12: ')' expected (to close '(' at line 10) near 'then'

    • 0
    Posted (edited)

    Sorry, I think we have to lose the   ;  and a () and startSource

     

    Please login or register to see this code.

     

    Edited by SmartHomeEddy
    • 0
  • Inquirer
  • Posted
    15 minutes ago, SmartHomeEddy said:

    Desculpe, acho que temos que perder o; e um () e startSource

     

    Please login or register to see this code.

     

     

    :) thank you very much :) it's already working.

    Now if the gate is closed it opens. But if the gate is open nothing happens :)

    I am very happy !!!

    Can you help make the other scene to close?

     

    • 0
    Posted

    ???

     

    The close scene is almost the same, you only want it to be closed when the gate is open and if it is already closed, nothing should happen. 
     

    So only replace the if then with:

     

    Please login or register to see this code.

     

    • 0
  • Inquirer
  • Posted
    6 minutes ago, SmartHomeEddy said:

    ???

     

    The close scene is almost the same, you only want it to be closed when the gate is open and if it is already closed, nothing should happen. 
     

    So only replace the if then with:

     

    Please login or register to see this code.

     

     

     

     

    Thanks :)

    It works :):)

    Thank you very much

    ;)

     

     

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