LowPowerLab Forum

Software support => Pi Gateway => Topic started by: brasskey4u on October 18, 2018, 09:53:32 PM

Title: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: brasskey4u on October 18, 2018, 09:53:32 PM
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
Title: Re: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: Felix on October 19, 2018, 01:00:29 PM
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.
Title: Re: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: 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?
Title: Re: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: Felix on October 22, 2018, 10:46:30 AM
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 :)
Title: Re: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: sparky on October 22, 2018, 11:13:00 AM
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"
Title: Re: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: brasskey4u on October 22, 2018, 01:11:14 PM
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 :(

Title: Re: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: Felix on October 22, 2018, 01:17:04 PM
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.
Title: Re: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: brasskey4u on October 22, 2018, 02:55:49 PM
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.
Title: Re: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: Felix on October 23, 2018, 03:58:34 PM
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
Title: Re: New to the IoT world and Low Power Lab...No SMS for Sump Pump Mote
Post by: Kilo95 on October 24, 2018, 06:47:45 PM
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