Strebe Posted March 28, 2022 Posted March 28, 2022 I guess I have to admit defeat. I tried several things and can't get this to work. I have two ISYs (5.3.0) at separate homes so they are not on the same network and I want to pass a variable from ISY1 to ISY2. They are both on the UDI Portal and have the Network Resource module. I have made several assumptions and obviously one or more of them is wrong . I have setup a set NR on ISY2 to Get the variable from ISY1. 2/50 is the state variable on ISY1 that I am getting and ${var.2.12} is the state variable on ISY2 that I want to put the value in. I tried using the actual variable name $sOutdoorTemp instead of ${var.2.12} but that didn't work. I can do a get from a browser so I know that basic functionality is working fine. Using the Authentication header and giving it my portal credentials which seems to work fine. Guessing I need to do https and use port 443. Tried checking both Encode URL and Use SNI but neither option appeared to help. Below is from the Resource Editor. Not sure if that is enough info to provide help. When I test the NR I get HTTP/1.1 200 OK x-powered-by: Express Vary: Origin content-length: 104 connection: Keep-Alive www-a GET /isy/ISY1_string_from_UDIPortal/rest/vars/set/2/50/${var.2.12} HTTP/1.1 Host: my.isy.io:443 User-Agent: Mozilla/4.0 Connection: Close Content-Type: application/x-www-form-urlencoded Authorization: Basic XXXXXXXXXXXXXXXXXXXXX
asbril Posted March 28, 2022 Posted March 28, 2022 Your situation is a bit different from mine, but it may just work..... For a number of reasons, I have part of my setup on ISY and another part on IonP. I needed a specific device in IoP to act on the status of another device in ISY. I put a Kasa plug and installed the Kasa Node server on both ISY and IoP. So when the status on the ISY device changes, I programmed that then the status ofn the Kasa device also changes. As the same Kasa device also shows in IoP, I then have a program in IoP that acts on the status of that Kasa device. Maybe you can achieve your goal that way.
Javi Posted March 28, 2022 Posted March 28, 2022 Everything looks correct and the response 200 indicates it was received. Below is a working NR form one ISY to another using portal. Do not check Encode URL, Use SNI does not appear to affect this resource. Also be sure you are using https and the portal user name and password and press "Update" then "Save" in the Resource Editor and "Save" the bottom of the Network Resource Tab before running the test. Being that everything looks ok in your posted setup and response I would verify that you are using the correct URL to ISY. GET /isy/XXXXXXX/rest/vars/set/2/2/${var.2.1} HTTP/1.1 Host: my.isy.io:443 User-Agent: Mozilla/4.0 Connection: Close Content-Type: application/x-www-form-urlencoded Authorization: Basic XXXXXXX 2
tmorse305 Posted March 28, 2022 Posted March 28, 2022 (edited) 2 hours ago, Strebe said: I have setup a set NR on ISY2 to Get the variable from ISY1. 2/50 is the state variable on ISY1 that I am getting and ${var.2.12} is the state variable on ISY2 that I want to put the value in. 2 hours ago, Strebe said: GET /isy/ISY1_string_from_UDIPortal/rest/vars/set/2/50/${var.2.12} HTTP/1.1 You said you are trying to load var.2.12 with the value from 2/50. Doesn't this GET do the opposite? I think the NR needs to be set up on ISY1 to set the ISY2 variable. Edited March 28, 2022 by tmorse305 1
Strebe Posted March 28, 2022 Author Posted March 28, 2022 Thanks everyone for your response. After seeing tmorse305 suggestion of pushing the value from ISY1 to ISY2 instead of pulling the value from ISY1 to ISY2, I then concentrated on that and although I had already tried that there most of been a and extra space or something in the path line as I copied and pasted the ISY URL again and low and behold the variable got pushed to ISY2. Thanks again. I appreciate the responses.
Recommended Posts