Jump to content

How to set a State Variable with Program?


barkster

Recommended Posts

Posted

I was trying to set a state variable by sticking it in an then statement and leaving if blank and it worked but at weird times all my state variables would get set back to 0. The reason I need to do this is that Mobilinc for android doesn't support variables so I wanted a way to change variable from 0 to 1 and vice versa. Also, how can I track down what was changing my state variables??

Posted

ah, that explains it. Well the initial value is what I want it at so it's working, I'll just put a battery backup on it.

 

so if I wanted to set the variable using a program the correct way is to just leave if statement blank and put variable=1 in the then statement? And just run the then statement in mobilinc? It worked for me but I couldn't figure out why it was getting changed but now I know.

Posted
ah, that explains it. Well the initial value is what I want it at so it's working, I'll just put a battery backup on it.

 

so if I wanted to set the variable using a program the correct way is to just leave if statement blank and put variable=1 in the then statement? And just run the then statement in mobilinc? It worked for me but I couldn't figure out why it was getting changed but now I know.

 

I am not sure I understand what your goal is. Do you want the variable to be reset every time the ISY-994 restarts? If yes then leave your program the way it is. If not just add another line in your "If" statement "Init To" whatever value you want, and it will keep that value after a restart and you won't need a battery backup.

Posted

Makes sense, so I need to set the init and the value in my program. The whole purpose of this is to set a variable using a program because mobilinc for android cannot set them. So I need a way to be able to change the variables.

 

This is how I'm doing it and when I want to set it I just run the "Then" statement from mobilinc. Is this correct way, or should I say, the way I need to do it to accomplish what I need?

 

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       $AllowGarageAC  = 0
       $AllowGarageAC Init To 0

Else
  - No Actions - (To add one, press 'Action')

Posted
Makes sense, so I need to set the init and the value in my program. The whole purpose of this is to set a variable using a program because mobilinc for android cannot set them. So I need a way to be able to change the variables.

 

This is how I'm doing it and when I want to set it I just run the "Then" statement from mobilinc. Is this correct way, or should I say, the way I need to do it to accomplish what I need?

 

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       $AllowGarageAC  = 0
       $AllowGarageAC Init To 0

Else
  - No Actions - (To add one, press 'Action')

 

Yes, this will do what you want.

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...