Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Network Module Debugging

Featured Replies

Posted

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 ?)

post-4024-140474157035_thumb.jpg

I think msg, label, title and to should all be in the body and not be separate headers.

 

-Xathros

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

  • Author

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.

post-4024-140474157039_thumb.jpg

post-4024-140474157042_thumb.jpg

  • Author

I can do that. How can I set the proxy in the ISY to my laptop where I have wireshark or similar running ?

 

Stephan

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

  • Author

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

  • Author

I tried that and the UI doesn't allow me to do that.

 

Stephan

post-4024-140474157045_thumb.jpg

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

  • Author

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

post-4024-140474157047_thumb.jpg

If the ui is forcing a port try 80. Just to eliminate the port/ssl handshake as the problem.

  • Author

I also tried that and notifo doesn't allow that. SSL is mandatory :(

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.

  • Author

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

post-4024-14047415705_thumb.jpg

  • Author

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

post-4024-140474157052_thumb.jpg

  • Author

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.

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.

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

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.