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 HCL


Ahmed

Question

I am aware that HCL doesn't support LUA. But, is there a way to send simple HTTP command from HCL to other IP based system using virtual device? example like below command

Please login or register to see this link.

address/command/?cmd=temp%200058

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

yes in virtual device use search on forum with "virtual device GET"

Link to comment
Share on other sites

  • 0
  • Inquirer
  • yes in virtual device use search on forum with "virtual device GET"

    Tried searching lot, could not get proper information. All i found is LUA based. Can you explain how i can do this without LUA

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • its a simple IP based relay.

    uses simple http control like,

    Please login or register to see this link.

    XXX/command/?cmd=stop

    Please login or register to see this link.

    XXX/command/?cmd=start

    this command perfectly works over webpage. To test from HCL, i also added this same command in one PTZ control of IP camera. Even it works when i press that button. Just not able to configure in virtual device

    Link to comment
    Share on other sites

    • 0

    Have a look at this:

    Please login or register to see this link.

    I made a working virtual device. Just change the address and you should be good.

    Link to comment
    Share on other sites

    • 0

    Ahmed,

    simple http commands won't work in virtual device buttons without lua

    Try creating a virtual device with ip adress of Your device.

    Then create button and place there command:

    GET /command/?cmd=stop

    HTTP/1.10x0D0x0A0x0D0x0A

    It is also important if that device needs an authorization.

    Regards

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Ahmed,

    simple http commands won't work in virtual device buttons without lua

    Try creating a virtual device with ip adress of Your device.

    Then create button and place there command:

    GET /command/?cmd=stop

    HTTP/1.10x0D0x0A0x0D0x0A

    It is also important if that device needs an authorization.

    Regards

    Thanks, it worked to only start and stop commands. It dint work for this command

    GET /command/?cmd=start%20time001

    HTTP/1.10x0D0x0A0x0D0x0A

    Same command works fine in LUA, Like

    HWS = Net.FHttp("192.168.x.xxx",80)

    HWSReponse = HWS:GET("/command/?cmd=start%20time001")

    any help?

    Link to comment
    Share on other sites

    • 0

    Ahmed,

    GET don't recognize space symbol (%20) and probably ignores it when sending a command (and corrupts it), try omitting it in code. Most devices don't use commands with space, what type of device do You have, can You change those commands manually?

    You can also check if there is a way to send this time parameter with other command.

    Regards

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • Ahmed,

    GET don't recognize space symbol (%20) and probably ignores it when sending a command (and corrupts it), try omitting it in code. Most devices don't use commands with space, what type of device do You have, can You change those commands manually?

    You can also check if there is a way to send this time parameter with other command.

    Regards

    Thanks, yes it dint take symbol. I will try to change code.

    Link to comment
    Share on other sites

    • 0
    On 7/30/2014 at 8:02 PM, murnko said:

    Ahmed,

    simple http commands won't work in virtual device buttons without lua

    Try creating a virtual device with ip adress of Your device.

    Then create button and place there command:

    GET /command/?cmd=stop

    HTTP/1.10x0D0x0A0x0D0x0A

    It is also important if that device needs an authorization.

    Regards

    Hi

     

    I am in the same boat, but instead of a "device"  I am trying to send HTTP command to IFTTT, so the url is 

     

    Please login or register to see this link.

     

    How do I make this work. Have tried putting maker.ifttt.com in the IP field. and then created a button with below command

     

    POST /trigger/home_announcer_start/with/key/{key} HTTP/1.1

     

    does not work. If I put the url in the browser all is good.

     

    Can you please assist.

     

    Regards

    Sammy

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