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

URL Command not working


Question

Posted

I try to call a HTTP URL:

Please login or register to see this code.

It works perfectly fine in the browser.

But when I try to translate it into lua-code for a button on a virtual device, nothing happens.

Please login or register to see this code.

Feels like I've made some minor stupid mistake, but cannot see it.

Any ideas?

Output

Please login or register to see this code.

[ Added: 2014-12-30, 20:14 ]

I've also tried using curl without success.

Please login or register to see this code.

Please login or register to see this code.

3 answers to this question

Recommended Posts

  • 0
Guest GG
Posted

Hi, I have tried to understand what is happening here.

If I try your command from ie, I get the followng transmission (I have had to change ip address and port to test this):

Please login or register to see this code.

If I do the same from a vd in HC2, I get this (I have added a forward slash before cgi-bin):

Please login or register to see this code.

There are obviously some headers missing when sent from HC2. Might be because of the you don't get any response.

Maybe you should try out

Please login or register to see this link.

.

Hope this helps

  • 0
  • Inquirer
  • Posted

    Weirdly enough, this works.

    Please login or register to see this code.

    Time to backtrack

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
    Guest GG
    Posted

    Might be the forward slash before cgi-bin that is now in the url but was not in your first post.

    Please login or register to see this image.

    /emoticons/default_icon_razz.gif" alt=":-P" />

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