Jump to content

Portal Occupancy Node Server change via Network Resource


GDavis01

Recommended Posts

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!

Portal_01.thumb.jpg.5ca0644d561c81d1ed054b5931ca5208.jpgPortal_02.thumb.jpg.77c472afddf50f6fefbea67bf316ecb0.jpgPortal_04.thumb.jpg.d1ace6f7b9eb3fe4b4f51e78f585766b.jpg

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

Link to comment

@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

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

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

Link to comment

Archived

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


×
×
  • Create New...