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

HTTP request with virtual device not working


Question

Posted (edited)

Hi,

 

I just purchaed a HomeCenter Lite. I want to control my Somfy RTS window blinds by interfacing with my HomeWizard.

 

When I copy and paste the following URLs in the address-bar of my browser I can control the window blinds fine.

 

http://<ip address homewizard>/<password>/sf/41/down

http://<ip address homewizard>/<password>/sf/41/up

http://<ip address homewizard>/<password>/sf/41/stop

 

Now I want to create a virtual device in HC Lite which controls the window blinds, but no matter what I try I can't get it to work. I've tried for example this request:

 

GET /<password>/sf/41/up

 

And have filled in the IP and portnumber (80) of the homewizard in the settings for the virtual device, but nothing happens when I click on the button.

 

I have found an example on how to do this for HomeCenter, but that uses LUA.

 

Please login or register to see this link.

 

But how can I accomplish the same in HomeCenter Lite?

 

Frank.

 

 

 

Edited by FrankWest

18 answers to this question

Recommended Posts

  • 0
Posted

You can do this by using API in VD. Try search forum for that, there are pretty good explainations to find.

  • 0
  • Inquirer
  • Posted

    I searched the forum, but all examples I can find are using LUA and isn’t the API only for homecenter itself?

     

    I’ve tried this code in the virtual button, but it doesn’t work. Nothing happens:

     

    GET /<password>/sf/41/up

    Host: <IP HomeWizard>

     

     

     

     

     

    • 0
    Guest pablo77
    Posted

    Create new VD, fill IP and PORT of Your device. Try this:

     

    GET /control?cmd=play,1 HTTP/1.1
    Host: 192.168.1.159
    Authorization: Basic YWRtaW46cm9vbWJhd2lmaQ==

     

    Just change IP

    • 0
  • Inquirer
  • Posted

    Hi,

     

    this command isn’t the command I need, so what’s the purpose of doing this?

    • 0
    Guest pablo77
    Posted

     

    GET

    Please login or register to see this link.


    Host: 192.168.1.XXX
    Authorization: Basic YWRtaW46cm9vbWJhd2lmaQ==

     

    This one is not working ??

    • 0
  • Inquirer
  • Posted

    No it doesn't. The password should be included in the URL and it doesn't use authorization.

     

    I've tried you example, but still nothing happens.

    • 0
    Posted (edited)

    Did you try GET /<password>/sf/41/down with above?

    Edited by Reintjan
    • 0
  • Inquirer
  • Posted

    Yes I did, same result unfortunately.

    The example mentioned contains the username and password for a Roomba in the Authorization part, that's got nothing to do with HomeWizard. 

     

    HomeWizard doesn't require you to logon first when sending HTTP commands since the password is included in the URL (and yes, this is quite insecure).

    • 0
    Posted (edited)

    I think answer is in this topic about http commanding a foscam. In the scond post there is a solution for sending http through vd to foscam cam including user and password

     

    Edited by Reintjan
    • 0
    Posted

    Hello Frank, did you manage to get it work? I want the same thing, migrate from Homewizard to Fibaro and want to let my Fibaro sent requests tot Homewizard.

    • 0
  • Inquirer
  • Posted

    Hi,

     

    unfortunately not. I gave up...

     

    Frank.

    • 0
    Posted (edited)

    Please login or register to see this code.

    please try the following Code in your vd button 

     

    Please login or register to see this code.

    And insert the ip address of your homewizard and Port 80 on the First „Page“ of the vd configuration

    same for you @Hayco

    Edited by StefanS
    • 0
  • Inquirer
  • Posted

    Hi Stefan,

     

    Your suggestion  is LUA code which the Homecenter Lite doesn't support.

    • 0
    Posted

    Sorry. I flew over your question a little bit to quick <_<

    did you try the Link you use in your browser in your vd button?

    • 0
  • Inquirer
  • Posted

    Yes, doesn't work. Tried every combination,  but eventually gave up.

    • 0
    Posted

    I have put "0x0D0x0A0x0D0x0A" behind the HTTP request and it is working now. I don't know exactly what this means, but it works.

    So my command looks like this: 

    GET /{password}/sw/8/on HTTP/1.10x0D0x0A0x0D0x0A

     

    • 0
  • Inquirer
  • Posted

    Unfortunately still not working for me. Nothing happens when I click the virtual button.

    • 0
    Posted

    Maybe there are spaces in your string that shouldn't be there, or spaces are not in your string when it should be. Copy the string to Notepad so you can have a good look at the string. I had the same problem with another device, I copied-pasted a string from a website to the string field of Fibaro HC. When I copied it to Notepad, I saw spaces that shouldn't be there.

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