[OBSOLETE] DSC -> EVL-3(4) -> Alarmserver -> Smartthings

I forked it as I moved the code to python 3.8, and wanted to leave yours at 2.7, in case anyone still wanted that code base. I’ve also added better logging features (at least what I wanted), and fixed a few things.

i just feel like that would split brain any future development efforts, I see no reason to leave the codebase on 2.7, it’s just a matter of who has time to work on it, it’s easy enough to install an older python, but it’s probably best that we move to 3.x

Okay, sounds like a plan. I’ll create a pull request. :grin:

Hey guys, if you get tired chasing this down, there is another way to get info from your DSC panel into smart things. DSC makes an expansion module called the PC5208. You can pick one up on eBay for cheap because they are plentiful and no one uses them in the alarm business. They wire into the four wire keybus like any other panel and provide you with 8 programmable outputs.

You can program them to trigger in just about any event, and you can even map multiple zones to one output (I have one that includes all of my windows). The outputs are switched negative 12vdc. I used relays and an esp8266 running konnected to get the inputs into smsrthings. All in I’m at like $50 on supplies. The hardest part out of all of it was learning how to program a dsc1616 through the keypad.

Just thought I’d share. I spent months reading through this thread before I stumbled on the 5208. All in I’m glad I went that route because the esp8266 is just so easy to set up.

Every few days I have an issue where alarmserver hangs.

The last line in the log is always:

2020-06-04 15:49:01 raw input:50201028
2020-06-04 15:49:01 RX < 502 - 010 - System Error 010

When this happens, alarmserver does not work anymore (does not report any status of any sensors).

Has anyone had the same issue?
Is there a way to setup a cronjob for example to restart alarmserver when this happens?
Or is there a better solution?

thanks

I sent the error code manual to @rtorch so he can tell you what 010 is, I don’t have access to that doc until I get home.
My update has been running solid after a few kinks weeks ago.

Seems like a buffer overrun error was received. Can you post a bit more of the log file?

This is from 2 days ago

2020-06-06 14:23:07 RX < 849 - 11 - Verbose Trouble Status
2020-06-06 14:23:07 raw input:51100F7
2020-06-06 14:23:07 RX < 511 - 00 - Keypad Led Flash State - Partition 1
2020-06-06 14:23:07 myURL: xxx
2020-06-06 14:23:08 raw input:5109C12
2020-06-06 14:23:08 RX < 510 - 9C - Keypad Led State - Partition 1
2020-06-06 14:23:08 myURL: xxx
2020-06-06 14:23:09 raw input:6511CD
2020-06-06 14:23:09 RX < 651 - 1 - Partition Home Not Ready
2020-06-06 14:23:09 myURL: xxx
2020-06-06 14:23:47 raw input:50201129
2020-06-06 14:23:47 RX < 502 - 011 - System Error 011
2020-06-06 14:25:57 raw input:60900938
2020-06-06 14:25:57 RX < 609 - 009 - Zone xxx Open
2020-06-06 14:25:57 myURL: xxx
2020-06-06 14:26:06 raw input:61000930
2020-06-06 14:26:06 RX < 610 - 009 - Zone xxx Restored
2020-06-06 14:26:06 myURL: xxx
2020-06-06 14:27:15 raw input:51110F8
2020-06-06 14:27:15 RX < 511 - 10 - Keypad Led Flash State - Partition 1
2020-06-06 14:27:15 myURL: xxx
2020-06-06 14:27:16 raw input:51080FE
2020-06-06 14:27:16 RX < 510 - 80 - Keypad Led State - Partition 1
2020-06-06 14:27:16 myURL: xxx
2020-06-06 14:27:17 raw input:8491107
2020-06-06 14:27:17 RX < 849 - 11 - Verbose Trouble Status
2020-06-06 14:27:17 raw input:51100F7
2020-06-06 14:27:17 RX < 511 - 00 - Keypad Led Flash State - Partition 1
2020-06-06 14:27:17 myURL: xxx
2020-06-06 14:27:18 RX < 510 - 9C - Keypad Led State - Partition 1
2020-06-06 14:27:18 myURL: xxx
2020-06-06 14:27:19 RX < 651 - 1 - Partition Home Not Ready
2020-06-06 14:27:19 myURL: xxx
2020-06-06 14:27:47 RX < 502 - 011 - System Error 011

I’m assuming you modified the code to log “raw input:” line, as the last code I upload to github does not have this line anywhere in it. Any other changes you’ve made?
Are you using my branch of Alarmserver?
Also, you have a “verbose trouble status” occurring; connection or power issues with your envisalink? This may be triggering the system error eventually, as it all happens in the same minute.

thanks @rtorch. I just ordered a new RPI4. I’ll do a fresh install when it gets here and update you if it keeps showing up.
I probably don’t have the latest update right now.

okay, sounds good.

Is this the correct repo for the latest code? Just want to make sure since I don’t see any recent updates

I’ve updated the code and it now requires Python 3. You can find it here. I did a pull request to add my changes back to LXXerro, but it hasn’t been completed.

yeah, i need to follow up with you on this, there’s a lot of other random stuff that got included in that PR, need to see if we can pair it down to just the alarm stuff

@rtorch, do I need python 3.8?
Just did a fresh install on an RPI4 with Buster, the latest version of python in the official repos is 3.7 but it does not seem compatible:

python3 ./alarmserver.py

Using configuration file /home/pi/alarmserver/alarmserver.cfg

2020-06-11 18:35:06 Alarm Server Starting…

2020-06-11 18:35:06 Currently Supporting Envisalink 2DS/3/4 only

2020-06-11 18:35:06 Tested on a DSC PC1616 + EVL-3

2020-06-11 18:35:06 and on a DSC PC1832 + EVL-2DS

2020-06-11 18:35:06 and on a DSC PC1832 v4.6 + EVL-4

2020-06-11 18:35:06 and on a DSC PC1864 v4.6 + EVL-3

2020-06-11 18:35:06 myURL: https://graph.api.smartthings.com:443/api/smartapps/installations/xxx

2020-06-11 18:35:06 myURL: https://graph.api.smartthings.com:443/api/smartapps/installations/xxx

2020-06-11 18:35:06 Shutting down server due to errors.

Sure thing. If I remember correctly, when I did the PR, it said something about to many changes were present to properly merge. I never did look further into it though…

I would start by checking your config file

Resolved:
It turns out I already had a version of alarmserver running in the background.

When I ran Xero’s app, it gave me the following which helped me realize the mistake.

Traceback (most recent call last):
  File "alarmserver.py", line 870, in <module>
server = AlarmServer(config)
  File "alarmserver.py", line 630, in __init__
self.bind(("", config.HTTPPORT))
  File "/usr/lib/python2.7/asyncore.py", line 342, in bind
return self.socket.bind(addr)
  File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

After a pkill, I was able to run your version. Thanks!

This a veeery old thread, but I can’t seem to find information regarding the installation of AlarmServer on a raspberryPi. If someone can point me out to this, i’ll appreciate it. Admittedly , I am new to using a RaspberryPi.

Also, if this information is all plain here and its just my lack of knowledge on the matter, please also let me know so I can work on researching more and learning.

Thanks all !

Have you seen the readme on the github repo?

The following part is to be done on the RPI

This part is to be done in the SmartThings web interface

what step are you at?