Page 1 of 2
WebApp Beta - Notifications
Posted:
Sun Jun 08, 2014 11:52 am
by ritter4jp
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
Re: WebApp Beta - Notifications
Posted:
Mon Jun 09, 2014 8:54 am
by Scott
The log is located at /var/log/gunicorn/alarmdecoder.log. Let us know what you find and if you have any other issues. Thanks!
Re: WebApp Beta - Notifications
Posted:
Mon Jun 09, 2014 7:28 pm
by ritter4jp
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.
Re: WebApp Beta - Notifications
Posted:
Tue Jun 10, 2014 8:45 am
by Scott
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!
Re: WebApp Beta - Notifications
Posted:
Tue Jun 10, 2014 10:11 am
by ritter4jp
Ok. I'll try that again though I thought that I had done that initially. I'll let you know how it works out.
Re: WebApp Beta - Notifications
Posted:
Wed Jun 11, 2014 3:59 am
by ritter4jp
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.
Re: WebApp Beta - Notifications
Posted:
Wed Jun 11, 2014 10:45 am
by Scott
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
Re: WebApp Beta - Notifications
Posted:
Wed Jun 11, 2014 2:30 pm
by ritter4jp
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?
Re: WebApp Beta - Notifications
Posted:
Thu Jun 12, 2014 9:02 am
by Scott
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.
Re: WebApp Beta - Notifications
Posted:
Thu Jun 12, 2014 6:07 pm
by ritter4jp
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.