Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can you set Variables or Notifications via REST?

Featured Replies

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

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

  • Author
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

  • Author

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.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.