Page 1 of 2

How to restart WebApp

PostPosted: Wed Jul 25, 2018 3:24 pm
by jeffwu
Hi

I use AD2PI and run WebApp using the beta image on Jessie. What is the proper command line to restart web app?


thanks

Jeff

Re: How to restart WebApp

PostPosted: Sun Jul 29, 2018 4:31 am
by jeffwu
almost every Saturday morning I noticed keypad (web app) stuck in "Please wait. Loading.." state. rebooting pi would recover from it.

Is there a way I can restart web app instead of rebooting Pi as a whole?

Re: How to restart WebApp

PostPosted: Sun Jul 29, 2018 4:47 am
by jeffwu
after a reboot, I find below Errors in logs. were they expected?

2018-07-29 08:39:34,955 INFO: AlarmDecoder Webapp booting up - v0.8.2-0-g0664184 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:222]
2018-07-29 08:39:35,627 INFO: Discovery running: loc=10.10.0.6:5000, uuid=a8e9cb16-50dd-11e8-9189-b827ebbd5cba [in /opt/alarmdecoder-webapp/ad2web/discovery.py:70]
2018-07-29 08:39:36,127 INFO: Set export parameters to: server smtp.gmail.com port 587 tls 1 auth 0 from xxxx@gmail.com frequency 604800 store files 1 storage path /opt/alarmdecoder-webapp/instance/exports days to keep files 7 email enable 0 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:709]
2018-07-29 08:39:36,240 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:533]
2018-07-29 08:39:36,543 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:391]
2018-07-29 08:39:40,120 INFO: Event: There is a fire! [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:44,375 INFO: Event: The alarm system has been armed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:47,285 INFO: Event: There is a fire! [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:48,753 INFO: Event: The alarm system has been armed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:48,848 ERROR: Error sending notification for Alarm: No JSON object could be decoded [in /opt/alarmdecoder-webapp/ad2web/decoder.py:451]
2018-07-29 08:39:53,083 INFO: Event: Power status has changed to False. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:53,216 INFO: Event: Chime status has changed to False [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:55,925 INFO: Event: There is a fire! [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:58,055 INFO: Event: The alarm system has been armed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:59,735 INFO: Event: Power status has changed to True. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:39:59,814 ERROR: Error sending notification for Alarm: No JSON object could be decoded [in /opt/alarmdecoder-webapp/ad2web/decoder.py:451]
2018-07-29 08:39:59,882 INFO: Event: Chime status has changed to True [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:40:02,444 INFO: Event: There is a fire! [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:40:02,521 ERROR: Error sending notification for Alarm: No JSON object could be decoded [in /opt/alarmdecoder-webapp/ad2web/decoder.py:451]
2018-07-29 08:40:09,379 INFO: Event: Ready status has changed to True [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-07-29 08:40:20,655 INFO: Event: The alarm system has been disarmed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]

Re: How to restart WebApp

PostPosted: Sun Aug 12, 2018 4:16 am
by jeffwu
hi

everyone to help out? after AlarmDecoder booting every Sunday, it stopped working. log on to web interface, the keypad in "Please wait. Loading.." state.

below is the last msg in /opt/alarmdecoder-webapp/instance/logs/info.log


2018-08-12 07:22:52,703 INFO: Event: Ready status has changed to True [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]
2018-08-12 07:23:30,887 INFO: Event: The AlarmDecoder has finished booting. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:371]

Re: How to restart WebApp

PostPosted: Sun Aug 19, 2018 4:05 am
by jeffwu
Very frustrated. Webapp restarted again every Sunday morning. When this happens, the keypad no longer function.

Anyone can shed some lights here.
Either show me a way how to disable weekly restart,. Or fix this bug.

Re: How to restart WebApp

PostPosted: Thu Sep 06, 2018 5:02 pm
by kevin
Suggest emailing support directly

Re: How to restart WebApp

PostPosted: Mon Oct 22, 2018 7:37 pm
by wilsonb
Actually this should be public. I just did a fresh install Raspberry ISO / download , setup and update. Spent a lot of time setting up. Was working./
Then after a few reboots, web server not working. This happened on previous builds for years now.

I can SSH fine.
Now going to website , it just times out.
When it does come up, it just says;
" :evil: Services might still be starting - please wait and try again. If this continues, please let us know on GitHub. You can also email us at Support. "

How to reset alarmdecoder web app to default?

Re: How to restart WebApp

PostPosted: Mon Oct 22, 2018 8:07 pm
by wilsonb
It works for a few minutes by resetting..
Broke again.. Please fix. :twisted:

cd /opt/alarmdecoder-webapp
sudo rm instance/db.sqlite
python manage.py initdb
sudo reboot

Re: How to restart WebApp

PostPosted: Tue Oct 23, 2018 6:56 am
by wilsonb
Seems this python script is outdated;
python manage.py initdb

Result
ExtDeprecationWarning: Importing flask.ext.script is deprecated, use flask_script instead.

Re: How to restart WebApp

PostPosted: Mon Oct 29, 2018 11:14 am
by mathewss
AFAIK this is a warning and did not effect the results but at some point it will break so lets get it fixed now.
I put this change in "dev" branch till I get a chance to tests it on older images.
https://github.com/nutechsoftware/alarm ... d7eb0aa5ea