Jump to content

Badrobots

Members
  • Posts

    14
  • Joined

  • Last visited

Badrobots's Achievements

Newbie

Newbie (1/6)

0

Reputation

  1. Yes, that's the reason I also include the "OR" statement which at that point should still be true. Only at the end of the program will it revert back to 0. But it doesn't work. The variable is a state variable. Would it work in this case as an integer?
  2. Here is the code - thanks! If From Sunset To 9:00:00PM (same day) And Status 'Garage door' is Off And Status 'Kitchen Keypad.1' is Off And Status 'Living Room' is Off Or $Honeyhometrue is 1 Then $Honeyhometrue = 1 Set 'Thermostat- Main' 20° (Heat Setpoint) Set 'Basement Keypad.1' On Set 'Living Room' 70% Set 'Kitchen Keypad.1' 70% Set 'Bar/Sink' 70% Wait 2 minutes Set 'Basement Keypad.1' 60% Set 'Living Room' 50% Set 'Dining Room' 60% Wait 2 minutes Set 'Basement Keypad.1' 40% Set 'Dining Room' 40% Set 'Kitchen Keypad.1' 35% Set 'Bar/Sink' 55% Set 'Den plug in lights' 30% Set 'Living Room' 30% Set 'Library' 30% Set 'Library Ceiling Light' 18% Wait 2 minutes Set 'Basement Keypad.1' Off Set 'Dining Room' Off Set 'Fountain' On $Honeyhometrue = 0 Else - No Actions - (To add one, press 'Action')
  3. I have an ISY 99 with various insteon switches and outlets. I've gotten simple programs to work, but am not having much luck with more ambitious projects. There are two basic things I'd like to do: 1. Include multiple options depending on different conditions. I don't know if this is possible, or if you need to write a seperate program for each option, but here is what I'd like to do: I have an evening program that evaluates conditions, and then turns lights on. Depending on conditions, I would like it do different things. For example: The program is activated when the door switch (connected via EZIO) is activate, AND its after sunset AND the lights are not already on. So far so good. But, if the thermostat is still in daytime mode, I'd like to kick it into evening mode. And if the some of the lights are already on, I would like to run a limited version of the program (just hallway lights). I could do seperate programs for each of these actions, but I'd be duplicating a lot of code, and it's not a very elegant solution. Is this sort of thing possible? 2. Run a series of events without re-evaluating the initial conditions. So, taking the evening program: It activates when the door is opened and the lights are all off. So far so good. Then it slowly adjusts the lighting from "bright so I don't trip on stuff in the hall" to a more mellow, evening lighting. When it re-evaluates the initial conditions, now the lights are on, so the program stops. OK, I found a "hack" way around this. I set the program to turn one of the lights to an odd value - e.g. living room to exactly 97%, and then include this value as an "OR" under the original conditions. Since its very unlikely that I would accidently set the living room lights to exactly 97% when I'm home, it works ok. But is not very elegant. I was thinking of trying to use a variable to solve this but am having some difficulty. My thought was (this is just the logic, not code) IF (door open, lights off, after sunset, etc) OR IF (Variable "ImHome" = 1) THEN: Set Variable "ImHome" = 1 Set initial light WAIT Change lighting WAIT Change lighting again Set Variable "ImHome" = 0 Seems logical to me, but doesn't work. Any comments welcome!
×
×
  • Create New...