stephan Posted October 30, 2012 Share Posted October 30, 2012 Hi, I just purchased the network module and would like to improve my integration of various systems at home. Somehow my POST request isn't getting through and I don't know why. What is the best way to debug such a problem ? The error log doesn't give me a lot of information. I really would need some kind of request/response trace of what is going on to help me understand what is wrong. Is it possible to define a proxy to do this ? Just in case someone sees something obvious, I detail my problem here: I am trying to send a notification to notify to my iPhone from the ISY. I know that there is a growl wiki article, but notifo is free It works from my server by using curl like this "curl -k -u Shesmer:???????????? -d "to=shesmer&msg=Test" https://api.notifo.com/v1/send_notification" But when I try to do the same with the ISY it simply fails with "Request Failed". I attached a screenshot The error log shows this Tue 2012/10/30 12:59:58 System -170001 [HTTP] ??.???.???.??:64644->443 ( I changed the real IP with ?) Link to comment
Xathros Posted October 30, 2012 Share Posted October 30, 2012 I think msg, label, title and to should all be in the body and not be separate headers. -Xathros Link to comment
Michel Kohanim Posted October 30, 2012 Share Posted October 30, 2012 Hi stephan, I think Xathros is correct. Hi,It works from my server by using curl like this "curl -k -u Shesmer:???????????? -d "to=shesmer&msg=Test" https://api.notifo.com/v1/send_notification" From what I gather above: Protocol: https Host= api.notifio.com Port=443 Path=/v1/send_notification Body=to=shesmer&msg=Test With kind regards, Michel Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 Thanks for the tips. Unfortunately it is still not working. So how can I debug this? The error log doesn't give me a lot of information. Is it possible to define a proxy to do this ? In terms of the parameters. I played around A LOT. And I was able to successfully send something with POSTER in Firefox and see the whole req/resp pair through this way. I attached a screenshot. With the help of the req/resp pair from firefox, I was able to try every single header that I was missing. In the end I got 200 OK after I added the Accept-Encoding. But this did not help either as the response is cut off and the notification is not sent from notifo even though it works through POSTER in Firefox. Link to comment
Michel Kohanim Posted October 31, 2012 Share Posted October 31, 2012 Hi Stephan, the problem is that I do not know what curl does. Can you send me a wireshark traffic of a system that works. I cannot fathom why you would get request failed for content-encoding header. With kind regards, Michel Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 I can do that. How can I set the proxy in the ISY to my laptop where I have wireshark or similar running ? Stephan Link to comment
Xathros Posted October 31, 2012 Share Posted October 31, 2012 Hi Stephan- Run wireshark on the laptop and make the same request via the web browser on the laptop, record the conversation and post the result. -Xathros Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 Xathros, I fail to see how this helps as it works for me when I use firefox from my laptop. Only when the ISY itself is sending the request it fails. So I need to capture the traffic from the ISY. Am I missing something ? Thanks as always Stephan Link to comment
pounce Posted October 31, 2012 Share Posted October 31, 2012 Try dropping the port off the host. Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 I tried that and the UI doesn't allow me to do that. Stephan Link to comment
Xathros Posted October 31, 2012 Share Posted October 31, 2012 Stephan- The idea is so we can see a working conversation. That may give a clue as to what is wrong with the net resource. I'd like to see the content length and exact message (minus your auth hash) of the working conversation to compare with your rule. -Xathros Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 I see. I posted that already in the the attachment called ISY-POST1.jpg. Instead of wireshark I used LiveHTTPHeaders which gives you everything as well. Is that good enough or do you need wireshark ? I don't believe there is any more information in it though. Here is the attachment again Link to comment
pounce Posted October 31, 2012 Share Posted October 31, 2012 If the ui is forcing a port try 80. Just to eliminate the port/ssl handshake as the problem. Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 I also tried that and notifo doesn't allow that. SSL is mandatory Link to comment
pounce Posted October 31, 2012 Share Posted October 31, 2012 Not asking you to drop ssl. I'm just suggesting that you select port 80 (or no port) to allow the app server to negotiate the correct ssl port. Link to comment
Michel Kohanim Posted October 31, 2012 Share Posted October 31, 2012 Hi Stephan, In your test (outside of ISY), please remove the cookie and let me know if it still works. I suspect that the server is maintaining a session. With kind regards, Michel Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 pounce, no port is not possible based on what the UI allows and setting port 80 fails as well. Michel, good point. I tried that by cleaning out by browser cache and cookies. The result is still a success. Attached is the request/response pair Link to comment
pounce Posted October 31, 2012 Share Posted October 31, 2012 viewtopic.php?f=51&t=8755 See if that is an issue. Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 Hey pounce, thanks for spending the time with me and trying to figure this out. I don't think it is an SSL issue anymore since I do get a 200 OK message at one point. I wrote this a little earlier in this thread which kind of gets long. But even though I get a 200, the response data is cut off and the notification is not transmitted. Here is the screenshot again Link to comment
pounce Posted October 31, 2012 Share Posted October 31, 2012 I see a difference in modes. Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 I tried the modes again just now: URL-Encoded, RAW and C Escaped. All the same result "HTTP/1.1 200 OK Dat" no notification pushed. Link to comment
pounce Posted October 31, 2012 Share Posted October 31, 2012 I'm not sure how to set up a proxy on the isy, but you could set up a reverse proxy on a pc. I'm not sure of one for the mac, but I use fiddler for the PC. That might give you a little more info. Yes, it wasn't very clear from your post what was going on. I'd probably lower your timing to something reasonable as well. Link to comment
Xathros Posted October 31, 2012 Share Posted October 31, 2012 Stephan- For what it's worth, I am getting exactly the same results as you. I have exhausted my list of things to try to make it work. Did you choose Notifo for a reason or would you consider other options such as Pounce? I am doing this with Pounce and it works quite well for me. -Xathros Link to comment
stephan Posted October 31, 2012 Author Share Posted October 31, 2012 The main reason for me trying to get this running is money as this service including the iPhone App is free. Can you give me a few links for the alternative ? Or did you mean what is already documented on the wiki here http://www.universal-devices.com/mwiki/ ... tification ? Stephan Link to comment
pounce Posted October 31, 2012 Share Posted October 31, 2012 Try prowl and growl. Looks generally free/cheap. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.