Webapp: Workaround to support Program Mode

General Discussion

Webapp: Workaround to support Program Mode

Postby peterd » Fri Jan 09, 2015 12:00 am

There's currently a known bug in the webapp where some panel messages are improperly filtered. The symptom is that the display freezes when you reach a certain point after putting the panel into program mode. This makes programming via the webapp impossible.

I've written the following script to workaround the problem until a fix is integrated into the webapp:
Code: Select all
#!/bin/sh
#
# fix_AD_webapp.sh
#
# An admitted hack, this script works around an Alarm Decoder
# webapp bug which fails to display certain messages while the
# panel is in programming mode. It does this by proxying I/O
# with the AD2USB webapp and spoofing all message types to a
# value which is known to be accepted.
#
# To use, change the webapp's listening port from 10000 to 10002.
# Must be run as root, either as a daemon or with the command line
# "sudo fix_AD_webapp.sh"
#

rm -f /tmp/fifo

mkfifo /tmp/fifo

if [ ! -p /tmp/fifo ]
then
    echo "mkfifo /tmp/fifo FAILED"
    exit 1
fi

nohup netcat -l -k -p 10002 < /tmp/fifo | netcat localhost 10000 \
    | sed -u 's/\[f704[^]][^]]*/\[f704000000008000480200000d0000/' \
    > /tmp/fifo &


I've been running this continuously since September without problems. I hope this helps anyone who wants to program their panel using the webapp...

Peter

Admin - Could you please sticky this until a permanent fix is integrated into the webapp? Thanks!
peterd
newt
newt
 
Posts: 16
Joined: Sat Apr 19, 2014 2:07 pm

Re: Webapp: Workaround to support Program Mode

Postby kevin » Wed Apr 22, 2015 1:55 pm

Unstickying this because there is an official fix in the alarmdecoder library. Anybody affected just needs to do a git pull on the alarmdecoder project (default /opt/alarmdecoder)
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 36 guests

cron