Just installed questions

General Discussion

Just installed questions

Postby trialnerror » Thu Jan 25, 2018 11:10 am

Hi, my AD2PI just arrived. SD card wouldn't boot (image appeared to be corrupt) so I re imaged with the one provided by alarmdecoder for download (from 4/29/16). I updated the raspbian distribution (apt-get update / dist-upgrade) and the webapp/libraries to 'current' within the webapp and got it installed and running on my SafewatchPro 3000 panel. Alarmdecoder is a great product! Now I have my first set of questions. Some were answered here in the forums or documentation. The ones that remain:

Questions:
1) where is the list of "replacers" that can be used in custom messages? I've found these in various places, {time}, {message}, {arm_type}, {status}, {zone}, {zone_name}, but no master listing. I read in the forums that they should appear in a tooltip when creating a custom message but I see no button to create a custom message, only edit existing ones, and no tooltips appear when editing.

2) I set up some overlapping notifications, where an event would trigger more than one notification. However, the event only triggers one notification (seems to be the one lowest in the list of notifications). Is this the expected behavior? If so, how is notification precedence controlled by the user? Simply by putting higher priority notifications lower in the list? EDIT: This works as expected, triggering multiple messages if appropriate. I wasn't seeing the difference between the enabled/disabled check marks by a message.

Problems:
1) trying to set my 3rd alarm panel button in Settings>Keypad Settings>Special Buttons to "panel default" instead of "medical" throws an error:
Code: Select all
AttributeError

AttributeError: type object 'AlarmDecoder' has no attribute 'KEY_F5'
Traceback (most recent call last)
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/opt/alarmdecoder-webapp/ad2web/app.py", line 128, in __call__
    return self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 792, in decorated_view
    return func(*args, **kwargs)
  File "/opt/alarmdecoder-webapp/ad2web/keypad/views.py", line 185, in special_buttons
    special_4_key = create_special_setting_key(special_4, 'special_4_key', interpret_key(form.special_4_key.data ))
  File "/opt/alarmdecoder-webapp/ad2web/keypad/views.py", line 98, in interpret_key
    return AlarmDecoder.KEY_F5
AttributeError: type object 'AlarmDecoder' has no attribute 'KEY_F5'

The debugger caught an exception in your WSGI application. You can now look at the traceback which led to the error.


2) In Notifications, under the action column, it looks as though you could enable/disable notifications by clicking on the checkmark, which calls "https://x.x.x.x/settings/notifications/[notification#]/toggle". However, clicking this doesn't toggle the checkmark to something else, and the notification still occurs. I didn't see that the toggle was changing check color only. That and/or a reboot seems to have remedied this and it now works as expected.

Not sure:
Settings > Advanced > Diagnostics shows some packages missing.
-- cffi
-- usb
-- miniupnpc
-- pycparser
-- pyftdi

There were many more missing on the original raspian image downloaded from alarmdecoder, these are what remained after the webapp notified me there were updates to the webapp and the library and I installed those (through the webapp). I tried installing these remaining missing modules with sudo pip install [pkg], but that caused the webapp to no longer work even after reboot, what is proper way to add these missing packages (and is this necessary)?

For the future?

I'm running this concurrent with ADT Pulse. Pulse gets messages on disarm that show which user disarmed the system (as a number) and on the Pulse site you can associate this user number with a name so the Pulse alert shows both user# and user name. It would be nice if AD were able to do this.

The Pulse site is also able to distinguish between arm away and arm stay; perhaps I've confirmed that the replacer {arm_type} in the "arm" message can be used to accomplish this.

Again, many thanks to the alarmdecoder folks for this product.
Last edited by trialnerror on Fri Jan 26, 2018 9:20 am, edited 1 time in total.
trialnerror
Junior Nut
Junior Nut
 
Posts: 38
Joined: Wed Jan 03, 2018 11:10 am

Re: Just installed questions

Postby trialnerror » Fri Jan 26, 2018 6:01 am

Hmmm. I guess {time} is not a variable that can be used in custom messages ... notifications with it embedded don't send, and this shows up in the logs when the send is attempted:

Code: Select all
2018-01-26 08:50:44,488 ERROR: Error sending notification for Logger: u'time' [in /opt/alarmdecoder-webapp/ad2web/decoder.py:443]

i.e., when the message is set to "Zone {zone_name} ({zone}) has been restored.", it works. When it is set to "{time} - Zone {zone_name} ({zone}) has been restored.", it doesn't.

However {arm_type} does work in the "arm" message, returning STAY, or AWAY.
trialnerror
Junior Nut
Junior Nut
 
Posts: 38
Joined: Wed Jan 03, 2018 11:10 am

Re: Just installed questions

Postby trialnerror » Sun Jan 28, 2018 1:18 pm

I got timestamps on notifications up by hard coding them in. My first line of python code ...

Modified /opt/alarmdecoder-webapp/ad2web/notifications/types.py by inserting a line of code:

Code: Select all
    def send(self, type, **kwargs):
        errors = []

        for id, n in self._notifiers.iteritems():
            if n and n.subscribes_to(type, **kwargs):
                try:
                    message = self._build_message(type, **kwargs)

                    if message:
#added code ->
                        message = message + " [" + datetime.datetime.now().strftime("%I:%M:%S%p %a %m/%d/%y") + "]"
#added code <-
                        if n.delay > 0 and type in (ZONE_FAULT, ZONE_RESTORE, B$


This adds a " hh.mm.ss[AM|PM] day mm/dd/yy" between brackets at the end of all notification messages.
trialnerror
Junior Nut
Junior Nut
 
Posts: 38
Joined: Wed Jan 03, 2018 11:10 am

Re: Just installed questions

Postby trialnerror » Sun Jan 28, 2018 1:19 pm

I got timestamps on notifications up by hard coding them in. My first line of python code ...

Modified /opt/alarmdecoder-webapp/ad2web/notifications/types.py by inserting a line of code:

Code: Select all
    def send(self, type, **kwargs):
        errors = []

        for id, n in self._notifiers.iteritems():
            if n and n.subscribes_to(type, **kwargs):
                try:
                    message = self._build_message(type, **kwargs)

                    if message:
#added code ->
                        message = message + " [" + datetime.datetime.now().strftime("%I:%M:%S%p %a %m/%d/%y") + "]"
#added code <-
                        if n.delay > 0 and type in (ZONE_FAULT, ZONE_RESTORE, B$


This adds a " hh.mm.ss[AM|PM] day mm/dd/yy" between brackets at the end of all notification messages.
trialnerror
Junior Nut
Junior Nut
 
Posts: 38
Joined: Wed Jan 03, 2018 11:10 am


Return to General

Who is online

Users browsing this forum: No registered users and 34 guests

cron