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.
Announcement
Collapse
No announcement yet.
Is it still possible to send HTTP commands to the Hub 2 with FW 1018+
Collapse
X
-
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
-
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
-
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
-
Originally posted by brandt View PostI 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
-
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
-
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
-
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
-
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
Comment