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

Scenes for unconfigured devices


Question

Posted

Hey Guys,

I've got an AEOTEC Garage door device which does not have a template (Fibaro are working on it i'm told) but in the mean time wish to use the device in a scene for some alerts etc

 

I want to be able to get an alert when the door opens and also closes

i also want to be able to add a light to turn on in the scene

any advice?

 

7 answers to this question

Recommended Posts

  • 0
Posted

@amurray85 this should still be achievable without a template as the templates are there to provide configuration options in a nice and easy method to use rather than manually adding parameters.

 

So assuming the device actually shows up in your device list, when you create a scene you can select the device in block mode from the left menu or if in lua on the left menu it gives you a list of values and actions.

 

I find making a test scene in lua and typing fibaro:debug (code from the list on the left menu) to check/test you are getting the values for lets say open/close. As each time you run the scene the area below your code in the advanced section of you scene will output something.

 

Then you can put a simple if, then, else, end statements around that to achieve what you want.

 

Other commands you might want to look up is fibaro:call for your push messages.

 

 

  • 0
  • Inquirer
  • Posted

    Hey Mobbie,

     

    Thats the thing, i cant choose it in block mode :(

     

    i've attached some screenshots of what i see.. i'm still a bit fresh to fibaro but am quickly learning

     

    Thanks for your help 

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    • 0
    Posted

    @amurray85 ahh ok I see.  So the first thing you are setting up is a trigger for this scene.  The garage door opener is not a trigger, rather its a device that will send the 'open or close', ie it dosent actually know if the door is open or closed.

    I'm assuming that you can press the open button even though the door is open?

     

    Therefore to setup a 'trigger' if the door is open or close, you need a sensor that can tell you if the door is open/closed, that can be your trigger.

     

    To confirm what I mean, is setup the garage lights as a trigger in your block scene so that if the lights are on, then close the door. 

     

    The alternative to this is try to see what you get in LUA.  In this example the ac_mode for my lounge is not something I can use as a trigger in a block scene, BUT I can test the value of it and run the scene on a regular basis to see if it is turned on -  (using something like Sanko's main timers loop scene).

    <Sudo code>

    ie IF ac_mode = 2

    then

    fibaro:debug("my ac is on")

    else

    fibaro:debug("my ac is off")

     

    So you could do something like

    If garage_mode='open'  (if that is a value that you can get?)

    then

    fibaro:debug("my garage is open")

    else

    fibaro:debug("my garage is closed")

     

    Please login or register to see this attachment.

     

    hope that makes sense?

     

    The other thing I do to test this is create a 'test scene' to play with.

    there I just have a single command such as fibaro:debug(<when I click on value in the picture it puts code here)

    and that will tell me the output of that value which I can then do something with.

     

     

    Mobbie

     

    • 0
  • Inquirer
  • Posted

    Hey Mobbie,

     

    I see what you mean, although ithe Fibaro does seem to know when the garage door is open or closed (even when using the normal remote). It does this by using the tilt sensor which is mounted on the door itself.

     

    How do i determine which variable it would be using to indicate if its closed or not?

     

    if i create one of those magic scenes i can get it to use "Barrier open" and than turn on the lights, but ofcourse i dont want this during the day

     

    screenshot attached

    Please login or register to see this attachment.

    • 0
    Posted

    Hi amurray,

     

    If you try it in lua it might tell you what the value is and you can test on that.  see the screen shot I had in the previous post looking for the aircon value in my case.

    • 0
  • Inquirer
  • Posted

    hey dude

    i'm getting closer lol... thanks for helping man... really appreciate it, apologies for being a n00b

     

    here's what i've got so far.. not working but we are close

     

    --[[
    %% properties
    77 value
    %% weather
    %% events
    %% globals
    --]]

    local startSource = fibaro:getSourceTrigger();
    if (
     ( tonumber(fibaro:getValue(70, "turnon")) > 0 )
    or
    startSource["type"] == "other"
    )
    then
        fibaro:call(9, "turnOn");
    end

     

     

    DEBUG

     

    [DEBUG] 17:21:05: line 11: attempt to compare number with nil

     

    attached is the properties window.. i think i'm calling the wrong action on line 11

    Please login or register to see this attachment.

    • 0
    Posted

    Hi Amurray,

     

    yep I got trapped with this a few weeks ago when I was doing it the first time.  Action is actually what it says, and action, so you wont get a value from it to compare against.  You need to check probably the property called 'state' that I can see in the list.

     

    I usually would do something like fibaro:debug(the value of 'state') so you can check what values you get depending on the open/close state.

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