BraveSirRobbin
Moderator
I also posted this on ADI's forums.
I would like to incorporate an Ocelot “Home/Away†variable based on my car’s status as indicated by my X-10 Car Monitor .
The basic details on how this car monitor works is as follows:
When the car is running, an X-10 “I-15 ON†signal is broadcast every three seconds.
When the car turns off the “I-15 ON†broadcast is stopped and an “I-15 OFF†signal is broadcast continually for 10 seconds. After those ten seconds no other signal is sent from the car. As soon as the car is started the I-15 ON signal is broadcast as described (even if it is started before the ten second I-15 OFF signal is completed).
I was thinking about incorporating logic in the Ocelot to properly set a variable to HOME or AWAY. I sometimes warm the car up for a few minutes in the morning (time period varys). Also, I sometimes have to start the car for short periods to move it into the garage for the evening, or move it out of the garage so I can do some work inside the garage.
Here is the C-Max logic (I just show Variable1’s values as “HOME†or “AWAY†instead of zero or one for ease of reading):
So basically when the car is running, Timer1 is always being “started†every three seconds (car monitor broadcasts I-15 ON every three seconds). The car then has to be out of range (can’t receive the X-10 signal) for 60 seconds before Variable1 = AWAY mode and Timer1 resets.
If at any time during Timer1’s 60 second countdown an I-15 OFF signal is received (car turned off), then the timer will reset and Variable1 is set to HOME.
I tried running through all scenarios to see if this could give a false indication of HOME or AWAY and couldn’t find any (which scared me into asking for help!).
I would truly appreciate and value opinions with this logic from this forum’s members.
I would like to incorporate an Ocelot “Home/Away†variable based on my car’s status as indicated by my X-10 Car Monitor .
The basic details on how this car monitor works is as follows:
When the car is running, an X-10 “I-15 ON†signal is broadcast every three seconds.
When the car turns off the “I-15 ON†broadcast is stopped and an “I-15 OFF†signal is broadcast continually for 10 seconds. After those ten seconds no other signal is sent from the car. As soon as the car is started the I-15 ON signal is broadcast as described (even if it is started before the ten second I-15 OFF signal is completed).
I was thinking about incorporating logic in the Ocelot to properly set a variable to HOME or AWAY. I sometimes warm the car up for a few minutes in the morning (time period varys). Also, I sometimes have to start the car for short periods to move it into the garage for the evening, or move it out of the garage so I can do some work inside the garage.
Here is the C-Max logic (I just show Variable1’s values as “HOME†or “AWAY†instead of zero or one for ease of reading):
Code:
If I-15 = ON (This signal is broadcast every three seconds while car is running)
Then Timer = 1 (Start timer)
If I-15 = OFF
Then Timer1 = 0 (Stop timer when car turns off)
Then Variable1 = HOME (Declare HOME mode)
If Timer1 = 60 and I-15 = ON
Then Variable1 = AWAY (After the last I-15 ON signal is received, wait 60 seconds and if no other signal is received declare AWAY mode)
Then Timer1 = 0 (Reset timer)
So basically when the car is running, Timer1 is always being “started†every three seconds (car monitor broadcasts I-15 ON every three seconds). The car then has to be out of range (can’t receive the X-10 signal) for 60 seconds before Variable1 = AWAY mode and Timer1 resets.
If at any time during Timer1’s 60 second countdown an I-15 OFF signal is received (car turned off), then the timer will reset and Variable1 is set to HOME.
I tried running through all scenarios to see if this could give a false indication of HOME or AWAY and couldn’t find any (which scared me into asking for help!).
I would truly appreciate and value opinions with this logic from this forum’s members.