GMail for notifications not working

the register

Community Member
View Badges
Joined
Apr 16, 2009
Messages
50
Reaction score
46
Rating - 0%
0   0   0
I've been trying to get gmail based notifications working and I'm having no success. I first tried going the App Password route, given I have 2 factor enabled, and I never could get an email to go out. I then decided to just create a new gmail account, without 2fac, and using that password. Same result.

Summary of my setup:
* raspberry pi 3
* reef pi 5.1 (previously tried under 4.x)
* pi definitely has internet access
* I don't have any other telemetry enabled, I'm just trying to do Email alerts

Email alerts config:
* server: smtp.gmail.com
* port: 587 (I've also tried 465)
* from: [email protected]
* to: [email protected]
* username: [email protected]
* password: mypasswordhere (I've tried a real password on a non-2fac account, and an app password on a 2 fac)
* all the accounts I tried have IMAP access enabled

To enter that I:
1. go to the telemetry screen
2. enter it all in
3. hit update.

Result: There's no response (successful nor unsuccessful). If I hit update again I get an error saying I need to specify a valid password.

4. refresh
5. go to the page and hit Send test message

Result: nothing. No message in the UI. No emails in the gmail account

Seeing as I just created another gmail account for testing, I am completely fine PM'ing the actual credentials to that account if it'd help.

Also, if it's preferred I file this on github please let me know and I can copy-paste there.
 
OP
OP
T

the register

Community Member
View Badges
Joined
Apr 16, 2009
Messages
50
Reaction score
46
Rating - 0%
0   0   0
See if this helps any.

Hi Rob (I'm Richie from our robotank emails). Grr. I bet the problem is:

> From the 'Configuration' tab click the 'Admin' sub-tab link. Click 'Reload' to restart Reef-pi so the changes you made will take effect. If you try to send a test message before doing this it will most likely fail.

That fixed my issue, thanks!

Also, that's incredibly unintuitive. I say that not as a complaint to you, nor for ranjib, since there's certainly implementation reasons why it is that way, but calling it out. Let me see if I can get a PR to at least pop up an alert that says "You must go over to this other tab and hit reload" when you hit Update.

Thanks again.

Edit: I filed Github issue 1776
 
Last edited:

robsworld78

Well-Known Member
View Badges
Joined
Feb 14, 2020
Messages
952
Reaction score
1,281
Location
Edmonton, Canada
Rating - 0%
0   0   0
Hey Richie, you can't hide now. :) Of course I will forget though.

That is a commonly missed stepped, that's good you posted an issue, I think that's the preferred method to request changes.
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
Hi Rob (I'm Richie from our robotank emails). Grr. I bet the problem is:

> From the 'Configuration' tab click the 'Admin' sub-tab link. Click 'Reload' to restart Reef-pi so the changes you made will take effect. If you try to send a test message before doing this it will most likely fail.

That fixed my issue, thanks!

Also, that's incredibly unintuitive. I say that not as a complaint to you, nor for ranjib, since there's certainly implementation reasons why it is that way, but calling it out. Let me see if I can get a PR to at least pop up an alert that says "You must go over to this other tab and hit reload" when you hit Update.

Thanks again.

Edit: I filed Github issue 1776
you are absolutely right., and don't worry about venting your issues with the build process, we dont take these things personally. The current notification setting is extremely unintuitive :-*( . i want to change that, but its one of the many many minor UX bugs that we need to address. There are some more serious bugs that i am chasing that, hopefully we'll get to fix this one soonish.
 
Last edited:

kdx7214

Well-Known Member
View Badges
Joined
Jan 5, 2020
Messages
724
Reaction score
659
Location
Columbia, MO, US
Rating - 0%
0   0   0
Any advice on how to get around this? Not having any luck at all.

I had to go into gmail and just setup external access. That will give you a username and password combination to use for authentication. Let me see if I can get screen caps and I'll show them (editing out my info).
 

kdx7214

Well-Known Member
View Badges
Joined
Jan 5, 2020
Messages
724
Reaction score
659
Location
Columbia, MO, US
Rating - 0%
0   0   0
Any advice on how to get around this? Not having any luck at all.
Okay, got some screenshots that I hope will help.

Information you must have to get this to work:
  • Your gmail account information (login and password)
  • The SMS to email gateway for your cell phone provider. The example I include is for Google Fi phone service.
First, login to gmail and go to the Account Settings (under your login name in the upper right corner). From there go to the Settings bar on the left. When you scroll down a bit you will see the stuff in the first image I've attached. From here you want to click on App Passwords. From there you can add a new app password. I've already clicked "Add" in the second image, but you can see what I mean. You can see that I've already added my reef-pi setup and I'm just adding a second one to demonstrate. You have to make sure you select Mail and a custom name that will make sense (reef-pi for example).

Once you selected mail and a custom name, you should click the Generate button. This will generate a custom password that you will have to use to send mail.

The fourth image shows the results of the Generate button. You will have the password (note that the spaces are not used and if you copy to the clipboard they shouldn't be there--they're just for readability) that you will use in reef-pi. Now that it shows some random email address - you do NOT use that. You will use your real gmail address in reef-pi setup.

Now, in the reef-pi web interface you will need to click on Configuration and then pick Telemetry. You should see a screen like the last one. The From field is the email address you want the message to show as coming from (in this case I said it was from me). Not sure why I blocked that since it's shown in the following fields LOL. The To entry is the email address you are going to send to. In this case I use Google Fi phone service so their SMS to Email gateway is your phone number @msgs.fi.google.com. Yours will be different unless you use Google Fi.

The Server and port are provided by Google and should be set as shown.

The Username field must be your Google email address.
The Password field is the password you generated earlier. Your normal gmail password will not work.

The rest can be left alone. You will then click Update. As with everything else in reef-pi, once you make a change you must reload it (this is under Admin).

Then you can go back and test it. If you got your phone providers SMS to email gateway address correct you should get a text message. If you're having trouble finding the address, let me know what your phone provider is and I'll try to help find it.

Cheers!
 

Attachments

  • info_1.png
    info_1.png
    72.7 KB · Views: 57
  • info_2.png
    info_2.png
    125 KB · Views: 61
  • info_3.png
    info_3.png
    100.4 KB · Views: 46
  • info_4.png
    info_4.png
    136 KB · Views: 55
  • info_5.png
    info_5.png
    72.7 KB · Views: 72

astreck827

Active Member
View Badges
Joined
Dec 23, 2015
Messages
142
Reaction score
47
Location
Cincinnati
Rating - 0%
0   0   0
Okay, got some screenshots that I hope will help.

Information you must have to get this to work:
  • Your gmail account information (login and password)
  • The SMS to email gateway for your cell phone provider. The example I include is for Google Fi phone service.
First, login to gmail and go to the Account Settings (under your login name in the upper right corner). From there go to the Settings bar on the left. When you scroll down a bit you will see the stuff in the first image I've attached. From here you want to click on App Passwords. From there you can add a new app password. I've already clicked "Add" in the second image, but you can see what I mean. You can see that I've already added my reef-pi setup and I'm just adding a second one to demonstrate. You have to make sure you select Mail and a custom name that will make sense (reef-pi for example).

Once you selected mail and a custom name, you should click the Generate button. This will generate a custom password that you will have to use to send mail.

The fourth image shows the results of the Generate button. You will have the password (note that the spaces are not used and if you copy to the clipboard they shouldn't be there--they're just for readability) that you will use in reef-pi. Now that it shows some random email address - you do NOT use that. You will use your real gmail address in reef-pi setup.

Now, in the reef-pi web interface you will need to click on Configuration and then pick Telemetry. You should see a screen like the last one. The From field is the email address you want the message to show as coming from (in this case I said it was from me). Not sure why I blocked that since it's shown in the following fields LOL. The To entry is the email address you are going to send to. In this case I use Google Fi phone service so their SMS to Email gateway is your phone number @msgs.fi.google.com. Yours will be different unless you use Google Fi.

The Server and port are provided by Google and should be set as shown.

The Username field must be your Google email address.
The Password field is the password you generated earlier. Your normal gmail password will not work.

The rest can be left alone. You will then click Update. As with everything else in reef-pi, once you make a change you must reload it (this is under Admin).

Then you can go back and test it. If you got your phone providers SMS to email gateway address correct you should get a text message. If you're having trouble finding the address, let me know what your phone provider is and I'll try to help find it.

Cheers!
So I think I did all these steps correctly, however, when I try to use the "Update" button from the telemetry config page, I get an error message that says "Please set a valid mail password." I have tried several times with newly generated passwords and have yet to have it accept the password.
 

kdx7214

Well-Known Member
View Badges
Joined
Jan 5, 2020
Messages
724
Reaction score
659
Location
Columbia, MO, US
Rating - 0%
0   0   0
So I think I did all these steps correctly, however, when I try to use the "Update" button from the telemetry config page, I get an error message that says "Please set a valid mail password." I have tried several times with newly generated passwords and have yet to have it accept the password.

That's weird. @Ranjib any ideas?
 

Ranjib

7500 Club Member
View Badges
Joined
Apr 16, 2016
Messages
9,843
Reaction score
17,056
Location
Pleasant Hill, Concord
Rating - 0%
0   0   0
That's weird. @Ranjib any ideas?
Ill need detail. I am not sure whats causing this, if its a bug in the software or some user input issue...
i was able to setup email notification as recent as last week for one of my tank, using 5.3.
@astreck827 are you getting the error when you are trying to save it in reef-pi? or is it during test email dispatch?
 

astreck827

Active Member
View Badges
Joined
Dec 23, 2015
Messages
142
Reaction score
47
Location
Cincinnati
Rating - 0%
0   0   0
Ill need detail. I am not sure whats causing this, if its a bug in the software or some user input issue...
i was able to setup email notification as recent as last week for one of my tank, using 5.3.
@astreck827 are you getting the error when you are trying to save it in reef-pi? or is it during test email dispatch?
It’s when I try to save on the reef pi configuration screen. I try to hit “update” and it rejects the password.
 

kdx7214

Well-Known Member
View Badges
Joined
Jan 5, 2020
Messages
724
Reaction score
659
Location
Columbia, MO, US
Rating - 0%
0   0   0
I was hoping you had solved my issue - I was still running 4.3.
I upgraded to 5.3 and still having the same issue. It says "please set a valid mail password."
Screen Shot 2022-08-03 at 1.58.44 PM.png

I wonder if your password contains characters that aren't compatible? Some that I would be suspicious of would be a space and an ampersand (&) or any kind of quote (single or double).
 

astreck827

Active Member
View Badges
Joined
Dec 23, 2015
Messages
142
Reaction score
47
Location
Cincinnati
Rating - 0%
0   0   0
I wonder if your password contains characters that aren't compatible? Some that I would be suspicious of would be a space and an ampersand (&) or any kind of quote (single or double).
The password is just the 16 digit app password that is generated by gmail. I have even tried typing the password manually instead of copying and pasting to make sure nothing unwanted gets added. The password that it is asking for is the app password, correct? Am I putting the right username? I made the username the same as the gmail that I set up for alerts.
 

kdx7214

Well-Known Member
View Badges
Joined
Jan 5, 2020
Messages
724
Reaction score
659
Location
Columbia, MO, US
Rating - 0%
0   0   0
The password is just the 16 digit app password that is generated by gmail. I have even tried typing the password manually instead of copying and pasting to make sure nothing unwanted gets added. The password that it is asking for is the app password, correct? Am I putting the right username? I made the username the same as the gmail that I set up for alerts.

That should be correct. The username should be [email protected] and the password is the one generated. I'm stumped.
 
Back
Top