Jump to content

My new project which is Nodemcu, SCt-13 is working it senses current at 2 5 amps to 0 amps


G+_Rud Dog
 Share

Recommended Posts

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

John SullivanThe link you provided is interesting and for me complicated. Yes you would think there is a simple way to send an email inside an if statement but that link shows how send an email using three different files. Looked at it till my head started saying "huh".

It some how sends an email to the users email which I was able to do. But figuring out how to incorporate it into my project is beyond me. Will continue to search and if I find a solution will post. If you have time try running the suggested Gmail Sender you suggested then if you are energetic see if you can combine it my code. Thanks and appreciate you help.

Link to comment
Share on other sites

Rud Dog I haven't used the GMail Sender code, I just pointed you to it to show that there are simpler solutions than using IFTTT.

I won't have a chance to dig into it until the weekend, but it looks pretty straightforward. One thing I noted is that he has two images side by side right below the words "Step2. Edit sketch" however only the left image is for that step.

The right image is for later on under "now open GSender.h

The code shown is in the standard Arduino type window. In order to merge it into your code, you probably would take what is in the void Setup() area and insert that into your IF statement, so that an email is only sent when your IF statement is TRUE

You can right click the images and copy and paste them into Paint or other image program and blow them up for a closer look.

Link to comment
Share on other sites

Rud Dog Not having much luck with your washer project. Bought a SCT-013 from Amazon, but even with the power off it records spikes that are above the threshold. That is, with power off it reads around .19, and power on anywhere from .46 to 1.20.

So can set a threshold of .30 and it will indicate when the power is off, but a regularly-occurring spike of about .70 makes it report the power is back on again. Not sure what's causing the spikes, but right now it is too un-reliable to use.

Link to comment
Share on other sites

Rud Dog Another problem is that the SCT can't tell the difference between when the whole wash cycle is complete and when it is just in-between actions (wash, rinse, spin, etc.) and just the timer is running.

Would have to set a counter to wait X number of minutes before sending the email, just to be sure the washer is not just between actions.

Link to comment
Share on other sites

Rud Dog As do I. First step was to try your code as-is to see if it worked as expected. It did not. Second step was to comment out all the IF statements and then add a line that would print the reported Irms to the Serial Monitor screen. After doing that, I discovered that (after the current settles) all the numbers are too small to trigger your IF statements, so my washing machine is apparently much different from yours.

One question: which of the SCT's are you using? (Amazon shows three) the 100A : 50 ma one?

Link to comment
Share on other sites

Problem I'm experiencing is that, for example, once the initial wash cycle completes, the current drops to near zero for a few seconds until the spin cycle starts. That drop triggers the "Washer is Off" message and the program exits. The hardware is just not accurate enough to detect the difference between when only the timer is running and when the machine is completely off.

Link to comment
Share on other sites

But putting all that Irms discussion aside, your original question was how to receive notification that the washer is Off.

Today I tried the "instructables" link that I posted above, which sends an email from NodeMCU and it works well.

Next step is to trigger the email when the NodeMCU detects that the washer is off. Even though that part does not work as expected with my washer, I should be able to integrate the two code blocks together.

Link to comment
Share on other sites

Ok, I have merged your code with the email sender code from the Instructables link and when your code reports that the Washer is Off it sends one email to whatever email address you specify.

pastebin.com - #include #include "Gsender.h" #include "EmonLib.h" - Pastebin.com

Note: the code is not complete. The file you download from the Instructables page also includes a Gsender.h and a Gsender.cpp file. When you open the downloaded ESP8266_GmailSender.ino file in the Arduino IDE, it also opens the other two files in tabs near the top.

You need to edit both the GmailSender file to include your email settings, and also the Gsender.h file to include your email credentials AFTER you have converted them to Base64 (all of which is explained in the article).

Then you can merge your code with the GmailSender file (as I did in the pastebin example) and upload it to your NodeMCU.

You will need:

The SSID name of your WiFi network

The password for your WiFi network.

The email address you want to Send to.

The email address you want the message to come from.

The SMTP setting for the email you want to send with.

Your sending email address converted to Base64.

Your sending email password converted to Base64.

Link to comment
Share on other sites

John Sullivan I was so excited when I read your post while we were out and enjoying a meal with friends. I proceeded to tell my wife and she just smiled. She has been my sounding board while trying to solve this project. Thank you for your help will try the code tomorrow morning. Again thank you.

Link to comment
Share on other sites

John Sullivan , appreciate you going the extra mile and wanted to share with you the results when using the code you so carefully reviewed and got working on your end. Guessing something I am doing is fundamentally wrong. Here is the error I am receiving from the Gmail server?

 

??Current settling

Current settling

Current settling

Contents Washer OFF

1

0.22

Connecting to Goddur

 

Connection: ESTABLISHED

Got IP address: 192.168.86.4

220 smtp.gmail.com ESMTP k14sm12949933pgs.52 - gsmtp

 

250 smtp.gmail.com at your service

 

334 eXNlcn5hbwU6

 

334 eGFzc3drjlsQ6

 

535-5.7.8 Username and Password not accepted. Learn more at

 

Error sending message: SMTP AUTH error

 

Don't know where to look this up but at this point, I am googling the Error trying to find the reference and its meaning.

Link to comment
Share on other sites

Rud Dog The username and password need to be the one for the email service that you are using to Send the message (gmail), and they need to be converted to Base64 format, and entered into the Gsender.h file.

If you just type them in English it won't work.

I see the error message reports "334 eXNlcn5hbwU6" and "334 eGFzc3drjlsQ6". Are those your Base64 conversions? (If so, you might want to delete them from here)..

Link to comment
Share on other sites

John Sullivan yes agreed. I have taken the username and password for my Gmail account and run them through the converter to Base64 format, and entered into the Gsender.h file. The odd thing is the code shown in the serial monitor screen does not look anything like the codes I converted and entered into the Gsender.h file. Will take another look at it tomorrow. I spent the day repeating that process and double checking the password and username and the conversion. Also will take a look at the link for Washing machine notification Sensor. Also did a decode of the conversion information and is decoded to the correct username and password, using the same website.

Link to comment
Share on other sites

 Share


×
×
  • Create New...