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

VD for automatic curtains


Guest jmcclaassens
 Share

Question

Guest jmcclaassens

Hello,

 

I've some of my automatic Somfy automatic curtains connected with a Rollershutter 2.

 

Now i would like to create a Virtual Device with 3 buttons ('Open' , 'Half' and 'Close') and a slider to manage these curtains

 

Is some having a kind of VD for this already of can somebody me give some examples how to create a VD like tis?

 

Thank you in advance!

John.

 

 

 

 

 

 

Please login or register to see this attachment.

Edited by jmcclaassens
Wrong forum. You did not provide any solution only an idea.
Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

The topic has been moved from "

Please login or register to see this link.

" to "

Please login or register to see this link.

".

 

Temat został przeniesiony z "

Please login or register to see this link.

" do "

Please login or register to see this link.

".

Link to comment
Share on other sites

  • 0

Hi,

 

This should be relatively easy.. For the VD you created so far, just use simple code like this for each button:

 

  -- [ [
 %% properties
 %% globals
 -- ] ]
local gordijnen

fibaro:call(gordijnen, 'turnOn');
 

Edited by MaTi
Link to comment
Share on other sites

  • 0

Hi @jmcclaassens,

 

Which box do you have? Is it HCL or HC2? If it is HC2 and you can use LUA then here is very simple solution:

  • Code for Close button:

Please login or register to see this code.

  • Code for Half button:

Please login or register to see this code.

  • Code for Open:

Please login or register to see this code.

  • Code for slider:

Please login or register to see this code.

Replace deviceID with ID number of your roller shutter 2 module.

 

But of course if you have HC2 and you can use LUA then above code can be extended so that VD icon is displayed to show how much curtains are opened. Here you can find curtain icons:

Usually there are 11 icons. One that show closed curtains and then other ten icons that show 10%, 20%, 30% to 100% open. You need to import those icons and then find out their ID number. How to do that you can find out here:

Here is extended code:

  • Code for Close button:

Please login or register to see this code.

  • Code for Half button:

Please login or register to see this code.

  • Code for Open button

Please login or register to see this code.

  • Code for slider:

Please login or register to see this code.

  • Main loop code that will refresh icon if you use device itself or wall switches:

Please login or register to see this code.

In above code you need to replace icon ID numbers 1000 to 1010 with ID numbers that icons will get on your HC when imported.

 

Enjoy coding! :-) 

 

Edited by Sankotronic
Thanks to Bodyart corrected typos multiplied by copy/paste :-)
Link to comment
Share on other sites

  • 0

Just for the newbies @Sankotronic meant ofcourse The command

Please login or register to see this code.

 

shoul'd read getSelfId()

 

Edited by Bodyart
Link to comment
Share on other sites

  • 0

Hi @Bodyart and thanks for pointing out typo multiplied by copy and paste. My previous post is now corrected :-) 

 

Edited by Sankotronic
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.

 Share

×
×
  • Create New...