barkster Posted August 21, 2013 Posted August 21, 2013 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??
ISYhbsh01 Posted August 21, 2013 Posted August 21, 2013 Did you by any chance have had power outages? That would reset the variables. Sent from my SPH-D710 using Tapatalk 2
Jimbo.Automates Posted August 21, 2013 Posted August 21, 2013 If it's a power outage, then you can also set the init value for the variable to make it stick. Sent from my SAMSUNG-SGH-I337 using Tapatalk 4
barkster Posted August 21, 2013 Author Posted August 21, 2013 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.
ISYhbsh01 Posted August 21, 2013 Posted August 21, 2013 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.
barkster Posted August 21, 2013 Author Posted August 21, 2013 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')
ISYhbsh01 Posted August 21, 2013 Posted August 21, 2013 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.
Recommended Posts