Hello everyone.
I have a couple Cai Webcontrol boards, I use them for several things like to remotely open my front door, control lights inside via the x10 features, control lights outside via a photo resistor.
I've been able to do this with the help of the great folks at CAI networks.
Unfortunately I've ran into a snag, I've been trying to figure a way to also be notified when some events happen, such as when the lights go on and off outside, I would like to set it up to send me an email. I have some basic understanding of this, but can't figure out how to get it to work properly.
What I need to have happen is this.
When OP1 is set to 1 (on) I want one email (email 1 to be sent)
When OP1 is set to 0 (off)I want one email (email 2 to be sent)
The folks at Cai tried to help, but the explanation was to complicated for me.
Can someone here with a lot more experience with the programing of this device help me with the above setup?
Below is what i have set up now, but the email part does not work.
START
TSTLT AIP1 20
CALLSUB LIGHT_ON
TSTGT AIP1 30
CALLSUB LIGHT_OFF
NOP
SET RAM2 0
LOOP:
TSTGT OP1 0 RAM1
TSTGT RAM1 0 RAM1
GOTO SEND
SET RAM2 0
GOTO LOOP
END
LIGHT_ON:
SET OP1 1
RET
LIGHT_OFF:
SET OP1 0
RET
SEND:
BNZ RAM2 LOOP
SET RAM2 1
EMAIL EM1
GOTO LOOP
Thank you in advance for any help.
I have a couple Cai Webcontrol boards, I use them for several things like to remotely open my front door, control lights inside via the x10 features, control lights outside via a photo resistor.
I've been able to do this with the help of the great folks at CAI networks.
Unfortunately I've ran into a snag, I've been trying to figure a way to also be notified when some events happen, such as when the lights go on and off outside, I would like to set it up to send me an email. I have some basic understanding of this, but can't figure out how to get it to work properly.
What I need to have happen is this.
When OP1 is set to 1 (on) I want one email (email 1 to be sent)
When OP1 is set to 0 (off)I want one email (email 2 to be sent)
The folks at Cai tried to help, but the explanation was to complicated for me.
Can someone here with a lot more experience with the programing of this device help me with the above setup?
Below is what i have set up now, but the email part does not work.
START
TSTLT AIP1 20
CALLSUB LIGHT_ON
TSTGT AIP1 30
CALLSUB LIGHT_OFF
NOP
SET RAM2 0
LOOP:
TSTGT OP1 0 RAM1
TSTGT RAM1 0 RAM1
GOTO SEND
SET RAM2 0
GOTO LOOP
END
LIGHT_ON:
SET OP1 1
RET
LIGHT_OFF:
SET OP1 0
RET
SEND:
BNZ RAM2 LOOP
SET RAM2 1
EMAIL EM1
GOTO LOOP
Thank you in advance for any help.