Malformed string decoder.py:317

General Discussion

Malformed string decoder.py:317

Postby choleman » Tue Jun 09, 2015 12:35 pm

I bought this a few months ago and finally got it installed.

It is installed, it does see the alarm panel (Vista 20), the unit works, keypad works, everything works EXCEPT for the automated notifications.

Only thing I did (to try to fix this) was update alarmdecoder and alarmdecoder-webapp (which wouldnt work for some reason) and I manually had to "git" them, pip install them, but still had to manually copy the files to /opt/* cause the files in /opt/* still didnt update. (new to pi, so maybe I did something wrong)

But here are settings....

On ad2pi unit:

Settings:
No cameras
Default setup with it configured as "local" with default settings, no ssl
No users
No zone name definitions


Notification
type = custom
owner = admin
desc = logger

notify on
Alarm system is triggered?
Alarm system stops signaling?
A panic has been detected?
A fire is detected?
Alarm system is armed?
Alarm system is disarmed?
Power status has changed?
A low battery has been detected?
The AlarmDecoder has rebooted?

post url = internal.xxx.lan
post path = /alarmlog.php
ssl = no
post type = urlencoded (although ive tried json)
custom values = NONE sat

On "save&test" I get a "test notification sent"
on custom server (internal...) logs I get
"192.168.xx.xx - - [09/Jun/2015:13:18:30 -0700] \”POST /alarmlog.php HTTP/1.1" 200 247 "-" "AlarmDecoder/v1.0"


Here is the problem:

Under AlarmDecoder-WebApp
Log
App
"ERROR : Error sending notification...... malformed string in decoder.py:317" (cant copy EXACT string at moment)

On my custom server (internal), I get no attempt or log of attempt in either my request log OR my error log (so ad2pi never attempted to send out the notification (due to the error)

on the pi, in
/var/log/gunicorn/alarmdecoder.log
Code: Select all
[2015-06-08 08:30:53 +0000] [2264] [INFO] Starting gunicorn 19.1.1
[2015-06-08 08:30:53 +0000] [2264] [INFO] Listening at: http://127.0.0.1:8000 (2264)
[2015-06-08 08:30:53 +0000] [2264] [INFO] Using worker: socketio.sgunicorn.GeventSocketIOWorker
[2015-06-08 08:30:53 +0000] [2292] [INFO] Booting worker with pid: 2292
[2015-06-08 08:31:24 +0000] [2292] [ERROR] Exception in worker process:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 193, in init_process
    super(GeventWorker, self).init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 120, in init_process
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/socketio/sgunicorn.py", line 80, in run
    **ssl_args
  File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 72, in __init__
    address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 193, in init_process
    super(GeventWorker, self).init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 120, in init_process
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/socketio/sgunicorn.py", line 80, in run
    **ssl_args
  File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 72, in __init__
    address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 193, in init_process
    super(GeventWorker, self).init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 120, in init_process
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/socketio/sgunicorn.py", line 80, in run
    **ssl_args
  File "/usr/local/lib/python2.7/dist-packages/socketio/server.py", line 72, in __init__
    address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'
[2015-06-08 08:31:24 +0000] [2292] [INFO] Worker exiting (pid: 2292)
[2015-06-08 08:31:25 +0000] [2302] [INFO] Booting worker with pid: 2302

   


/var/log/nginx/error.log
I only get an error regarding a missing user_custom.css
/var/log/nginx/error.log
is fine from what I can tell



My custom php script on my internal machine when manually triggered issues replies strictly with an "OK" as a response.


Any help, greatly appreciated.
choleman
newt
newt
 
Posts: 2
Joined: Tue Jun 09, 2015 12:08 pm

Re: Malformed string decoder.py:317

Postby kevin » Tue Jun 09, 2015 12:41 pm

Please post your PHP script as well so that I can test this apples/apples

Thanks,
Kevin
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: Malformed string decoder.py:317

Postby choleman » Tue Jun 09, 2015 1:46 pm

I will later when I'm back at my office.

I was going to say, I'm not a python programmer (but I can program), since this might be difficult to troubleshoot/replicate, if you can give me a few lines of code to possible inject into decoder.py, or whatever file contains the function that its calling to log more information, I can insert it, restart the apps and help diagnose the problem.
choleman
newt
newt
 
Posts: 2
Joined: Tue Jun 09, 2015 12:08 pm

Re: Malformed string decoder.py:317

Postby kevin » Wed Jun 10, 2015 9:45 am

I have fixed this locally - it's an issue in the Custom notification send routine when no custom values are defined - you can define a custom key/value to fix until the code is pushed to github
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 14 guests

cron