rdmenezes / measureit

Automatically exported from code.google.com/p/measureit
0 stars 0 forks source link

V116 Beta Email notification not working #45

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Set email alert
2.
3.

What is the expected output? What do you see instead?
Expect an email when the condition is true

What version of the product are you using? On what operating system?
V116 Beta Windows 7

Please provide any additional information below.

Here's what the debug log file generates

2013-09-24 23:39:52,044 DEBUG Found notification smaller than on sensor0
2013-09-24 23:39:52,046 DEBUG {'notification_name': 'Email Test', 
'notification_twitter': 0, 'notification_notification': 'Generation is less 
than 80W', 'notification_items': 0L, 'notification_value': 80L, 
'notification_email': 1, 'notification_unit': 'n', 'notification_criteria': 1}
2013-09-24 23:39:52,049 DEBUG Notification is true on sensor0
2013-09-24 23:39:52,051 DEBUG 73 is smaller than 80
2013-09-24 23:39:52,053 DEBUG Try to send notification per email
2013-09-24 23:39:52,055 DEBUG Current usage over 80 Watt (0 kwh) Usage: 73 Watt 
(0 kwh) Generation is less than 80W
2013-09-24 23:39:52,057 DEBUG Found email system settings. Try to send email
2013-09-24 23:39:54,795 DEBUG Not possible to send email: Traceback (most 
recent call last):
  File "/usr/local/measureit/python/data-input.py", line 594, in mail_send
    server.login(system_settings['system_settings_email_address'],system_settings['system_settings_email_pass'])
  File "/usr/lib/python2.7/smtplib.py", line 613, in login
    raise SMTPAuthenticationError(code, resp)
SMTPAuthenticationError: (534, '5.7.9 Application-specific password required. 
Learn more at\n5.7.9 
http://support.google.com/accounts/bin/answer.py?answer=185833 
gh2sm11260782pbc.40 - gsmtp')

2013-09-24 23:39:54,799 DEBUG Notification sending successfully

Original issue reported on code.google.com by wot...@gmail.com on 24 Sep 2013 at 1:48

GoogleCodeExporter commented 9 years ago
Solved: Sort of.

I use 2 step verification on Google therefore: 

I had to manually generate an application specific password for MeasureIt 
rather than my generic gmail password to be able to send emails.

It would be nice to be able to set our own SMPT outgoing email server, user 
name, port and password.

Original comment by wot...@gmail.com on 24 Sep 2013 at 1:57

GoogleCodeExporter commented 9 years ago
I receive email alerts, but they are continuously generated as long as the 
condition is true, rather than being generated once on each leading edge.

Original comment by wot...@gmail.com on 24 Sep 2013 at 1:58

GoogleCodeExporter commented 9 years ago
Screen shot

Original comment by wot...@gmail.com on 24 Sep 2013 at 2:05

Attachments:

GoogleCodeExporter commented 9 years ago
Also the body of the email (& twitter alert) is a bit misleading, can we just 
have our own description?

As in this case my rule description is:

Generation is less than 80W

But the body says:

Current usage over 80 Watt (0 kwh) Usage: 82 Watt (0 kwh) Generation is less 
than 80W

The rule is for generation, not consumption and it is for less than, not "over"

Original comment by wot...@gmail.com on 24 Sep 2013 at 2:20

GoogleCodeExporter commented 9 years ago
Notification is fixed in the final 106

I think about a user defined message body.

Feel free to be a part of the "Let us think about it to get this thing running 
good" team :)
https://groups.google.com/forum/#!topic/measureit/CwbMsFRxMQs

It is just a beta and measureit has to be a good piece of software and nothing 
else ;)

Greetings Thomas

Original comment by lalelu...@gmail.com on 26 Sep 2013 at 5:21

GoogleCodeExporter commented 9 years ago
Btw: You are running measureit in windows? I do not have a running windows 
version here and if I am sincere I am unwilling to waste my time with "getting 
things run on windows"....

I am forced to do this in my work and I hate it...

There should not be much changes to get the current version working with 
windows I think. Can you send me your changes that you had to do to get it 
running so that I can update the windows section?

Original comment by lalelu...@gmail.com on 26 Sep 2013 at 5:42

GoogleCodeExporter commented 9 years ago
Hi Thomas,

Yes I am running windows.

The changes I made was because of Google's 2 step verification rather than a 
Windows issue, I just had to follow Google's instructions when using an app 
that doesn't support 2 step verification.

This has the answer http://support.google.com/accounts/answer/185833 so instead 
of using my regular gmail password, I used a Google generated application 
specific password.

Regards,

Steve. 

Original comment by wot...@gmail.com on 26 Sep 2013 at 11:39

GoogleCodeExporter commented 9 years ago
Oops, I'm a little slow to realise I should keep Beta issues to the discussion 
forum. 

Sorry Thomas. My mistake. Kill this issue :) You know about it, and we can 
continue over there ;)

Original comment by wot...@gmail.com on 27 Sep 2013 at 6:12

GoogleCodeExporter commented 9 years ago
I added a mail setup how to in the usage part of the wiki so that other users 
can resolve it quickly.

Feel free to be the windows master in the forum :D

In the next version I will add the function to use every mail service. But 
first I had to bring version 116 online

Thanks 

Original comment by lalelu...@gmail.com on 9 Nov 2013 at 2:01

GoogleCodeExporter commented 9 years ago
I'm no master or guru, I'm so bad I misunderstood your original question about 
using Windows. I'm running MeasureIt on a headless Raspberry Pi, and use PuTTY 
& WinSCP on my Windows machine to do the upgrading & modifying to the Pi.

Regards,

Steve.

Original comment by wot...@gmail.com on 9 Nov 2013 at 2:12