juggie / AlarmServer

Envisalink 2DS/3/4 Alarm Server (Proxy & HTTP/JSON)
72 stars 67 forks source link

Tornado version for SmartThings? #38

Open JoshNoble8604 opened 8 years ago

JoshNoble8604 commented 8 years ago

I am a novice at this and seem to be spiraling down the rabbit hole. Now that I have spent days to figure out how to deploy all the prerequisites, host VMs on my desktop, and register SSL certificates, I am now get the following error when I try to run alarmserver.py from the SmartThing branch.

Print sys.exc_info()[0] The error is on line 415

Is the new Tornado version compatible with SmartThings? Any idea how to resolve this issue?

juggie commented 8 years ago

Which branch specifically are you seeing the error in? Smartthings branch I assume? That was written by @kholloway I personally don't own smartthings or have any smartthings devices, etc.

The new version I rewrote recently (tornado) would allow easy integration with smartthings but lacking a device I haven't written anything. I'd be happy to try and help, but without access to the smartthings API I am not sure what I can do.

JoshNoble8604 commented 8 years ago

Hi @juggie, yes I am trying to deploy the alarm server from the SmartThings branch. I just emailed @kholloway as well. I believe my immediate challenge is to figure out why line 415 of this file gives me a syntax error when deploying.

https://github.com/juggie/AlarmServer/blob/smartthings/alarmserver.py

I do not know Python, so I don't know where to start. Does anything jump out at you?

The last update to the SmartThings branch was 2 years ago, and there is almost no documentation. If anyone has successfully deployed this within the last couple years then I would love your input to this thread. If I can get this working, I will contribute a full end-to-end deployment guide.

kholloway commented 8 years ago

That's a Python 3 error since print is now a function instead of a statement. You can easily fix it by wrapping the print function in ()'s as in '''print (sys.exec()[0])''' OR you can downgrade your Python to version 2 since 3 isn't really tested or supported yet on this code.

https://docs.python.org/3.0/whatsnew/3.0.html

alexruffell commented 8 years ago

@JoshNoble8604 - I have been running a Raspberry Pi, with a 4" LCD on its back to show AlarmServer's (TNX @juggie ) status messages, to interface to my SmartThings home automation setup (TNX @kholloway ). It has been running for quite a while now and it allowed me to use my DSC alarm sensors for automation purposes without having to add secondary sensors. I am always looking for ways to speed things up given there is a small but noticeable delay for DSC >> AlarmServer >> ST communication. RPI3 may have helped a bit but I am not sure so I am interested in upgrading to this new software but if it needs a special version of it to work with ST, then I am at a loss. I wonder if I can image my RPI's SD card, and just replace the files in this repository leaving all else the same... I'll have to try.