Page 1 of 1

WebApp on Raspberry Pi 2 Model B

PostPosted: Thu Mar 05, 2015 6:49 pm
by heyted
I installed WebApp on my recently purchased Pi 2 with AD2PI using the manual installation instructions. I used the Raspbian image for the Pi 2 from raspberrypi.org.

It appears to be working fine except for two issues. The "loading" message on the keypad does not go away. Even though it continues to say "loading," I am able to click on the buttons, and the signals get sent to the panel correctly. This occurs when using the Pi directly with the Epiphany browser and when accessing the web page with another computer (Ubuntu with Chrome). Any suggestions for how to troubleshoot this?

The other issue, which appears to be not much of a concern, is nothing is received from the panel sometimes after booting up until something happens. I am not sure what the something is. I need to do more testing, but it appears that if I start clicking one or more buttons on the virtual keypad, information starts being received from the panel normally.

Overall, it appears to be working great.

Re: WebApp on Raspberry Pi 2 Model B

PostPosted: Thu Mar 05, 2015 8:07 pm
by mathewss
First off NO FAIR!!!! we have not gotten our Pi 2 yet :( We should get one in "soon" I hope to test with..


Probably going to need some logs etc from the system to figure out what is going on and it would be best to confirm everything is working directly with no web.

Are you using the Ad2Pi board or Ad2USB?

Re
Sean M

Re: WebApp on Raspberry Pi 2 Model B

PostPosted: Thu Mar 05, 2015 11:39 pm
by kevin
Please verify your version of nginx - you need a version that supports websockets correctly, we ship version 1.7.4 on our image - you will have to build it from source as it is not in the raspbian repositories as far as I know.

You can verify working comms with the alarm panel by telnetting to port 10000 (ser2sock) and sending keypresses from there - if that is functioning correctly, then it comes down to web server as everything else appears to work.

Cheers!

Re: WebApp on Raspberry Pi 2 Model B

PostPosted: Sat Mar 07, 2015 12:02 pm
by heyted
Thanks for the responses. Which logs would be best to provide? I have the Ad2Pi board. Is it possible to verify everything is working directly with no web without installing ser2sock? I installed AlarmDecoder Keypad, and it appears to be fully functional.

I originally built nginx 1.6.2 (stable). Yesterday, I built 1.7.10 (mainline) with the issues remaining after the installation. For both builds, I used the script from https://gist.github.com/MattWilcox/402e2e8aa2e1c132ee24 following the directions provided. The information was scrolling by so fast during the build and install, I am not sure if everything was installed correctly.

With Minicom, I see a steady stream of messages with about one every 10 seconds. AlarmDecoder Keypad and WebApp can sucessfully send key presses. Is this sufficient to conclude that the issue is with the web server?

Re: WebApp on Raspberry Pi 2 Model B

PostPosted: Sat Mar 07, 2015 4:42 pm
by kevin
Communication between the device and the webservices are done with a websocket - you must also have javascript enabled - if messages are updating when attached with minicom and you are able to control the alarm panel, it leads me to the webserver and/or gunicorn being an issue - or perhaps some javascript error making the display not update properly - which would be a first.

Can you give examples of your message stream?

Can you also output the info log from /opt/alarmdecoder-webapp (by default)?

Re: WebApp on Raspberry Pi 2 Model B

PostPosted: Mon Mar 09, 2015 4:40 pm
by heyted
I just ran minicom, and it displayed:

Welcome to minicom 2.6.1

OPTIONS: I18n
Compiled on Apr 28 2012, 19:24:31.
Port /dev/ttyAMA0

Press CTRL-A Z for help on special keys

[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[0000030110000000----],001,[f70000008001030028000000000000],"FAULT 01 ZONE 01 "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "
[1000000110000000----],001,[f70000008001001c28000000000000]," DISARMED CHIME Ready to Arm "


Which log file are you referring to? Recent information from Info.log in /opt/alarmdecoder-webapp/instance/logs is:

2015-03-07 17:27:01,655 INFO: AlarmDecoder Webapp booting up - v0.3.1-0-g4c94ec0 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:145]
2015-03-07 17:27:06,271 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:389]
2015-03-07 17:27:06,333 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:255]
2015-03-07 17:29:30,353 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 17:29:32,859 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 18:24:30,918 INFO: Event: Zone <unnamed> (4) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 18:24:38,222 INFO: Event: Zone <unnamed> (4) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 18:25:14,727 INFO: Event: Zone <unnamed> (4) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 18:25:19,500 INFO: Event: Zone <unnamed> (4) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 18:49:33,521 INFO: AlarmDecoder Webapp booting up - v0.3.1-0-g4c94ec0 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:145]
2015-03-07 18:49:38,169 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:389]
2015-03-07 18:49:38,213 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:255]
2015-03-07 18:59:28,740 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 18:59:31,050 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 20:53:20,703 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 20:53:24,367 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 20:54:59,207 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-07 20:55:04,071 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 08:01:31,064 INFO: AlarmDecoder Webapp booting up - v0.3.1-0-g4c94ec0 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:145]
2015-03-08 08:01:35,720 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:389]
2015-03-08 08:01:35,763 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:255]
2015-03-08 08:16:24,390 INFO: Event: The alarm system has been disarmed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 08:46:20,358 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 08:46:25,543 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 21:44:23,681 INFO: AlarmDecoder Webapp booting up - v0.3.1-0-g4c94ec0 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:145]
2015-03-08 21:44:28,338 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:389]
2015-03-08 21:44:28,401 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:255]
2015-03-08 21:47:14,168 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 21:47:25,417 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 21:48:55,537 INFO: Event: Zone <unnamed> (3) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 21:49:05,233 INFO: Event: Zone <unnamed> (3) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 21:57:59,753 INFO: Event: Zone <unnamed> (3) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 21:58:06,251 INFO: Event: Zone <unnamed> (3) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 21:58:14,810 INFO: Event: Zone <unnamed> (3) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 21:58:20,910 INFO: Event: Zone <unnamed> (3) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 22:00:47,343 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 22:01:40,277 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 22:08:59,635 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 22:09:02,556 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 22:16:19,771 INFO: AlarmDecoder Webapp booting up - v0.3.1-0-g4c94ec0 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:145]
2015-03-08 22:16:24,410 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:389]
2015-03-08 22:16:24,471 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:255]
2015-03-08 22:20:22,040 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 22:20:25,412 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 22:20:31,586 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 22:20:35,275 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-08 22:22:51,325 INFO: Event: The alarm system has been armed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 06:40:50,625 INFO: AlarmDecoder Webapp booting up - v0.3.1-0-g4c94ec0 [in /opt/alarmdecoder-webapp/ad2web/decoder.py:145]
2015-03-09 06:40:55,280 INFO: Attempting to reconnect to the AlarmDecoder [in /opt/alarmdecoder-webapp/ad2web/decoder.py:389]
2015-03-09 06:40:55,341 INFO: AlarmDecoder device was opened. [in /opt/alarmdecoder-webapp/ad2web/decoder.py:255]
2015-03-09 07:08:08,572 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 07:08:30,135 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 07:40:11,739 INFO: Event: The alarm system has been armed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 16:13:04,708 INFO: Event: The alarm system has been disarmed. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 19:16:02,435 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 19:16:06,577 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 19:25:18,481 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 19:25:22,106 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 19:47:10,739 INFO: Event: Zone <unnamed> (1) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 19:47:21,162 INFO: Event: Zone <unnamed> (1) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:00:21,645 INFO: Event: Zone <unnamed> (3) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:00:38,252 INFO: Event: Zone <unnamed> (3) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:02:26,460 INFO: Event: Zone <unnamed> (3) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:02:32,221 INFO: Event: Zone <unnamed> (3) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:03:20,452 INFO: Event: Zone <unnamed> (3) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:03:23,377 INFO: Event: Zone <unnamed> (3) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:14:21,038 INFO: Event: Zone <unnamed> (3) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:14:28,345 INFO: Event: Zone <unnamed> (3) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:19:28,889 INFO: Event: Zone <unnamed> (3) has been faulted. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]
2015-03-09 20:19:35,258 INFO: Event: Zone <unnamed> (3) has been restored. [in /opt/alarmdecoder-webapp/ad2web/notifications/types.py:103]


Thanks for the help.

Re: WebApp on Raspberry Pi 2 Model B

PostPosted: Mon Mar 09, 2015 5:13 pm
by kevin
You can try bypassing the webserver and connecting to the wsgi worker directly - if you used our configuration it would be port 5000 - so in your browser do a http://ip:5000 to bypass webserver - this will eliminate the webserver from the equation