Webcontrol Email

MobileMe

Active Member
Hello Everyone,

Just purchased my first webcontrol board and got the sensors working. I'm having trouble with the PLC code. I have a washer and dryer that is in the basement and I never know when they are done. I've tried everything including a baby monitor which didn't work out well do to the dehumidifier running. Got the board and a couple of photo-resistors which are working the way they should. I feel as if I have wrote myself into a corner with this code.

My goal is to get the board to email me when the done light comes on for the washer and the dryer. I'm trying to prevent code skips and multiple emails. When the light comes on(washer or dryer), the board emails me once that it is done. That is basically it. I got this far and I'm just not getting anywhere. Please go easy on me, this is my first time working with this code. Any help would be appreciated.

START
TSTGT AIP1 400
CALLSUB WASHER_DONE
TSTGT AIP2 350
CALLSUB DRYER_DONE
TSTEQ RAM1 1
CALLSUB WASHER_EMAIL
TSTEQ RAM2 1
CALLSUB DRYER_EMAIL
END

WASHER_DONE:
SET RAM1 1
RET

DRYER_DONE:
SET RAM2 1
RET

WASHER_EMAIL:

TSTEQ RAM1 0
EMAIL EM1

SET RAM1 0
RET

DRYER_EMAIL:

TSTEQ RAM2 0
EMAIL EM2
SET RAM2 0
RET
 
Hi, I'm new in this kind op programming. But, you seem to only reset the RAM to 0 after the email is sent. I think it should be 0 after a return.
Here is my code for monitoring humidity in my gun safe, and it is working:
 
Sorry, no code... here it is:

START
SET RAM1 0
LOOP:
TSTGE H1 35
CALLSUB HUM_ON
TSTLT H1 30
CALLSUB HUM_OFF
SET RAM1 0
GOTO LOOP
END

HUM_ON:
SET OP8 1
TSTGE H1 40
CALLSUB EPOST
RET

HUM_OFF:
SET OP8 0
RET

EPOST:
BNZ RAM1 LOOP
SET RAM1 1
EMAIL EM1
GOTO LOOP
 
Hi, had a closer look at the code.
Try this code and see if it's working:

START
SET RAM1 0
SET RAM2 0

LOOP:
TSTGT AIP1 400
CALLSUB WASHER_DONE
TSTGT AIP2 350
CALLSUB DRYER_DONE
SET RAM1 0
SET RAM2 0
GOTO LOOP
END

WASHER_DONE:
SET RAM1 1
CALLSUB WASHER_EMAIL
RET

DRYER_DONE:
SET RAM2 1
CALLSUB DRYER_EMAIL
RET

WASHER_EMAIL:
TSTEQ RAM1 0
EMAIL EM1
SET RAM1 0
GOTO LOOP

DRYER_EMAIL:
TSTEQ RAM2 0
EMAIL EM2
SET RAM2 0
GOTO LOOP
 
Questions:

What are you measuring? Is this an led light that turns on to indicate completion of cycle or is this an led that is on when the unit is running? What are the values when the led is on and when it is off?
 
I was able to work out the code. Here it is for anyone else who wants there appliances to notify them

START
SET RAM1 0
SET RAM2 0
LOOP:
CALLSUB RESETRAMS
DELAY 1000
TSTGT AIP1 390
CALLSUB SEND_EM1
DELAY 1000
TSTGT AIP2 350
CALLSUB SEND_EM2
GOTO LOOP
END

RESETRAMS:
TSTLT AIP1 370
SET RAM1 0
TSTLT AIP2 230
SET RAM2 0
RET

SEND_EM1:
TSTEQ RAM1 0
EMAIL EM1
SET RAM1 1
DELAY 2000
RET

SEND_EM2:
TSTEQ RAM2 0
EMAIL EM2
SET RAM2 1
DELAY 2000
RET
 
Thanks, do you need to wire the AIP input to the LED indicator?

He mentioned that he has photoresistors. So I assumed he mounted them covering the led's on the unit.

Wiring the led's directly to the cai would pose potential issues with grounding. Even though it should be fine, I wouldn't want to share the washer's ground with the cai's ground unless they both ran off of the same power supply. Perhaps that isn't necessary, but it would be very expensive if you fry'd the washers control board.

It looks like he could also use the digital inputs since the program analog values are both set above 3v (3.5 and 3.9). The cai registers anything greater than 3v as "on". So, if he ran out of analog inputs, the 8 digital inputs would provide the same functionality (assuming that the off state is less than 1.75v on the photoresistors).
 
The whole idea was to get my washer and dryer to let me know when they were done. They are only a year old and I didn't want to void my warranty by taking them apart. I got the idea from another forum about a guy that did something like this, but had a laptop running 24/7. My washer and dryer are in the basement where I can't hear them go off. I used a baby monitor but when my dehumidifier runs, I can't hear anything. I would upload pictures, but this forum is a real pain and I'm not putting that much effort into this.

I used an old linksys g access point with dd-wrt as a bridge for the webcontrol network connection. Used another linksys b access point as a box to hold the webcontrol board. I got a couple photo-resistors and wired them up to the board. I think one of them is bad, but time will tell. I used some sticky silicone gel, black tape and rubber facet washers to attach the sensors to the "done" light on the washer and dryer. I also plugged the whole thing into an outlet that is turned on and off by the basement light switch so it is not on all of the time. The only real pain was getting it to send to my gmail account. I had to setup a proxy smtp server on my computer to do that. Overall it works great.

The first thing everyone has said when I tell them about this project is I'm just lazy. No, I want to be efficient. Saturday I got all of my laundry done before lunch. Before, I would start laundry and then get tied up doing something else or just plain forget about it. One load of laundry would take and extra hour or more. These reminders keep laundry going so I can do more things. My wife loves this system. She's a big multitask-er too. I would like to think with technology going the way it is(smartphones), washer and dryer manufactures will start putting this function into there products.

I'm just happy I can spend less time doing laundry and more time with my wife and kids. Webcontrol board, wiring, photo-resistors, small odd parts, the total was about $60. Not bad for my first project.
 
Back
Top