GDavis01 Posted June 25, 2020 Posted June 25, 2020 I'm not sure if this is a Portal question or a Network question! I sometimes have a need to change my occupancy node from True to False (or the other way around). I have it set up on my iPhone (Safari browser page added to the home screen) which allows me to do this. However, I have been trying to set it up with ISY programs calling a network resource. My issue is that it works sometimes and other times it doesn't! I have attached a few screenshots: 1 shows my network resource setup; 1 shows the errors I get when it doesn't work ('TCP client read response failed' and 'TCP client write failed'); and finally the 1 that did work, which still shows 'Request Failed'! Any thoughts on why the response is inconsistent? I will often hit the Network Resource test button 2 or 3 times before it works!
kclenden Posted June 25, 2020 Posted June 25, 2020 5 hours ago, GDavis01 said: Any thoughts on why the response is inconsistent? No guesses as to why it's inconsistent, but a couple questions. First you're using a GET (as opposed to a PUT). Does reading the page really change the occupancy mode? While the ISY will allow you to execute a GET, it doesn't do anything with the response. Second you're using port 443 which implies SSL encryption. I don't know if ISY network resources support SSL. Perhaps other will pipe in on that.
larryllix Posted June 25, 2020 Posted June 25, 2020 (edited) @GDavis01Increase your timeout to about 800 mSec. It sounds like you are right on the boundary of the response time, depending on router traffic. @kclenden ISY seems to support SSL encryption, due to offering HTTPS and port:443. I assume that implies the same. Edited June 25, 2020 by larryllix 2
GDavis01 Posted June 25, 2020 Author Posted June 25, 2020 @larryllix... Thanks... it does appear to have been the timeout! My sweet spot seems to be around 900ms. @kclenden... Yes the GET does work. Just entering the lines below in a browser changes the state of the node. This is what I have set up on my iPhone and what I was trying to replicate with the Network Resource. https://my.isy.io/api/location/node key/report/out --> False https://my.isy.io/api/location/node key/report/in --> True 1
larryllix Posted June 25, 2020 Posted June 25, 2020 (edited) 10 minutes ago, GDavis01 said: @larryllix... Thanks... it does appear to have been the timeout! My sweet spot seems to be around 900ms. @kclenden... Yes the GET does work. Just entering the lines below in a browser changes the state of the node. This is what I have set up on my iPhone and what I was trying to replicate with the Network Resource. https://my.isy.io/api/location/node key/report/out --> False https://my.isy.io/api/location/node key/report/in --> True ISY is not an interactive system, and therefore can't do anything with the failure to respond-on-time, anyway, except to log it in the error log, and possibly not bash the next Ethernet packet out until a response is had or the timeout expires. Edited June 25, 2020 by larryllix
kclenden Posted June 26, 2020 Posted June 26, 2020 15 hours ago, larryllix said: ISY seems to support SSL encryption, due to offering HTTPS and port:443. I assume that implies the same. It seems reasonable to come to that conclusion, but doesn't SSL require a certificate to accomplish encryption? Perhaps that comes with the Portal.
larryllix Posted June 26, 2020 Posted June 26, 2020 20 minutes ago, kclenden said: It seems reasonable to come to that conclusion, but doesn't SSL require a certificate to accomplish encryption? Perhaps that comes with the Portal. I would assume so, somewhere but I have never used one.
Recommended Posts