Http Get request not working

Hello,

I have just switched from ST to Hubitat. Although I could do a http get requrest in ST using Webcore, I get an error message when I use the Webcore instance from Hubitat. I tried useing Rule Matching to do the get request, but got the same error message.

The error message I get is:
http error Response Status: 408 error Message: Connect to 192.168.7.132:5005 [/192.168.7.132] failed: connect timed out

The get request is pretty simple and works if I execute on webbrowser.

Any help much appreciated. Sorry if I missed another topic dealing with same issue.

Can we assume that 192.168.7.132 is not the hub itself? (Guessing from the port number that it isn't.) 408 usually implies that the message found the correct destination, but it didn't reply timely - can you see the packets that were transmitted/received; i.e. a Wireshark capture?

Thank you for responding to my post.

IP is not hub. I don't know how to see the packets. I am not familiar with Wireshark but can try to learn it but I think this would take some time. Is the Wireshark capture the best road to take at this point?

It's a quick way if you have experience with it, but there are other ways to get the information. Can you post the Rule or Piston that you're attempting to use?

1 Like

Another option would be if you can try the http request using your browser IF you use Chrome.

You can go into the Chrome menu, select More tools, then select Developer tools. This opens up a secondary area in the browser window that shows what is happening with the webpage you are going to. So if you put the http request into the address you can see what it is coming back with in a bit more detail. With that error you would likely still get the error but you could select the item in the "Name" pane and see more detail about it in the "Headers" and possibly "Response" sections.

I use this a lot for determining how APIs work if they do not require two factor authentication or such.

1 Like

I can't upload an image of my piston. When I try, I get a dialog box that says:

"Sorry, you can't embed media items in a post"

But my piston is very simple and looks like this:

Execute
Make a GET requrest to http://{URL}/say/hello;
end execute

I also tried using Developer tools. When I pasted the http line above in my web broweser it worked but in one of the panes I got this message:

"Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received"

Sorry, I can't send images. I also had to remove the URL to be able to send. Any idea why I would not be able to upload or paste images?

Join the Hubitat Owner’s Group and the anti-spam restrictions are lifted.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.