Andy P Posted December 17, 2023 Posted December 17, 2023 I have an EISY in the house and one in the barn. I wanted to be able to control some of the barn devices using the same web dashboard I use to control the house. I went through the forums and found lots of great information how to do this, so I am going to summarize it here to save others from having to hunt for it. 1. On the barn EISY, create a state variable that will represent the on/off status of the device you want to control remotely 2. On the house EISY, create a state variable that will mirror the value of the variable on the barn EISY. I used the same ID number to make things easier 3. On the barn EISY, create a network resource (Write Cupola) that sets the value of the house state variable from the value of the barn state variable using the API key for the house EISY from the portal (login to my.isy.io, select tool Information, select ISY Information, copy the URL to ISY info). Remember in my case they are both variable 13. The first 2/13 is the house variable that you are setting, the second 2.13 is the barn value you are using. The protocol name is GET but that is what you have to use to call the rest api even though you are putting the result to the other hub. Protocol Information: https GET Host: my.isy.io PORT: 443 Path: /isy/xxxxxxxxxxxhousethelongkeyfromtheportalxxx/rest/vars/set/2/13/${var.2.13} do not check Encode URI or Use SNI Under Details - Header - click on Add button and add Authorization which will pop up a window for you to put in your portal login information 4. Create a program on the barn EISY that runs when the device is switched on or off which then sets the value of the local variable and runs the network resource to copy it to the house. PushCupola - [ID 002D][Parent 002A] If 'Barn Cupola-On-Off' Status is On Then $sBarnCupola = 1 Resource 'Write Cupola' Else $sBarnCupola = 0 Resource 'Write Cupola' OK - now turn the device on the barn on and off a couple times and make sure the variable on the house hub switches between 0 and 1. To go back the other way, follow almost the identical process. You already have the variables set up, but you need a network resource on the house EISY to write back the barn for two way communication. Get the portal address for the barn the same was as you did for the house. 5. Create a network resource on the House EISY (Write Barn Cupola) that writes the value of the state variable to the barn. Remember I used the same variable id on both sides. If you have different ids, reverse them in this call from the one above. Protocol Information: https GET Host: my.isy.io PORT: 443 Path: /isy/xxxxxxxxxxxbarnthelongkeyfromtheportalxxx/rest/vars/set/2/13/${var.2.13} Under Details - Header - click on Add button and add Authorization which will pop up a window for you to put in your portal login information 6. Create a program on the house EISY that triggers the network resource when the value of the state variable changes ToBarnCupola - [ID 008E][Parent 0087] If $sBarnCupola is not -1 Then Resource 'Write Barn Cupola' Else - No Actions - (To add one, press 'Action') 7. Create a program on the barn EISY that reacts to a change in the state variable and switches the device on or off accordingly. SetCupola - [ID 0032][Parent 002A] If $sBarnCupola is 1 Then Set 'Barn Cupola-On-Off' On Else Set 'Barn Cupola-On-Off' Off Test this by changing the value of the variable in the house hub and see that it triggers the change in the barn. This is my dashboard that I use to trigger the remote devices - I am also mirroring the values of some Open/Close sensors. Hope this helps someone - as always, comments, corrections or suggestions are welcome! I should probably update the programs to set the init value whenever the local value is set. Andy 2
Recommended Posts