OpenMarine
Google Mail not working any more since 12.Feb 2017 - Printable Version

+- OpenMarine (https://forum.openmarine.net)
+-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1)
+--- Forum: Bug Reports (https://forum.openmarine.net/forumdisplay.php?fid=4)
+--- Thread: Google Mail not working any more since 12.Feb 2017 (/showthread.php?tid=357)



Google Mail not working any more since 12.Feb 2017 - Alpenskipper - 2017-02-13

Hi,
I run OP on my boat unattended to transmit environment data and motion alarms.

Until 11. Feb 2017 OP sent all reports via GoogleMail very stable.
Since 12. Feb 2017, OP does not send mails anymore.

I am shure, I did not change anything.

I still can access the Pi from remote via SSH and transfer files via FTP.

The sensor data is correctly written in weather_log.csv.

My GoogleMail login data is still working, I can send mails via the Webbrowser at home.

"Allow unsecure Apps" in the Google settings is still activated.

I also tried a new Google account - same problem.

I guess, the problem has to do with a change within GoogleMail.

Any idea how to solve this or any idea for a workarround that I could use over SSH?

Martin


RE: Google Mail not working any more since 12.Feb 2017 - e-sailing - 2017-02-13

What version?
Have you updated anything?


Google Mail not working any more since 12.Feb 2017 - Alpenskipper - 2017-02-14

0.8
I did not touch the installation or the Pi, as I am not on the boat.
It suddenly stopped sending Mails.
FTP camera picture uploads are still working. They are triggered with a cron job.

It would be great to get it runng again over the SSH tunnel. That would save me 3h driving.

Martin


RE: Google Mail not working any more since 12.Feb 2017 - Alpenskipper - 2017-02-14

Here is the actual open plotter.config (personal data XXX)

Is there a way, I could test googlemail via a CLI command?


[GENERAL]
version = 0.8.0
lang = de

[AIS-SDR]
enable = 0
gain = 
ppm = 
channel = a
band = 
gsm_channel = 

[STARTUP]
delay = 0
opencpn = 0
opencpn_no_opengl = 0
opencpn_fullscreen = 1
kplex = 1
x11vnc = 1
vnc_pass = 0
gps_time = 1
nmea_rate_sen = 1
nmea_rate_cal = 1
cal_accuracy = 1
nmea_mag_var = 0
nmea_hdg = 0
nmea_hdt = 0
nmea_press = 1
nmea_temp_p = 1
nmea_hum = 1
nmea_temp_h = 0
nmea_rot = 0
nmea_heel = 0
nmea_pitch = 0
press_temp_log = 1
tw_stw = 0
tw_sog = 0
maximize = 
play = 1
sound = /home/pi/.config/openplotter/sounds/Store_Door_Chime.mp3

[SIGNALK]
enable = 1
can_usb = 0

[WIFI]
enable = 1
device = wlan0
share = 0
ssid = Bordnetz
password = XXX
hw_mode = g
channel = 6
wpa = 2

[INPUTS]
switches = [['1', 'AC', 'AC', 12, 'up', 'SW0'], ['1', 'motion', 'motion', 17, 'down', 'SW1']]

[OUTPUTS]
outputs = 

[TWITTER]
enable = 0
apikey = 
apisecret = 
accesstoken = 
accesstokensecret = 

[GMAIL]
enable = 1
gmail = XXX@gmail.com
password = XXX
recipient = XXX@me.com

[ACTIONS]
triggers = [[0, -1, -1, -1, [['ACT14', '#test', 3.0, 3], ['ACT14', '#ARH [ARH]', 3.0, 3], ['ACT14', '#AP [AP]', 3.0, 3], ['ACT2', '/home/pi/camera.sh', 3.0, 3], ['ACT14', '#IT [AT]', 3.0, 3]]], [0, 'SW0', 7, '1', [['ACT14', '#ACoff', 0.0, 0]]], [0, 'SW0', 8, '0', [['ACT14', '#ACon', 0.0, 0]]], [0, 'SW1', 7, '1', [['ACT14', '#motion', 0.0, 0], ['ACT2', '/home/pi/camera2.sh', 0.0, 0]]]]

[1W]
ds18b20 = 

[UDEV]
usbinst = [['ttyOP_gsm', '12d1', '1001', '', '1-1.3.2.4:1.0', 'dev', 'ttyUSB']]

[SMS]
enable = 0
serial = /dev/ttyOP_gsm
bluetooth = 
connection = at
enable_sending = 0
phone = 0151253XXX

[MQTT]
broker = 
port = 
username = 
password = 
topics = 


RE: Google Mail not working any more since 12.Feb 2017 - e-sailing - 2017-02-14

Check if you have enough disk space
df -H
Have you tried a reboot?

You can test gmail from console:

Code:
from classes.gmailbot import GmailBot
msg = GmailBot("XXX@gmail.com","XXX", "XXX@me.com")
msg.send("Hello","world")
set the line with mail address to your settings

copy this to a file (mini.py) and to .config/openplotter on the rpi

cd .config/openplotter
python mini.py

If you get an error message it will tell you what's wrong. Else you get a mail.

Martin


Google Mail not working any more since 12.Feb 2017 - Alpenskipper - 2017-02-14

There is enough disk space (2,4 GB free)
I did several reboots.

The python script mini.py sends the mail correctly.

But the mail is not send out of an OP action.
The sensor data is still logged correctly in the weather_log.csv.

I started OP from CLI with python /home.../openplotter.py. There is one error:" Unable to access the X Display..."

???

Martin


RE: Google Mail not working any more since 12.Feb 2017 - e-sailing - 2017-02-14

To see some data from the boat you can use your internet browser
http://openplotter.local:3000/signalk/v1/api/vessels/self (if openplotter.local does not work type in the ip address of your rpi)

You can look for errors in the startup. (v0.8 only)
sudo killall python
sudo killall node
sudo killall kplex
cd .config/openplotter
python startup.py


RE: Google Mail not working any more since 12.Feb 2017 - Alpenskipper - 2017-02-15

SOLVED:

There was a mistake in the openplotter.conf .
In "Actions", there was a "0" in the beginning of the parameters. I guess this switches off all actions?

[ACTIONS]
triggers = [[0, -1, -1, -1, [['ACT14', '#test', 3.0, 3]]]]

I set it to "1", and all actions are running again.

[ACTIONS]
triggers = [[1, -1, -1, -1, [['ACT14', '#test', 3.0, 3]]]]

The mystery is, how could it change to "0"? I swear, I did not change anything, when the actions stopped working. The last mail actions worked until 21:00, next day, they stopped. I slept in the night :-).

thanks for your support, e-sailing.

Again, it was great to have a reverse SSH tunnel through the GSM connection on board.

Martin


RE: Google Mail not working any more since 12.Feb 2017 - Arne - 2017-02-19

Do you only have SSH through your reverse tunnel, as you was looking for ways to fix this on the console?
" -R 0.0.0.0:5900:localhost:5900" in your reverse tunnel setup forwards port 5900 so you can access the console using VNC or similar...


RE: Google Mail not working any more since 12.Feb 2017 - Alpenskipper - 2017-02-25

Hi Arne,

Thank you for the hint related to VNC. I would really like to connect my remote Pi on board via VNC, but did not manage to do so.
I connect to the remote Pi via : ssh pi@localhost -p 2222
Where do I have to insert:"-R 0.0.0.0:5900:localhost:5900"

Sorry for the noob questions, until know, I didn't use Linux.

best regards,
Martin