Jump to content

Variable +1 Using Rest Command


zerop

Recommended Posts

Posted (edited)

Is there a way to +1 to a variable using the rest command?  I use the following to set the variable to 2 and everything works fine.

/rest/vars/set/1/18/2

I'd like to be able to increment the variable using the rest command.  My current workaround is to have a program in the ISY that increments the variable ($VariableName += 1) in the "Then" part of a program and to use the rest command to run the program (/rest/programs/<programID>/runThen).  I'd like to skip the program part.

 

I've tried /rest/vars/set/1/18/+1 but that doesn't work.

Edited by zerop
  • 5 weeks later...
Posted

The program you have is the solution.  This is a specific use case, which has a working solution. So, I'm not sure it is a good fit for inclusion in firmware.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.4k
×
×
  • Create New...