Jump to content

Network Resource Help Request


wrj0

Recommended Posts

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

Link to comment
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

Link to comment

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.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...