[NEEDS UPDATING] DSC/Vista Alarm Smartapp and devices based on AlarmServer

OK heh now Im getting close. I re did the web api and it built ok the second time. Not sure if I did everything the same or what but it built. Now when I type the command cd j64.AlarmServer.WebApi dnx web, it starts loading but never makes to to the part where it says Listening on http://0.0.0.0:2064 it just freezes before it gets there. elow is a picture of where it freezes.

[URL=http://s837.photobucket.com/user/Intimnasc/media/Mobile%20Uploads/20160320_130822_zpsaezowv8u.jpg.html][/URL]

Well the saga continues I have the Alarm Server running but am unable to open the local host. It says local host refused to connect. I can ping my server from my laptop but not o through port 2064 if that helps any. I am doing all this through RDP into my WHS 2011. Any advice would be sincerely appreciated. My laptop is on a wireless access point and my server is plugged into one of the lan ports on the same access point.

So please someone tell me where my stupidity has overwhelmed me.

@joe64 Thank you so much it is working perfectly. I now need to assign rooms and such in Smartthings to make it easier to use. Again I wish you would take money from me but either way I have a Honeywell Vista here I would give you for free to experiment on at home. You did indicate on an earlier post you would like one.

Any which way I am sorry for all my stupid questions and misunderstandings everyone but I did survive it all.

Thank You All

Hey, just got back in so am catching up on posts. Great job getting it all working, I know it is kind of hard to get running the first time but you pulled it off so kudos for that!

It turns out most of my problems were either my stupidity in the smartthings community or the Windows Home Server being locked down too tight. I had to do it all through Remote Desktop and then there was all the security settings on the server and the router to get it all talking.

Anyways PM me if you want and Ill send you that Vista and keypad for free.

@joe64 OK so I do have one last little issue that I just need advice on. Everything was working perfectly yesterday when I took the dog to the dog park, I even armed it from the dog park as a test. Then last night wife and I get home and Im going to impress the kids with my tech expertise and it wasn’t working. I go inside and see the commands appearing on my server so it appears everything is making it to Smartthings and back to the server. Only problem is nothing updates on Smartthings app and nothing changes on the actual alarm.

EDIT::: I should add everything works still with Eyezon.

If you are on the j64 web app and hit the “stay arm” or “away arm” button that should always be able to connect to the envisalink controller and arm your system. The only time i have seen where it cannot do that is when one of the zones is open so the system can’t be armed. Or, the envisalink controller itself is having an issue. You can login to the envisalink servers web app (http://envisalink.attlocal.net) and in the top right there is a network menu option. Click on that and scroll to the bottom and it should show as online. There is also a “reboot envisalink” option at the bottom of that page if you want to try restarting it. You could also try restarting the j64 app itself by killing the process and starting it back up.

Let me ask you this when I started having problems I went through all 3 applications and did the dnu restore and dnu build. I then restarted the web ap. Did I screw something up?

That should not cause a problem as long as you started it back up with dnx web command? Also, make sure you did not change the admin password on the j64 web app? Right now you can’t change that as it will cause an issue so you would need to set that back to the default if you did.

I am seeing a common new problem when I try to restart the web ap it says “Unable to resolve project from” and then the address where the project is. If I try to do a restore and buld on them all, restore goes fine but build says “unable to locate project .json.”

Have I really screwed something up?

Ensialerts says online Envisalrm status says not subscribed and envisalink tpi says off line. Is all that normal?

It sounds like you are not in the correct directory when you do that command. Make sure you have moved to the correct directory and then issue those commands.

I think you are on windows so if you pasted these commands into a file called j64Start.cmd and put it in the top level directory (j64.AlarmServer) it should move to the correct directory and execute the correct commands. To run it you would just double click the file to run it from windows explorer or from the dos command prompt just type in j64Start.cmd.

@echo off

rem Step 1 - run a restore on the Auth lib
echo "Running dnu restore for Moon.AspNet.Authentication.Basic"
cd src/Moon.AspNet.Authentication.Basic
call dnu restore >restore.log

rem Step 2 - run a restore on the Xmpp app
echo "Running dnu restore for alarmserver
cd ../j64.AlarmServer
call dnu restore >restore.log


rem Step 3 - run a restore on the WebApi app
echo "Running dnu restore for WebApi"
cd ../j64.AlarmServer.WebApi
call dnu restore >restore.log

rem Step 4 - run the web app
echo "Running the j64AlarmServer Web App"
cd .
dnx web

Off line means that the j64 alarmserver is not communicating with it. Probably because it did not start up yet.

WOW thats awesome and way simpler. OK now web server is running and still not talking to the Envisalink. Only thing I can think of is a factory reset on the Envisalink since your stuff is working fine and I can see the server communicating the commands.

Now last request treat me like you would your mom or dad in case you are assuming something aout my knowledge level I may be missing something really stupid to you but not me.

Make sure you have the correct address setup in the j64 web app config page for that envisalink server. Maybe the IP address has changed or something like that. You can also look in the TPI log on the home page of j64 app since that shows all of the activity between the app and the envisalink controller. It may give some clues as to why it is not communicating with the envisalilnk any longer.

OK so I put in the hostname “http://envisalink.attlocal.net” and reset the envisalink changed the password back to user for now and its working again. Thank You so much sir you are a rare breed willing to take me this far. Thank You.

On a side note prolly not going to have time to hand deliver the Vista so Ill go ahead and mail it that traffic from Walnut Hill and loop 12 to where your at is a pain. Ill box it up tomorrow and have it in the mail by Friday. So lastly you wont take my money will you let me get dinner and beers at your choice of venues? Or better yet let me smoke you a brisket and deliver it to you in the next few weeks?

@joe64 Just a quick question, I see to get out of sync every day around the same time and have that same comms problem. You already taught me how to fix that but any suggestions on what may be causing it? Seems like every day around 5-7pm it happens. I get all the comms between alarm server and ST and my cell phone but nothing to Envisalink. Two days in a row same problem same time.

Not sure what you mean by getting out of sync. i would make sure that your server is not hibernating or sleeping as that would certainly cause an issue. Also, if the app is still running it will automatically ping the envisalink controller periodically. If there is an issue wiht that connection it will show up in the TPI logs so you might check those to see if something unusual is happening at that time.

On the Envisalink sight it shows the TPI server off line and Im not sure where to look at the TPI logs. By out of sync I mean I can send commands from my phone and see them populate on the server but nothing is happening on the alarm. So I am assume everything with Smartthings and the stuff you wrote is working so it has to be the alarm panel or the envisalink.

EDIT:: I have the server set to never sleep or hibernate.

@joe64 I may have found a bug. If I change the admin password and restart the server on Windows, it will no longer allow the Smartthings app to authenticate. I receive the following error in the log file where #####my smartapp oath##### is my oath key for the smartapp. Any ideas on why this happens? Is the password hard coded somewhere in the app?

warn: Microsoft.AspNet.Identity.UserManager<j64.AlarmServer.Models.ApplicationUser>[0]
Invalid password for user #####my smartapp oath#####.
warn: Microsoft.AspNet.Mvc.Controllers.ControllerActionInvoker[0]
Authorization failed for the request at filter ‘Microsoft.AspNet.Mvc.Filters.AuthorizeFilter’.
info: Moon.AspNet.Authentication.Basic.BasicAuthenticationMiddleware[5]
AuthenticationScheme: Basic was challenged.
info: Microsoft.AspNet.Authentication.Cookies.CookieAuthenticationMiddleware[5]
AuthenticationScheme: Microsoft.AspNet.Identity.Application was challenged.
info: Microsoft.AspNet.Mvc.ChallengeResult[1]
Executing ChallengeResult with authentication schemes ().
info: Microsoft.AspNet.Mvc.Infrastructure.MvcRouteHandler[2]
Executed action j64.AlarmServer.WebApi.Controllers.AlarmSystemController.StayArm in 0.0079ms
info: Microsoft.AspNet.Hosting.Internal.HostingEngine[2]
Request finished in 0.0422ms 302