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 Resource Help Request

Featured Replies

Posted

I’m having trouble implementing a Network Resource based on a curl command and would appreciate some help.

 

With curl installed, the following works from a command line, immediately returning an appropriate response from the (InControl Pro) application on port 1178:

curl -X PUT -H "Content-Type:application/json;charset=utf-8" -d "{\"password\":\"\"}" http://192.168.3.105:1178/zwave/getScenes

 

But, my attempts to translate the above into an ISY Network Resource fail, returning “Error: Request Failed,†and “N/A†in the ISY Resource Response window.

 

Error Log shows: [TCP-Conn] -1/-140002, Net Module Rule: 116

Bumping the Timeout to 9000 returns the same result.

 

I’ve tried various permutations of PUT, POST, modes, Encode URL, {} and "", all with the same result. Suggestions on what to try next will be greatly appreciated. Thanks.

post-889-140474162188_thumb.jpg

I think you need to take the password out of the body and place it in an authentication header instead.

 

-Xathros

  • Author

Thanks, Xanthos.

I've tried that but can't seem to properly omit the username when entering the PW in the Authorization header. I'll keep poking at it for a while.

Appreciate your input!

Thanks, Xanthos.

I've tried that but can't seem to properly omit the username when entering the PW in the Authorization header. I'll keep poking at it for a while.

Appreciate your input!

 

 

Can the other end be configured to require a username? Then you could pass both user and pass in the auth header.

 

-Xathros

  • Author

Sadly, no - it cannot.

  • Author

Thanks, Michel.

Yes, it is indeed on the same subnet. Other ISY Network Resources access other applications on that PC just fine, e.g, WCLink.

Hello wrj0,

 

Is rule 116 the one you are working with. Again, the error code means that ISY could not make a TCP socket connection and therefore I suspect networking issues. That's unless rule 116 is something else.

 

With kind regards,

Michel

  • Author

As you suspected, Michel, Network Resource ID=116 is the one I'm trying to get to mimic the curl command. Thanks for your reply and suggestion to look further at network issues. I'll keep poking at it. Thanks.

 

edit: Michel, I subsequently found that the curl command works only if run from the same PC that is running the application that I am trying to control. If the same curl command is run from another PC on the same subnet, it returns:

 

curl: (7) Failed to connect to 192.168.3.105 port 1178: Timed out

 

So, you nailed the problem. Think I'll sleep on this one and try again tomorrow. Thanks again for your advice and assistance.

 

edit again:

It turns out this was was a Windows Firewall issue on the PC running the application being controlled. Enabling a firewall rule to open port 1178 allows the curl command to return the desired response from any device on the local network, including the ISY's Network Resource. The body for the rule that is now working is: {"password":""}

 

Thanks Michel and Xanthros for your input. I'd still be banging my head without the benefit of your comments.

Excellent. Thanks for posting back with your results.

 

-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.