WebApp Beta - Notifications

General Discussion

WebApp Beta - Notifications

Postby ritter4jp » Sun Jun 08, 2014 11:52 am

I've got my system hooked up and controlling the panel but I cannot get an email notification working. I tested the system by using the python email example and that goes through. Anybody got it working? Is there a log I can use to figure out where it's stopped?

Thanks
ritter4jp
newt
newt
 
Posts: 10
Joined: Sun Jun 08, 2014 10:05 am

Re: WebApp Beta - Notifications

Postby Scott » Mon Jun 09, 2014 8:54 am

The log is located at /var/log/gunicorn/alarmdecoder.log. Let us know what you find and if you have any other issues. Thanks!
Scott
Expert Nut
Expert Nut
 
Posts: 118
Joined: Thu Dec 12, 2013 11:17 am

Re: WebApp Beta - Notifications

Postby ritter4jp » Mon Jun 09, 2014 7:28 pm

Thanks Scott, I found the log. The problem seems to be that the password for the email account isn't being saved and supplied when the notification is attempted. The password field for the notification doesn't show any contents after the save button is hit. I didn't get a chance to work on it tonight but last night I forced a value for the password in the types.py file and the notification worked.
ritter4jp
newt
newt
 
Posts: 10
Joined: Sun Jun 08, 2014 10:05 am

Re: WebApp Beta - Notifications

Postby Scott » Tue Jun 10, 2014 8:45 am

I figured out the issue, though it still needs to be corrected. You can workaround it by making sure you type the password in each time you save the notification. The problem stems from it being a password field and optional so it's not set to anything for security reasons and the app thinks it's blank and overwrites it with nothing if it's not provided.

Thanks for the report!
Scott
Expert Nut
Expert Nut
 
Posts: 118
Joined: Thu Dec 12, 2013 11:17 am

Re: WebApp Beta - Notifications

Postby ritter4jp » Tue Jun 10, 2014 10:11 am

Ok. I'll try that again though I thought that I had done that initially. I'll let you know how it works out.
ritter4jp
newt
newt
 
Posts: 10
Joined: Sun Jun 08, 2014 10:05 am

Re: WebApp Beta - Notifications

Postby ritter4jp » Wed Jun 11, 2014 3:59 am

I tested again last night with the form password but it fails to authenticate, giving the error I first reported. I placed code in there and it shows the password but I wonder if it isn't properly terminated? Our power went out at that point so I was not able to debug further.
ritter4jp
newt
newt
 
Posts: 10
Joined: Sun Jun 08, 2014 10:05 am

Re: WebApp Beta - Notifications

Postby Scott » Wed Jun 11, 2014 10:45 am

Turns out there were a couple other things to change as well. Apparently smtplib doesn't like unicode. I took the opportunity to expand the email settings to support alternative ports and TLS as well. It should show up in the dev branch in a day or two and get merged into master after we get a few other changes made.

I believe the issue you're seeing can likely be fixed by replacing the login line with:
Code: Select all
s.login(str(self.username), str(self.password))
or just leaving your hardcoded one in there for now.

If you're feeling adventurous you can switch the branch to dev and get the bleeding edge stuff as soon as we push it up.

Thanks,
Scott
Scott
Expert Nut
Expert Nut
 
Posts: 118
Joined: Thu Dec 12, 2013 11:17 am

Re: WebApp Beta - Notifications

Postby ritter4jp » Wed Jun 11, 2014 2:30 pm

Thanks Scott. I was thinking of something like that but without power my day was done. I was looking at the code and saw update stuff but no way to get there. I don't quite understand the whole app yet. Is there info on switching to the dev branch?
ritter4jp
newt
newt
 
Posts: 10
Joined: Sun Jun 08, 2014 10:05 am

Re: WebApp Beta - Notifications

Postby Scott » Thu Jun 12, 2014 9:02 am

The update system is based around git and checks github periodically to see if there's new commits available in whatever branch you're on. It'll pop up a message with a link to /update/ on the keypad when one is available. That'll be potentially frequent in dev and infrequent in master.

Switching branches is currently a manual, though simple, process. Just do 'git checkout dev' to switch to the dev branch, or 'git checkout master' to switch back to the stable one.
Scott
Expert Nut
Expert Nut
 
Posts: 118
Joined: Thu Dec 12, 2013 11:17 am

Re: WebApp Beta - Notifications

Postby ritter4jp » Thu Jun 12, 2014 6:07 pm

I switched over to the dev branch and did a pull to catch up. I also tried using str() around the name and password but it didn't work. Learning lots here and thank you for the help along the way.
ritter4jp
newt
newt
 
Posts: 10
Joined: Sun Jun 08, 2014 10:05 am

Next

Return to General

Who is online

Users browsing this forum: No registered users and 18 guests

cron