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

Akuvox HTTP POST


przemo_z

Question

I am trying to send HTTP POST as below.

 

Please login or register to see this attachment.

 

I prepared the following code with the result.

 

 self.http:request("http://192.168.8.138:80/fcgi/do?id=130&id=12&RefRand=41007230", { 
        options = { 
        method = 'POST'
        headers = {
            ["Accept"] = "*/*",
            ["Accept-Encoding"] = "gzip, deflate",
            ["Accept-Language"] = "en-us",
            ["Content-Type"] = "application/x-www-form-urlencoded",
            ["Connection"] = "keep-alive",          
        }, 
        data = "SubmitData=begin&Operation=Submit&cInputEnable=1&SubmitData=end"
    }, 

 

Please login or register to see this image.

/monthly_2023_08/image.png.dcb7f0c638bd7f978f1479f8f08d4576.png" />

 

I can't make "&" character as a normal character. Any idea how I can make the string "SubmitData=begin&Operation=Submit&cInputEnable=1&SubmitData=end" as without special characters?

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Yes, use url encoding. Use a website and hardcode the encoded url in: 

Please login or register to see this link.

Or use this function:

 

Please login or register to see this code.

 

Link to comment
Share on other sites

  • 0

@

Please login or register to see this link.

 Could you get the Akuvox to work with the HC3. Appreciate it if you could update.

 

Thanks

Link to comment
Share on other sites

  • 0
  • Inquirer
  • Hi, urlencoder helped however I have to create other HTTP messages to change the parameter I want becuase Akuvox doesn't have API for it.

    Link to comment
    Share on other sites

    • 0

    @przemo_z

    If I understood it well, you will try to emulate the sending of the page with the settings for the inputs via HC3. It is not a completely standard way for integration. The API does not contain these orders.
    String you have made a help of Wireshark. However, it certainly escaped that this string was authenticated (you have applied to the web interface of the Akuvox and only then you chose from the input setting menu, which you captured then).

    Akuvox imposes integration via "http get" in the command. It is the end of the end associated with the opening of the door/ switch on the outputs, etc.

    That's why I ask ... What is the reason to try to configure inputs? Condition to perform some form of bypass input on the Akuvox with respect to the state of securing zones HC3?

    Link to comment
    Share on other sites

    • 0
  • Inquirer
  • I would like to deactivate the input for the night as I have a button to open the gate outside of my house.

    Edited by przemo_z
    Link to comment
    Share on other sites

    • 0

    @przemo_z

    Ah,.. I understand that.
    So, either you will solve the authentication issue from HC3 to Akuvox and you will send POST strings.
    Or I have another tip.
    Akuvox panels have several relays for controlling different devices (depending on the type of panel). You can control these individual relays with the help of the official API and even with the GET method, and I have a feeling that even without authentication,... or the name and password can be transferred in a chain.
    So connect the crude relay in series with your input button.
    From HC3, you can then send a standard command according to the documented API to flip the relay and disconnect the input button circuit.
    In addition, if you use an internal LCD video panel, you can define your own functions directly on those panels.
    You have a question. How high is the fence with the gate so that someone could not easily climb over it? :)

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