New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote

Started by brasskey4u, October 18, 2018, 09:53:32 PM

brasskey4u

Hello!
Just been digging through all the messages here and was able to get some things going with my Pi2 and Mighty Hat and Sump Mote.  Finally seeing the device on the pi gateway (serial port not enabled, had to sudo raspi-config and enable the serial port which I thought I had done.)  My problem now is that I am not getting any text messages when the value of the sonar mote is at 3 cm.  I was hoping I would get a text message.  I did get some emails from google saying that suspious activity was showing up, so those got blocked.  Any ideas on where to look?  Can't believe I got this much to work! :)  I do have my att cell phone number in the  @txt.att.net field.  Appreciate any tips.


Dave

Felix

Your cell phone email address is easy.
Now you have to setup your gmail to send those emails, that's probably trickier although if you setup custom app passwords on gmail and reserve one for your app, that should work pretty straight forward. Make sure all settings are correct for that and all relevant sections.

brasskey4u

Hi Felix,
I did have all my account info and instantly got blocked from Gmail when it tried to send a text message.  Is there a way to get google to allow my pi to work?

Felix

The provided settings are meant to make it work, if it doesnt then ... I don't know, I do not represent google and not sure why they would block it :)

sparky

Quote from: brasskey4u on October 22, 2018, 08:47:40 AM
Hi Felix,
I did have all my account info and instantly got blocked from Gmail when it tried to send a text message.  Is there a way to get google to allow my pi to work?

So in settings you should have;
emailservice = gmail
email = your gmail email
emailpass = your gmail password
emailsAlertsTo = your email that you want emails to be sent to
smsAlertsTo - phone#@what ever service you have

Now your gmail account..
Do you have 2 step verification setup?

If so you should have an option to setup "less secure apps"

brasskey4u

I have enabled less secure and my sump pump mote is sitting up against a flat surface and shows 5 cm and should alert when its 20 cm or less.  still nothing :(


Felix

SMS is sent via email, so you have to have that part working.
Then the SMS sending event needs to be added to your SonarMote in the UI, and enabled.

brasskey4u

All working after I set gmail account settings .  Thanks...can anything be put in the field for email other than gmail?  Need to use something else.  Not a fan of google.

Felix

Sure, but you'll have to work any differences in the gateway code which assumes and works with gmail, however check nodemailer.js for other supported email services, see this line in code for details:

https://github.com/LowPowerLab/RaspberryPi-Gateway/blob/master/gateway.js#L108

Kilo95

I was never able to get mine to work with two factor authentication on GMail so I set up a separate GMail account just for my sump pump alerts and left the the TFA off