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

Help translating curl https request to lua


codowd

Question

Hi

 

I'm updating the Daikin air conditioner VD to support thenew model wifi interface (Model BRP072C42), which use https rather than http to connect.  I have found (and greatly cleaned up) the existing Daikin VD on this forum.  Now i am trying to add support for the https interface.

 

I understand this will need the https request to be handled by a scene.  The VD will submit the request via a global variable and receive the results similarly.

 

A sample request, which works using curl is as follows:

 

Please login or register to see this code.

This doesn't appear to use any security (user, password) so will the following code work:

 

Please login or register to see this code.

Sadly this code works but produces no output from the HTTPS request call, and even if I overwrite the url to the HTTP request shown (commented out)  in the code, which produces a valid response in my web browser.

 

Obviously I will upload the finished VD and scene when done.

Edited by codowd
corrected code
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

JFYI: XML responses doesn't showing in HC2 debug windows.

Link to comment
Share on other sites

  • 0
  • Inquirer
  • 1 hour ago, 10der said:

    JFYI: XML responses doesn't showing in HC2 debug windows.

     

    Indeed, thank you.  The global variable is being set to "ERROR: Operation canceled".

     

    Trying to get the simpler HTTP call working, I do (rarely) see the red error message in the debug window.  if I change "POST" to "PUT" I get a different error "End of file". and it always shows.

     

    I never see the debug message with the HTTPS call.

    Edited by codowd
    more information
    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...