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] FGS-221 intercept "user" action


Question

Posted

Hello,

I'm all new to LUA and it looks to me like implementation of LUA in HC2 somewhat differs from "real" LUA. I wish some documentation was available with few examples for the HC2 as well as specification documents for fibaro modules (i.e. how could I know that value2 should be used to modify angles of lamellas using FGRM222 ?)

Anyway - I have written few LUA scripts to play with and I'm getting used to it.

Now, I was wondering: I am using FGS-221 to turn on/off lights in my house (installation in progress). Would it be possible to modify default action when somebody pushes a button to turn light on/off using a LUA script catching the event ?

Hope I am clear enough

Please login or register to see this image.

/emoticons/default_icon_smile.gif" alt=":-)" />

Thank you

6 answers to this question

Recommended Posts

  • 0
Guest Lode
Posted

As far as i know that is not possible.

Maybe you can do a request to add an extra parameter for your device when it supports a firmware update.

Let's say parameter x : run scene before turn device on/off or status change but i think it will be hard to implement this.

Just thinking.........

  • 0
  • Inquirer
  • Posted

    If someone from Fibaro reads this, the idea would be the following:

    - 1 push within 2 seconds = turn on lamp

    - 2 pushes within 2 seconds = turn on lamp + next one in the stairs (instead of having the light turning on then off to turn it on again)

    • 0
    Posted
    If someone from Fibaro reads this, the idea would be the following:

    - 1 push within 2 seconds = turn on lamp

    - 2 pushes within 2 seconds = turn on lamp + next one in the stairs (instead of having the light turning on then off to turn it on again)

    As far as I know, you can not change the "one push" default behaviour for a wired switch, but according to your post you don't need to do that since one push will turn on/off the lamp.

    You can change the behaviour for two ore more clicks (within around 500 ms, not 2 sec, though) building a scene triggered by the switch.

    • 0
  • Inquirer
  • Posted

    I get it Brick but light will turn on then off to finally turn back on.

    • 0
    Posted
    I get it Brick but light will turn on then off to finally turn back on.

    You are right, if you use switches FGS-221. I can't give a better solution for this module.

    But you can avoid that using dimmers FGD211 and activating parameter 41. The dimmer will wait a certain time for more clicks (around 500 ms after the first click) before inserting any current in the wire.

    • 0
  • Inquirer
  • Posted

    Good to know! Thank you.

    I however suggested to Fibaro that action could be intercepted and managed by LUA script. Could also be a good idea to configure it so no light can be turned on when you're not home for instance.

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