Flic Home

    Community

    • Login
    • Search
    • Popular
    • Users

    Flic Hub - Http Request

    Flic Hub
    hub http request
    12
    16
    14388
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ap.iotbutton
      ap.iotbutton last edited by

      Guys, I found the solution.

      No need to add any HTTP headers.

      Just uncheck the slider button at "Validate Certificates" at the bottom of the Internet Request page, then your Http requests will work.

      Emil 1 Reply Last reply Reply Quote 0
      • ipsofact0
        ipsofact0 last edited by

        So with some pointers from Emil at Flic support, HUB works if we adopt Authorization: Basic base64. I would comment that iphone/iPad and FLIC combination seem to work either way.

        It was not obvious to me initially how to do this in the FLIC app ... so for anyone else wrestling with this ...

        • in FLIC app under your chose Hub, select the Internet Request"Hub Action"

        • add your URL which for me was http://192.168.1.nnn:80/api/sceneControl?id=nnn&action=start to run a scene on my home automation box (Fibaro HC2).

        • stick with GET http method (in my use case)

        • under the HTTP headers (Optional), set up basic authentication i.e. type "Authorization" in the Key field of the app

        • encode your "user:password" string using base64 (I used base64encode.org for online base64 encoding)

        • Prefix the encoded string with "Basic " including a trailing space

        • "Basic YWRtaW46YWRtaW4NCg==" is encoded "admin:admin" as an example. Key or paste all of this into the Value field in the FLIC app

        • Press the INSERT button on the right hand side below the key/value fields. You should then see this header line with a delete symbol (red circle white bar).

        • Press DONE to ensure all saved away

        It should work now - check your user:password encoding as first trouble shooting and/or check you HTTP verb - GET, POST depending on your target system protocols.

        Hope that helps someone else get there quicker than me.

        1 Reply Last reply Reply Quote 0
        • wwboynton
          wwboynton last edited by

          I'm having the same issue. Very disappointing. It's not trying to send the HTTP requests THROUGH flic as a service, is it? That would be really silly.

          1 Reply Last reply Reply Quote 0
          • bambi2000
            bambi2000 @bambi2000 last edited by bambi2000

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • ipsofact0
              ipsofact0 last edited by

              Well I have only inconsistent behaviour. I can pair flic to iphone and set up a simple HTTP via Internet Request.

              Configruation is straightforward. It is GET with http://user:pwd@192.168.1.nnn:80/api/sceneControl?id=544&action=start

              This works fine and triggers the scene on my Fibaro HC2 automation box.

              EXACTLY the same configuration to different FLIC button paired with the hub ... no repsonse, no error indication, no activity.

              Any pointers on what to try next ... at a loss on what I've missed. HUB not seeming like a market ready product to me at the moment!

              1 Reply Last reply Reply Quote 0
              • nic.b
                nic.b last edited by

                I’ve just tried controlling a smart socket via http from the Hub and it’s working great.
                It’s a Kk-sp3 socket and I had to hsck it a bit to get HTTP access but .... success.
                See below settings;
                0_1528893978688_845FA32B-BF33-45F1-A378-A226E8A0AD10.png

                1 Reply Last reply Reply Quote 0
                • ipsofact0
                  ipsofact0 @chris_private last edited by ipsofact0

                  @chris_private @bambi2000 @florian

                  I am having no luck with simple HTTP from FLIC HUB to local target - a Fibaro home automation box to start a simple scene http://xxx.xxx.xxx.xxx:80/api/scenes/538/action/start.

                  There is no indication of the failure point - do we have access to any logs or more detail on the hub? The level of documentation for this is pretty appalling - point me at something if I have missed it please!

                  1 Reply Last reply Reply Quote 0
                  • florian
                    florian last edited by

                    Same here... I did a quick test by spinning up a Docker container on my machine that logs all incoming requests and configured the Flic Hub to send the requests to that container.

                    The results are: Flic hub has no problems with sending requests to IP addresses, but requests sent to hostnames or FQDNs won't arrive at their destination (in this case the Docker container).

                    For me this workaround of using IP addresses is fine, because I will trigger scripts of my Home Assistant in my local network, so I can use the according IP address.

                    But this should definitely be fixed for domains / hostnames!

                    1 Reply Last reply Reply Quote 0
                    • bambi2000
                      bambi2000 last edited by bambi2000

                      Same experience here. Pasting all the field values into an Internet Request on af Flic controlled by my phone works perfectly, but the exact same field values pasted into a Flic controlled by the hub does not work. And there is no indication of what went wrong.
                      (App version 3.1.0, hub firmware 1.2.0)

                      bambi2000 1 Reply Last reply Reply Quote 0
                      • andreasrl
                        andreasrl last edited by

                        Hi,

                        I'm only just getting started, but my Flic Hub is successfully sending off HTTPS-requests for button events. I'm sending GET/POST/PUT/DELETE to my own server and it's working fine, and very quickly.

                        Have you confirmed the Hub has internet access? Could you try with another URL endpoint to verify the requests come through?

                        The only issue I have right now is that there's nothing useful included in the request. I can manually add headers and body-data, but it would make life much easier if the button-id was included in all requests per default.

                        1 Reply Last reply Reply Quote 0
                        • chris_private
                          chris_private @arnaud.perray last edited by

                          @arnaud-perray
                          i can agree with you... - the http-request will not work.
                          If i test it on the client on my mac all works fine.
                          but on the hub (all the same values) execution will not work.
                          also there is no http-response on the hub-app so it makes it very difficult to find the issue.

                          Chris

                          ipsofact0 1 Reply Last reply Reply Quote 0
                          • First post
                            Last post