Announcement

Collapse
No announcement yet.

Is it still possible to send HTTP commands to the Hub 2 with FW 1018+

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Is it still possible to send HTTP commands to the Hub 2 with FW 1018+

    Trying fetch the buffstatus.xml on a Hub 2. I am getting the response: `401 Unauthorized: Password required` using basic auth. This used to work, and I believe the OpenHAB community is still using local bindings.

    #2
    I got it to work when using the public IP address, but not the local IP address ::shrug::

    POST /buffstatus.xml HTTP/1.1
    Authorization: Basic xxx
    User-Agent: PostmanRuntime/7.21.0
    Accept: */*
    Cache-Control: no-cache
    Postman-Token: xxx
    Host: xx.x.xx.xxx:25105
    Accept-Encoding: gzip, deflate
    Content-Length: 0
    Connection: keep-alive



    Comment


      #3
      Not able to turn on a light though...

      Request to turn on light:

      POST /3?02621D247D0F11FF=I=3 HTTP/1.1
      Authorization: Basic asdfasdfsdf
      User-Agent: PostmanRuntime/7.21.0
      Accept: */*
      Cache-Control: no-cache
      Postman-Token: asdfasdf
      Host: xx.x.xxx.xxx:25105
      Accept-Encoding: gzip, deflate
      Content-Length: 0
      Connection: keep-alive

      Response:

      HTTP/1.1 200 OK
      Connection: close
      Content-Type: text/html
      Cache-Control: no-cache
      Access-Control-Allow-Origin: *


      Request for buffstatus.xml

      POST /buffstatus.xml HTTP/1.1
      Authorization: Basic asdf
      User-Agent: PostmanRuntime/7.21.0
      Accept: */*
      Cache-Control: no-cache
      Postman-Token: asdf
      Host: x.x.xxx.xxx:25105
      Accept-Encoding: gzip, deflate
      Content-Length: 0
      Connection: keep-alive

      Response:

      HTTP/1.1 200 OK
      Connection: close
      Content-Type: text/xml
      Cache-Control: no-cache
      Access-Control-Allow-Origin: *
      <response><BS>02621D247D0F11FF0602501D247DABCDEF AF 11FF0000000000000000000000000000000000000000000000 00000000000000</BS></response>



      The response broken down:

      02 - start of text
      62 - Send Insteon Standard Message
      1D247D - Device Insteon ID
      0F - Flags Byte: Standard message flag
      11 - CMD1: On
      FF - CMD2: Level
      06 - PLM got it
      02 - start of text
      50 - Insteon standard message received
      1D247D - Device Insteon ID
      ABCDEF - Hub Insteon ID
      AF - A0 = ACK + F = hop count??
      11 - CMD1: On
      FF - CMD2: Level


      The AF doesn't look right...0xA0 = 160 which is not an Ack, and 0x0F is 15 which couldn't be the hop count.
      Last edited by brandt; 01-13-2020, 03:56 PM.

      Comment


        #4
        It looks like the device isn't a responder to your hub.

        The AF flags you are getting, 1010 1111, the high 3 bits, 101 corresponds to "NAK of Direct Message", the next bit is the extended bit, which this is not an extended message. The last 4 bits are the hops left and max hops, for both you have 3, meaning this message did not need to be repeated, but could have been repeated 3 times.

        Comment


          #5
          Thanks for breaking it down. This device and others that also get the AF byte have all been linked to the Hub with the Insteon for Hub app.

          Comment


            #6
            Originally posted by brandt View Post
            I got it to work when using the public IP address, but not the local IP address ::shrug::

            POST /buffstatus.xml HTTP/1.1
            Authorization: Basic xxx
            User-Agent: PostmanRuntime/7.21.0
            Accept: */*
            Cache-Control: no-cache
            Postman-Token: xxx
            Host: xx.x.xx.xxx:25105
            Accept-Encoding: gzip, deflate
            Content-Length: 0
            Connection: keep-alive



            So it turns out the public IP address was port forwarded to my Hub 1. The Hub 1 currently doesn't have any devices associated with it. It did work with a couple devices I found, but it must been leftover half-links from removing devices in IFH.

            That being said, I still have to prove this works with a Hub 2...

            Comment


              #7
              Can anyone use http to communicate with their Hub 2?

              Comment


                #8
                So I figured out the issue....The Hub 2's username and password listed in the Insteon for Hub app (from the Insteon API) wasn't actually what the Hub's username and password was set to. I resaved the username and password through the Insteon for Hub app and can now send HTTP commands to the Hub 2!

                Comment


                  #9
                  Hello Brandt, I was about to reply but I saw that you already figured it out.
                  I am trying to get the status of my open/close (door sensors) using http but I have not been very successful.
                  Turning lights on and off and getting their status works fine but their is not much info on the programming of 2843-222 or other open/close sensors.
                  Any ideas?

                  Comment


                    #10
                    Edu. The Open Closed Sensors and the other battery operated Insteon devices. Go into a power saving mode [asleep]. Some will stay awake if on their optional AC power supply. You can't query them for their present status or program them when on battery power.

                    You can wake them up using the set button as described in the users manuals. Before querying them for their present status or to program them.
                    Last edited by BLH; 06-13-2020, 03:56 AM.

                    Comment


                      #11
                      I think you can use the hub's b.xml to get the status of sensors:

                      http://192.168.0.100:25105/b.xml?01={page}=F

                      where page is in the format of dd (up to 16 i think)

                      I forgot how to parse the results but you have to match the top part with the bottom part by index

                      Comment


                        #12
                        Ok, I know this is an old thread, but is it still possible to use HTTP commands directly with the Hub (2245-222)?
                        If I send the following as a POST:
                        I get a timeout (using Postman), but if I put the wrong password in the URL, I get the "401 Unauthorized: Password required" message right away. If I use a browser, I get the login popup, but it will not accept my user name and password (and I am using the Hub user name found on the Settings>House page).

                        Thanks in advance!

                        Comment


                          #13
                          Hey Zimbrich did you every work this out?? I am having the same issue. I think the username and password has changed with 1018 or 1019 firmware.

                          Comment


                            #14
                            I tried a network reset and a factory reset, and it still does not solve the issue.

                            Comment


                              #15
                              Nope, never did get it to work.

                              Comment

                              Working...
                              X