We have moved at community.getvera.com

Author Topic: Setup, NX-8E  (Read 9017 times)

Offline Vuser

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Setup, NX-8E
« on: December 13, 2012, 07:41:40 pm »
Hi futzle, (et al)

New user trying to use your app here.  I need some help.  Before I get to details I want to thank you for taking on such an ambitious task, and also hope that you are feeling better, having read you were under the weather.

I am running a Vera 3 unit with UI5 and I just installed a Caddx/GE NX-8E alarm panel, and it seems to be happy.  I bought: 

cable for the serial port on the alarm (p-0003 serial adapter ribbon cable)
DB9 F/F Null Modem serial cable (which I have also confirmed that RTS&CTS, and TX&RX are crossing ie Null Modem)
USB to Serial Dongle - (1st tried pl2303, then tried a ftdi chipset)


At first I tried a USB to Serial converter dongle which had a pl2303 driver, and I read through and tried the troubleshooting on this page: http://code.mios.com/trac/mios_caddxnx584/wiki/UI5

I have tried troubleshooting the usb serial port with the info on the forums from someone using the the dmesg linux instructions - etc...

I also confirmed several times that the alarm panel is set as this info from Eddie on this thread.

Location Data to be entered:
LOCATION #207 - 1 ON (Serial Port Enable for Home Automation)
LOCATION #208 - 4 ON (Serial Port Baud Rate = 31600)
LOCATION #209 - SEGMENT #1   (Set the Home Automation protocol to BINARY): 1 OFF
LOCATION #210 - SEGMENT #1 : 2 5 6 7 8 ON
LOCATION #210 - SEGMENT #2:  1 3 4 ON
LOCATION #211 - SEGMENT #1: 2 4 5 6 7 8 ON
LOCATION #211 - SEGMENT #2: 1 3 4 5 ON
LOCATION #211 - SEGMENT #3: 1 2 3 5 7 ON
LOCATION #211 - SEGMENT #4: 3 4 5 6 7 8 ON


I also tried manually uploading the files as shown at the bottom of this page: http://code.mios.com/trac/mios_caddxnx584/wiki/UI4

Even though I am running firmware 1.5.408 which is later than the mentioned 1.5.261, the manual upload of the L_CaddxNX584Security.lua does not go because the UI complains the file is too big.  So I figured out how to use WinSCP and connected in SCP mode to upload the L_CaddxNX584Security.lua file to the /etc/cmh-ludl as called out in step 2 of the UI5.  Manually the device created does not pick up all the tabs that the app install does.  Notibly the connect tab where you select the serial port never shows up so I can't set it there.  I do set it on the Serial Port Configuration section on the develop apps area.

Then I gave up using the pl2303 cable based on some forum posts which call into question whether the cable works reliably and ordered a ftdi driver cable which I just got, but low and behold I have the same lack of communication.

(I also checked to see if there are duplicate files as was the case with Drew just above.  There are no duplicate files between the cmh-lu and cmh-ludl directories and also no non .lzo extensions in the cmh-ludl itself)

I am going to next have to hook up an older computer with a db9 serial port and run a terminal emulation program to see if I can talk to the alarm through the cable manually.  Before I do that I wanted to reach out and see if there is anything less taxing that I might check first ?

Thanks for reading all this, and for any help you can offer !
« Last Edit: March 30, 2013, 02:25:33 am by futzle »

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #1 on: December 13, 2012, 08:58:51 pm »
Hi Vuser, welcome to the forum.

Definitely the first thing to do is to check that you have any communication at all with the alarm panel. You should be able to use any computer with a USB port. Use a serial communication program like PuTTY and make it talk to your serial/USB adapter. I can't provide detailed instructions because I'm a unix household, but as this is not specific to the alarm panel or to Vera, Google is your Friend.

Once you have that working you can connect the USB adapter to the Vera. Even before you do anything with my plugin you should see the adapter in the serial port config page that you already found. Make sure you set the speed, parity and start/stop bits correctly. This is not optional.

Now you can try the plugin. Really try to have it work from apps.mios.com. Sideloading files, like you've done, is only going to make your life harder. For instance, you've forgotten to compress the Lua file, which might work, but it might not. I recommend that you remove the files that you sideloaded and give yourself a clean slate.

Anything that doesn't work from this point on is a candidate for a bug. Screenshots, steps to reproduce, luup logs, all the normal ways you report bugs, and I can look at it.

Let me know how you go.

Offline Vuser

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #2 on: December 13, 2012, 10:36:15 pm »
Hi futzle,

Thanks for the quick reply.  I am trying to get to the bottom of communicating with the adapter and alarm without the vera.

It's been a trying time thats for sure.  I am using Windows 7, had to get up to speed on putty, because hyperterm is gone.  Not sure about how I can get the alarm to respond normally so struggling there too, but I am sure it's N/8/1 38400 and the serial port is enabled on the alarm.

That said, I have been struggling with some DL900 software that was written to communicate with the alarm, I believe to hasten setups, but the windows version does not work on Windows 7, and the dos version seems to have to have full screen mode which Windows 7 doesn't support.

All these fun and games have gotten to me.  I will resume again tomorrow and try to have something positive to report.

Regards,

- Charlie

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #3 on: December 14, 2012, 12:43:50 am »
Not sure about how I can get the alarm to respond normally so struggling there too,

Just walk past an IR detector to trip the zone. You should see a (garbage because it's binary) message once a second.

Offline Vuser

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #4 on: December 14, 2012, 04:29:29 pm »
Hi futzle,

okay it's a better day today.  I figured out I was too trusting on the Serial Port IDC connector in the NX-8E alarm panel.  I thought I matched the plug correctly, or let's at least say, I assumed there was an orientation key on the IDC connector (as there sometimes is).  Yep, I plugged the connector in backwards.  As soon as I corrected that issue, I had data flowing into my putty session on the laptop, confirming that the alarm panel serial port was transmitting, the cable was good, cross over / null modem adapter was good (as the cable itself is not a null modem), and the ftdi usb-serial converter was good.

So I am trying at this point to figure out the last part, get the usb to serial adapter registered and working on the Vera, and your plugin working on the Vera.

I started out by removing everything, usb-serial cable, and the Alarm App Plugin.  I even went into the Vera and removed all Caddx files there.  (ie, rm *Caddx* in the /etc/cmh-ludl directory - no Caddx files in the /etc/cmh-lu directory, fyi)

Then installed the usb - serial cable.  Set the baud rate (at first I was just shooting for 38.4K, but after not getting things to work, I dropped the baud rate down to 9.6k, on both the alarm panel, and the serial port settings in the UI5 Develop App/Serial Port Configuration area)

Then install your Caddx NX-584 App.  It first complains about not having the port set up, and then I go back into the Develop App/Serial Port Configuration area to set the "used by device" setting.

Still no go.

So I tried kicking both the Vera USB to Serial baud rate down to 9.6K, along with the alarm panel (location 208, segment 1, set to 2 for 9.6k)  I also power cycled the alarm after restarting the luup.

The only symptom / indication that might help is: the UI5 just shows continually, the message "Caddx NX584 Security System[52] : Running Lua Startup".

Any suggestions on what to look at next?

Again, Thanks for developing this, and also thanks for the help !!

- Charlie

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #5 on: December 14, 2012, 04:55:32 pm »
Vuser, it could be a couple of things.

One possibility is that you've set the panel to ASCII mode instead of binary. Probably you didn't make this mistake, but people have, so I mention it.

Two is that two-way communication is still not actually happening. If the plugin sends outgoing messages but never gets a response then it will just keep trying, and trying, and ...

There might be a Three too, but to know I'm going to have to get you to enable debugging in the plugin (Configure tab) and log into the Vera over SSH to capture the /var/log/cmh/LuaUPnP.log file.

Offline Vuser

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #6 on: December 14, 2012, 05:28:33 pm »
Hi futzle,

Well for starters I did have ascii set.  I cleared the '1' and location 209 segment 1 is now '--------'.

Regarding location 209 - I saw this info on diysecurity.com:

Quote
"Interesting, I never noticed this before...
The NX-8E says that 209 is 'Numerical Data' i.e. 0,1,2,etc. BUT the NX-584E documention says the equivalent location, 0, is 'Feature Selection Data', i.e. 1-------
I can't check my devices right now, but I'm pretty sure that the NX-8E doc is wrong and that 209 is 'Feature Selection Data'.

Bottom line:
For Binary protocol it's --------
For ASCII protocol it would be 1-------"
and ...

Quote
"Following up on my previous post...
NX-8E location 209 IS 'Feature Selection Data' and will displayed as I stated in the previous post. The NX-8E doc is wrong.

Another NX-8E doc bug:
NX-8E Location 207 is listed as 'Feature Selection Data' BUT is is 'Numerical Data'."

Regardless, I have turned on verbose logging, and am looking at the LuaUPnP.log.

I see on inbound (52) serial data and outbound (51) serial data

I see "AlarmManager" entries also .

If you can tell me what I should look for, or how to send you a bunch of the info, I am guessing I could redirect a grep statement into a file, and then winSCP it back to my PC so I get the full info.

I see one additional thing, the battery graphic for the alarm panel battery now displays in the UI5 interface.

Thanks again,

- Charlie
« Last Edit: December 14, 2012, 05:33:56 pm by Vuser »

Offline Vuser

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #7 on: December 14, 2012, 05:39:23 pm »
Hold the presses .....

I think I have gotten the app to work.  The zones now scan and fill in, users, event log, etc....

Thanks for the help futzle, I will see how far I can get.  I will offer up to help you if I can with beta assistance if I have anything you would like tested.

Regards,

- Charlie

Offline Vuser

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #8 on: December 15, 2012, 02:42:11 pm »
Hi futzle, (and others)

Having read futzle's disclaimer earlier in the thread to glaso:

Code: [Select]
IMPORTANT: the Luup debug log includes your arm/disarm code if you enter it through the Partition Control tab.
  Don't post logs of that specific action to the forum if you consider your arm/disarm code secret.  Also remember that
your logs are uploaded to MCV by default.  I recommend creating a dummy code like "1234" on the keypad, and enabling
it only for testing, then disabling it once you're satisfied it works.

I have a schlage link door lock, and was trying to automate a scene to unarm the house when the correct code is entered. 
1st, do you think this is a bad thing ?  And second, I am having difficulty figuring out how to do that.

I can arm and disarm the alarm in the partition 1 under Partition 1 Arming Options, but when I make a automation scene, I can arm or stay but not disarm as far as I can tell.  Under the advanced tab, I can set and store a alarm password in the line that calls the "RequestArmMode".  I tried inserting my own "Disarm" but that did not work.

How can I unarm the alarm under a scene ?

Thanks in advance for any help you can offer


Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #9 on: December 15, 2012, 05:53:29 pm »
Under the advanced tab, I can set and store a alarm password in the line that calls the "RequestArmMode".  I tried inserting my own "Disarm" but that did not work.

"Disarmed".

Offline Vuser

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #10 on: December 15, 2012, 06:54:30 pm »
Excellent, works like a charm.

Thanks so much futzle !

Offline Vuser

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #11 on: December 17, 2012, 04:46:28 pm »
Hi futzle,

I have been struggling to figure out how I would know that "Disarmed" would work without having to bother you.  I have looked elsewhere, but don't understand what reference I should have looked at.

Is there at least a brief summary of the commands available through the serial port, and/or from your excellent plugin, so I can get farther to doing things without bugging you step by step and wasting your time.

Thanks !

I am considering how I could help also.  Not sure that me writing up my experience setting up the connection adds anything, as that has been done before....  But I am trying to think how I can help.

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #12 on: December 17, 2012, 06:42:34 pm »
Vuser, the list of states is buried in a file on your Vera. Go to Apps > Develop Apps > Luup files and find S_AlarmPartition2.xml. It's all explained in there in the comments.

The same info applies to any alarm system, by the way, so if you'd known that it was OK to read the threads on the DSC alarm panel you'd have seen this same question and the same answer.

Of course you couldn't know this ahead of time. So you asked. That's pretty much how it has to be. The forum is the only "documentation" for alarm panels since the standardization work for them was driven by us plugin authors and given a lightweight blessing after the fact by MCV.

Offline Vuser

  • Sr. Newbie
  • *
  • Posts: 41
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #13 on: December 17, 2012, 07:53:56 pm »
Thanks again futzle...  I was just looking for something on the schlage door lock, and read about a "yale" lock feature... 

I will try to remember that.  I guess it's safe to say that sometimes, just like an airplane exit right behind you, it pays to be flexible.  I thought it might be in code, but didn't have a clue where to look.

Thanks again.  Will continue to learn with the goal of sharing anything I figure out with others too.