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

Plugin for Hunter Douglas's PowerView Motorization


chaicka

Question

@Fibaro,

 

I understand that custom-build plugin is still not supported at the moment.

 

Is there plans to work on support for Hunter Douglas's PowerView Motorization?

 

Many of the market leading home automation systems are now supporting Hunter Douglas's PowerView. Hunter Douglas is one of the market leaders in shades and drapes and blinds. It would be a great potential gain of higher-end customers for Fibaro if Home Center is able to support HD's PowerView.

 

More information is available at:

Please login or register to see this link.

Link to comment
Share on other sites

20 answers to this question

Recommended Posts

  • 0

@Fibaro,

 

I understand that custom-build plugin is still not supported at the moment.

 

Is there plans to work on support for Hunter Douglas's PowerView Motorization?

 

Many of the market leading home automation systems are now supporting Hunter Douglas's PowerView. Hunter Douglas is one of the market leaders in shades and drapes and blinds. It would be a great potential gain of higher-end customers for Fibaro if Home Center is able to support HD's PowerView.

 

More information is available at:

Please login or register to see this link.

 

 

Hello,

 

Thank you for your suggestion. I passed your idea to the appropriate team. The team will analyze the request for such a plugin.

Link to comment
Share on other sites

  • 0

@Fibaro

 

is there any update on this topic. It would really be great to have a HC2 connection to the Hunter-Douglas/Luxaflex Powerview system.

 

 

Link to comment
Share on other sites

  • 0

Powerview just arrived here.   Have found the informal API so perhaps we can get some control via a VD.  I may play around and I get any success,  will post back here.

 

Please login or register to see this link.

Link to comment
Share on other sites

  • 0

Maybe this is helpful in your playing around. Found this on github:

Please login or register to see this link.

I’m very interested in Powerview, eventually want to replace 20 hand-operated sunscreens by powerview systems.

 

 
 
Link to comment
Share on other sites

  • 0

Ok

 

This is very quickly thrown together but proves the concept and operates my Hunter Douglas Powerview blinds using the HUb generation 1.0.   Any constructive comments to improve the code (error handling or just elegance of my rough implementation) greatly received.

Please login or register to see this image.

/monthly_2018_02/image.png.db8b527def30440ec8b744568fedacf1.png" />

 

What does it do?

 

This VD mainloop creates up a global variable - currently set to "HDPowerviewBlinds" - if it doesn't already exist.   It then uses the PowerView API to query the hub to build a list of all the current scenes set up via the PowerView app on your iphone etc.   It builds a table of these scenes consisting of their name (spaces removed) as the table key, their scene ID and their long name (spaces remain).  It has to decode (base64) the name text from the API which adds some additional coding sourced from -- Base64 de/encoding source:

Please login or register to see this link.

 

-- Example  - scenes API call returns ...
--{"sceneIds":[21420,31686,64835,58576],
-- "sceneData":[{
--        "id":21420,
--        "networkNumber":0,
--        "name":"V2F0Y2ggVFY=",  <- needs base64 decode
--        "roomId":41157,
--        "order":0,
--        "colorId":14,
--        "iconId":67},
--        {"id":31686,"networkNumber":1,"name":"QWxsIE9wZW4=","roomId":41157,"order":1,"colorId":4,"iconId":95},
--        {"id":64835,"networkNumber":2,"name":"SGFsZiBzaGFkZQ==","roomId":41157,"order":2,"colorId":5,"iconId":77},
--        {"id":58576,"networkNumber":3,"name":"QWxsIGNsb3NlZA==","roomId":41157,"order":3,"colorId":15,"iconId":97}
--        ]}
 

so this is parsed into a simpler table json'd into the HDPowerviewBlinds global variable to provide the list of available scenes that you can execute.

 

The VD has three buttons - Previous, Next and Run Scene.

  • Prev/Next loop through all the scenes.  
  • Run Scene executes the scene through the API.

 

How to set up

Please login or register to see this code.

Each code block for buttons and main may include this header (or similar).   It should work without configuration but global variable can be any valid variable name but must be the same through out the VD code.  IP and PORT are your IP address of the Hunter Douglas Hub - find it on your network in the normal way.  Port is 80.   Configure these on the VD tab as normal.

 

image.png.7e240823087ec82902fa384a4680888b.png

 

The main code block sets up the global variable and should only execute if global variable is not found.

 

Please login or register to see this attachment.

Please login or register to see this attachment.

 

Please login or register to see this code.

 

Edited by ipsofacto
added the scene version
Link to comment
Share on other sites

  • 0
  • Inquirer
  • Great Effort and Big Thank You...

     

    I will check out when I can spare the time to digest the coding.

    Link to comment
    Share on other sites

    • 0

    Added a scene version that takes scene name (as defined in the Poweview application) and executes the scene.   see main post for scene code.

    Link to comment
    Share on other sites

    • 0

    Great work with this. big thanks!

     

    Could you please help with a little step by step manual on this setup? Wha should be done/edited and how?

     

    Bes regards

    Link to comment
    Share on other sites

    • 0

    You should be able to simply import and run.  It does expect you to have defined the scenes in the Powerview app provided by HunterDouglas.  It queries your hub for this list,  saves them locally in a global variable called HDPowerviewBlinds as a table of scene names and IDs.   The VD then simply lets you prev/next through this list,  displays it on the screen and lets you run the scene.

     

    Please login or register to see this image.

    /monthly_2018_06/image.png.16336349b73ef14a11f1304cb0ab3f82.png" />

     

    So in step form.

    1. Find the IP and port of your PowerView Hub.   Default port is 80 and your IP will depend on your router/network setup.
    2. Download the VD file (.vfib) posted in my entry above.
    3. Navigate to the Add Device page in your HC2
    4. Look for the Import Virtual Device button
    5. Browse to your downloads directory and import the vfib file you have downloaded.
    6. Choose which Room the Blind VD controller is in and save the VD
    7. Switch to the VD advanced tab
    8. HC2 needs to know the IP address and PORT used by your HunterDouglas hub so that it can a) fetch the name of all your scenes defined in the PowerView app on your phone/hub..   You specify these on the Advanced tab in the fields called IP address and TCP Port,.  (I use a Hometable variable setup and if this exists the MAIN code will look for jT.servers["HDPowerview"].ip and same for port.  You can ignore this if you do not use the Hometable concept)   
    9. The VD makes a global variable when it first runs (i.e. when you save it and the MAIN section code executes for the first time).   It assumes this is HDPowerviewBlinds  and creates that global variable if it doesn't exist.  You don't need to do anything ... unless you have several hubs.  In this case, check each of the code blocks for the buttons (advanced tab of VD).  You will see the global variable is named at the top of each code section;  you would change it here if you had to.

     

    Edited by ipsofacto
    Link to comment
    Share on other sites

    • 0

    Thanks a lot for your prompt response!

     

    I ge below message when debugging and no variable is created.

     

    also wonder if it will be possible to have a fibaroscene run a certain scene in this VD?

     

     

    [ERROR] 04:06:19: line 131: bad argument #1 to 'decode' (string expected, got nil)

     

    also 

    Link to comment
    Share on other sites

    • 0

    Ok

     

    I assume this is debug message from MAIN code block and probably relates to my use of "Hometable" - I have never tested without that in place!.     You can safely comment out the code in the main block that refers to jT.xxxx.   I can have another look later if you cannot resolve it.

     

    Not sure I follow second question.  Do you mean "can I add some more buttons that run a specific blind scene each time" ... Yes that is possible.   Without checking in detail,  you should be able to copy the "Run Scene" code block into another button and hardcode the name of the scene you want rather than fetching it from the ui.label that holds the current in-focus scene.

     

    post again if you cannot get it to work and I'll look more closely.


    Cheers

     

    Link to comment
    Share on other sites

    • 0

    GREAT! Works perfect. just removed the line (130) and it started to work.

     

    Yes, i meant if I could add buttons to run my Hunter Houglas scenes. I would like to use these scenes in my Fibaro wake up scene etc :) With that in place the VD is really good and I guess most users of the VD would appreciate this. So if you could help with code fot those buttons it would be great!

     

     

    Link to comment
    Share on other sites

    • 0

    You can do this using the HC scene that calls the Powerview Hub on HC2 using LUA.  I have simplified the code and re-attached below.   You would need to  ...

     

    Create a new scene on your HC2 by copying the code from attached file into the scene (go to scenes tab, select ADD Scene and choose a LUA scene).  Copy the code and paste into the code block.  Save this with a name like "DoPVBlind".   This is the "common routine" that you will call from any button code in a VD.

    Please login or register to see this image.

    /monthly_2018_06/image.png.ebd439b683a4cc15875dacfe667b668c.png" />

     

    You will need to take a note of the scene ID which you can see in the the URL when you are creating the scene.

    image.png.93fec165b347de074b13ef6e93cca3e4.png

     

    This scene will do all the "heavy lifting" for you.  You call it from any code block in a VD passing the name of the Powerview blind scene that you want to trigger e.g. to run an existing scene called "All Open" in the Powerview application/hub,  you simply add this code into any button.  

    Please login or register to see this code.

    You may need to change the following lines (line 30 onwards) in that scene code to match your IP/PORT and global variable name i.e. these lines in the scene code

     

    Please login or register to see this code.

    To make a simple VD with one button that operates a blind ...

     

    1. In devices, click Add Device and select "Add Virtual Device" and switch to the advanced tab
    2. Name your device and allocate to a room of your choice
    3. Tick the check box against one button and click Add
    4. Name the Button e.g. Label set to "Watch TV"
    5. Click the LUA code tickbox and replace the "string to send" with fibaro:startScene(567,{"All Open"})  ... 567 may be different in your system.  It is the scene ID of the scene we just created above.  "All Open" is a scene I have defined that does what it says on the tin!
    6. Click Save on the right-hand side vertical menu bar.
    7. Test it

    image.png.27d64ed4d47703a6c8f5d86bad41b5b4.png

     

    Files attached here  a) this very simple VD called Watch TV and b) a lua (text) file with the scene code.

     

    Have fun.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    Edited by ipsofacto
    Link to comment
    Share on other sites

    • 0

    Wow! Great work! thanks a .lot :) I have followed the instructions and i get the DoP scene triggered but noting happens. I have changed IP in the scene and also scenename in the VD.. any idea?

    Link to comment
    Share on other sites

    • 0

    quick thoughts as I did do a quick test and all was ok in my setup ... hmm.  how about these checks?

     

    • Original VD is needed to populate the global variable with the table of available scenes that you have defined on your PowerView application/ the hub.   Is that working ok - do a debug of the Main code block in the original VD?
    • In the original VD,  run the Previous or Next buttons under debug mode ... is that logging the blind scene names?  ..  do you see a list of blind scenes as you press previous/next?
    • double check the ip/port = which need to be of your Hunter Douglas Powerview Hub?
    • go to the variable panel and check what is is showing for your global variable?  Take care not to save here as it can cause other problems!
    • if you run the test VD and run the "watch tv" button under debug,  does it error or appear to work?

     

    Without double checking,  take care of capitals, spelling and punctuation of your blind scene name -  I don't think it is sensitive to these but worth double check

    Edited by ipsofacto
    Link to comment
    Share on other sites

    • -1

    Really appreciate you taking all this time to help!

    • Original VD is needed to populate the global variable with the table of available scenes that you have defined on your PowerView application/ the hub.   Is that working ok - do a debug of the Main code block in the original VD? yep, seems to be working perfect
    •  In the original VD,  run the Previous or Next buttons under debug mode ... is that logging the blind scene names?  ..  do you see a list of blind scenes as you press previous/next? :oops: Dont understand how to click the buttons during debug mode.. tried using another tab but didnt work.
    •  double check the ip/port = which need to be of your Hunter Douglas Powerview Hub? This is correct
    •  go to the variable panel and check what is is showing for your global variable?  Take care not to save here as it can cause other problems! For HDPoewrviewBlinds i only see the value {
    •  if you run the test VD and run the "watch tv" button under debug,  does it error or appear to work? cannot rund the debug :oops: but it seems to be working fine since it triggers the scene DoPVBlind

    Edit! got it to work!! first i opened the lua file in a texteditor (mac). But to be sure no formatting or anything was in the way I downloaded a lua editor and when copyinfg from this it worked great!!

     

    Also worth noticing for noobs like me is that the scene name to be executed is sensitive for upper/lower case letters.

     

    again, big thanks for great setup and help!

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