Jump to content

Can you set Variables or Notifications via REST?


daxiang28

Recommended Posts

Posted

I was wondering if it was possible to set variables or the content of notifications remotely. Say for example, I wanted to send an alert to an Elk keypad and I have the Network Module ping a page for data. Is there a way to get that data into the system via REST or the Network module? Been scouring the forums and haven't seen anything about it.

 

Steve

Posted

Hi Steve-

 

As long as the data is Integer, you can /REST it to a var then use that var in a custom notification. No String type vars yet. If there are a limited number of possible string values, you could create separate customized notifications for each then pass an integer index to select a notification.

 

-Xathros

Posted
Hi Steve-

 

As long as the data is Integer, you can /REST it to a var then use that var in a custom notification. No String type vars yet. If there are a limited number of possible string values, you could create separate customized notifications for each then pass an integer index to select a notification.

 

-Xathros

 

 

Thanks Xathros. Do you know the path structure for variables? I could not find it in the wiki.

 

Steve

Posted

Xathros,

 

Found it in another post by Chris Jahn

 

Yes, the variables are available through REST: 

/rest/vars/set/// -- set the value of a variable 
/rest/vars/get// -- get the value of a variable 

1 - Integer, 2 - State 
ID of the variable 

e.g. Set integer variable 3 to 28 

/rest/vars/set/1/3/28

 

viewtopic.php?t=5987

 

Steve

Guest
This topic is now closed to further replies.

×
×
  • Create New...