WebApp on Raspberry Pi 2 Model B

General Discussion

WebApp on Raspberry Pi 2 Model B

Postby heyted » Thu Mar 05, 2015 6:49 pm

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.
Attachments
Screenshot.png
Screenshot.png (76.66 KiB) Viewed 8504 times
heyted
newt
newt
 
Posts: 3
Joined: Thu Mar 05, 2015 5:49 pm

Re: WebApp on Raspberry Pi 2 Model B

Postby mathewss » Thu Mar 05, 2015 8:07 pm

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
mathewss
Moderator
Moderator
 
Posts: 188
Joined: Fri Dec 06, 2013 11:14 am

Re: WebApp on Raspberry Pi 2 Model B

Postby kevin » Thu Mar 05, 2015 11:39 pm

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!
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: WebApp on Raspberry Pi 2 Model B

Postby heyted » Sat Mar 07, 2015 12:02 pm

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?
heyted
newt
newt
 
Posts: 3
Joined: Thu Mar 05, 2015 5:49 pm

Re: WebApp on Raspberry Pi 2 Model B

Postby kevin » Sat Mar 07, 2015 4:42 pm

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)?
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: WebApp on Raspberry Pi 2 Model B

Postby heyted » Mon Mar 09, 2015 4:40 pm

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.
heyted
newt
newt
 
Posts: 3
Joined: Thu Mar 05, 2015 5:49 pm

Re: WebApp on Raspberry Pi 2 Model B

Postby kevin » Mon Mar 09, 2015 5:13 pm

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
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am


Return to General

Who is online

Users browsing this forum: No registered users and 37 guests

cron