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

RollerShutter moving direction as trigger


stefank

Question

Hi there,

 

I have 2 questions concerning scenes.

 

1.

Is it possible to to use the moving direction of the rollershutter as a trigger?

I like to configure two LED's showing my blinds moving up or down.

  LED#1 on, LED#2 off, when blind is moving up

  LED#1 off, LED#2 on, when blind is moving down

Right now I'm using "power" as a trigger but this only shows me that the blind is moving, without the direction info.

Any ideas how I can get the moving direction as a trigger?

 

2.

How can I know the options for different triggers.

for example:

I'm in the scene editor an move my mousepointer over the list of devices on the left side.

Now I can see the info of properties and actions for each device.

There is i.e. the device Sonos Speaker. It has a property named "state".

If I click on it I will get the command line into my scene. But how can I use this property "state". I don't know the variables to use.

Is there a list with all variables I can use. 

 

Stefan

 

Link to comment
Share on other sites

15 answers to this question

Recommended Posts

  • 0

HI @stefank

 

1.

Unfortunately no, but that is a great suggestion. I'll be sure to forward it to our engineers! Thanks!

 

2.

I'm afraid there's no guide at the moment. Some of them can be found at

Please login or register to see this link.

You can also build a scene as a block and then transform it into LUA to learn more about it.

Link to comment
Share on other sites

  • 0

@stefank

 

There is no list to check, but both of your questions are same concept. Hope below helps.

 

Make a test scene and set it manual.

Please login or register to see this code.

Don't know how you trigger your blind to move. Now try to move it from HC2 UI or whatever you have written, and then run above scene, you should see either 0 or 1 from debug window. If my memory is still good 0 should be close, turnOn, or Down, however you express, while 1 should be open, turnOff or Up.

 

After you get the idea you can trigger your LED scene by

Please login or register to see this code.

 

-------------------

 

And for checking what value is in 'state', do the same

Please login or register to see this code.

Each LUA scene heading has the following declaration:

Please login or register to see this code.

 

Edited by Sirhideo
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hey Sirhideo, thanks for the reply.

    Just tried your first scene to check for the value for the up and down movement of my blinds.

    Your scene is working but it only shows the value for the position of the blind. I think it's percentage, 0 is full closed, 99 is full open.

    It's only changing the value when the rollershutter is stopped. So if I run your scene during movement it shows the last known position-value until the shutter stops and then I get the new position-value.

     

    Any further suggestions hon how to get the direction of movement.

     

    Stefan

    Please login or register to see this attachment.

    Link to comment
    Share on other sites

    • 0

    @stefank You keep pressing start button of the test scene while blind is moving and have the above screenshot right? If so, now we know that > 0 means blind is moving up (0 towards 99), where < 99 is moving down (99 towards 0).

     

    Please login or register to see this code.

    Try this, you may want to set the until value closer to 0 or 99 to make the LED action response faster.  This scene however won't work if you intentionally stop the blind between 0 and 99.

     

    If it doesn't work, it looks like that Global Variable is needed. let me know the result.

     

    btw, you can use @myid so that I can receive an email whenever this post is updated.

    Edited by Sirhideo
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @Sirhideo No it's just the other way. If the blind is moving and I keep pressing the start button of the test scene then I only get the start value i.e. 11. When I stop the blind and now start the test scene again, then it shows the new position value.

    So during movement of the blind there is no change.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @Sirhideo I trigger my blinds normally via a z-wave wallswitch which has associations set to the rollershutters.

     

    Link to comment
    Share on other sites

    • 0

    @stefank so it triggers manually.  How about,

     

    if you press switch up then leds do what it should be? instead of relying shutter value.

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @Sirhideo Yes I can do that, already have a scene for that. But my intention was that the LED's are showing not the switch position but the blind movement.

    Sometimes I also use a scene or the blind switches (which are connected to the rollershutter) to move my blinds and it would be nice to have the LED's working also then.

    Link to comment
    Share on other sites

    • 0

    so @stefank, you have a physical switch and a scene to control your blind, and for the switch you have another scene to control LED while you press the switch. do I understand correctly?

     

    If so can you please post your blind control scene?

    Edited by Sirhideo
    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • @Sirhideo your right. To be exactly I have 2 physical switches to control the blinds. One is that z-wave wallswitch which is controlling the blinds via associations and the other is a physical switch just beside the window. This switch is wired to the rollershutter and then wired to the blind.

    The scenes I used are just test scenes. I have one to control the blinds via that z-wave wallswitch. but I'm not using it. I use associations it works better and faster.

    And I have a scene that can switch both LED's when the blinds are powered (trigger: power > 0). So with this config I can control the blinds from the 2 different switches and I have 2 LED's on when the blind is moving. Only thing missing is the direction.

    Link to comment
    Share on other sites

    • 0

    @stefank Ok, global variable may be needed.

     

    You need a On/Off simulation scene (manual), something like

     

    if tonumber(fibaro:getValue('shutterID', "value") ) == 0 then

    fibaro:setGlobal('BlindState', "Up")

    fibaro:call('shutterId', "turnOff")  -- 0 towards 99

    else

    fibaro:setGlobal('BlindState', "Down")

    fibaro:call('shutterId', "turnOn")  -- 99 towards 0

    end

     

    Then create an automatic trigger scene, whenever it sees global BlindState changes, LED reacts..

     

    And for How to trigger the blind up down scene, I do not know your scenario, make sense to you?

     

    Edited by Sirhideo
    Link to comment
    Share on other sites

    • 0

    @stefank

    Go to Panel on your HC2 web -> Variable.

    Create a Pre-defined variable (lower part on the page) called "BlindState" for example, setup 2 values Up and Down.

     

    Blind movement scene change the value Up or Down of Global Variable BlindState.

     

    Then when global changes

    Please login or register to see this code.

    This LED scene will run whenever BlindState change from Down to Up or Up to Down.

    Edited by Sirhideo
    Link to comment
    Share on other sites

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