We have moved at community.getvera.com

Author Topic: Setup: NX-8E, no communication  (Read 3428 times)

Offline HakrWannaB

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Setup: NX-8E, no communication
« on: September 15, 2012, 06:09:22 pm »
Hi All,

New to the forum and running into a bit of an issue with micasaverde talking with my NX-8E.  Here's what I have so far...

The NX-8E to DB9 serial cable:
DB9 pinout looking at pins:
1 2 3 4 5
 6 7 8 9

NX-8E RS-232 pinout looking at pins:
2 4 6 8 10
1 3 5 7 9

Cable connections:
NX-8E pin 3: RX (DB9 pin 2)
NX-8E pin 5: TX (DB9 pin 3)
NX-8E pin 9: Ground (DB9 pin 5)
NX-8E pin 4: RTS (DB9 pin 7)
NX-8E pin 6: CTS (DB9 pin 8 )

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

Setup works using DL900 software with no issues.
USB to serial dongle: UC232R-10 with FTDI chipset

putty to micasaverde ip address...
cd /dev/usb/tts then ls and see a 0 when USB dongle plugged in and nothing when removed
cd /tmp/log/cmh
grep '^01' LuaUPnP.log
...
01      09/15/12 17:35:00.240   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:02.744   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:05.242   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:07.739   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:10.238   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:12.734   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:15.238   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:17.747   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:20.234   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:22.732   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:25.228   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:27.733   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:30.232   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:32.729   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:35.226   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:37.731   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:40.228   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:42.726   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
01      09/15/12 17:35:45.222   LuaInterface::CallFunction-2 lu_incoming failed /etc/cmh-ludl/L_CaddxNX584Security.lua:683: attempt to index field '?' (a nil value) <0x4813>
...

When I click on the wrench in the Security System Device it opens fine, but when I click on the Zones tab, it opens and says... Opening zone Tab... and never does anything else.   I can't  click on most of the other tabs as well, since they also cause the same issue.

I'm grateful for any help anyone may be able to provide!

Any pointers on what else I might need to look at? 
« Last Edit: March 30, 2013, 02:48:07 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: September 15, 2012, 08:01:26 pm »
HakrWannaB, that's the same bug that alexk identified a week or two ago.  I need to change code in the plugin to not attempt to set zone status on zones that the plugin has never met yet.

You can work around it by adding all your zones manually.

Offline HakrWannaB

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #2 on: September 15, 2012, 08:39:39 pm »
Hi futzle,

Thank you very much for your speedy response.  I feel silly, but I'm not sure how to add zones manually.  Whenever I click on the Zones tab, in UI5, it just says "Opening zone Tab" and never does anything.  It just sits there forever.  Am I missing something, is there a way to manually configure zones beyond using the Zones tab?

Thanks again for your help, I very much appreciate it!

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: September 15, 2012, 10:30:28 pm »
I feel silly, but I'm not sure how to add zones manually.  Whenever I click on the Zones tab, in UI5, it just says "Opening zone Tab" and never does anything.  It just sits there forever.  Am I missing something, is there a way to manually configure zones beyond using the Zones tab?

There is, but trust me, you don't want to know.

What version of the Vera firmware are you using?  There's a known issue with some where you have to click the tab twice.  Also, be sure you have cleared your browser's cache just in case.

I need you to enable "Debug to Luup log" (Configure tab) and capture the Luup log again if a second click doesn't do any good.  There's something deeper going on and the plugin is getting unexpected responses from the security system's interface.

Edit: oh, also, I've never seen JavaScript tabs work over the cp.mios.com tunnel.  You are doing this on the local LAN, aren't you?

Edit edit: If you are on the LAN, then a JavaScript tab failing to load can also be an indicator of the browser barfing on something unexpected.  I tested the code on Firefox and Safari.  I don't have access to IE so I haven't tested that platform.  If you know how to capture your browser's JavaScript error log then that'd be good to see as well.
« Last Edit: September 15, 2012, 10:38:52 pm by futzle »

Offline HakrWannaB

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #4 on: September 15, 2012, 10:47:05 pm »
I'm running Vera firmware version: 1.5.408.  I did try clicking the tab 2x with the same results, i.e. it just says "Opening Zone Tab" and nothing happens. 

I didn't clear my Firefox cache, but I did run this on Opera with the same results having never visited Vera from Opera before.  I'll try clearing the cache after posting this.

Clicking on the Configure tab yields the same results as clicking on Zones tab, it just sits there and nothing happens, so I can't enable "Debug to Luup" log.  I'm not sure if there's a way to enable it via the command line?

Yes, I am doing this on a local LAN as well.

One last piece of information is that I had an earlier version of the plugin installed when I was using UI4.  I did get the zones to show up then, but a long time has passed since I used it and since then I upgraded to UI5.  I never deleted the earlier plugin files from when I was running UI4.  After upgrading to UI5 I reuploaded the latest plugin files.  I'm not sure if I needed to delete the old ones first, or they just get overwritten when I reinstalled the new plugin files. 

Thanks again for all your help!

Edit: Tried clearing Firefox's cache with no effect

Edit Edit: Firefox Tools -> Web Developer -> Console (JS only): Hopefully this is what you're looking for...

Edit Edit Edit: Just to prove out that it's not the browser, I've gotten the same results using Win XP Firefox & Opera as well as OS X 10.7 Chrome & Safari - all with the same results
--
[22:53:48.890] not well-formed @ http://10.141.xx.xx/port_3480/data_request?id=lu_status&DataVersion=744556281&MinimumDelay=1000&Timeout=60&LoadTime=1347744556&rand=0.04210719539345864:1
[22:53:49.087] 2012-09-16 02:53:49: start parsing lu_status @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:53:49.087] 2012-09-16 02:53:49: Starting parseLu. @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:53:49.104] 2012-09-16 02:53:49: 22:53:49:104 end parsing lu_status @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
--
[22:54:49.146] not well-formed @ http://10.141.xx.xx/port_3480/data_request?id=lu_status&DataVersion=744556281&MinimumDelay=1000&Timeout=60&LoadTime=1347744556&rand=0.2859555406479177:1
[22:54:49.345] 2012-09-16 02:54:49: start parsing lu_status @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:54:49.346] 2012-09-16 02:54:49: Starting parseLu. @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:54:49.359] 2012-09-16 02:54:49: 22:54:49:359 end parsing lu_status @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
--
[22:55:49.383] not well-formed @ http://10.141.xx.xx/port_3480/data_request?id=lu_status&DataVersion=744556281&MinimumDelay=1000&Timeout=60&LoadTime=1347744556&rand=0.41869706842852195:1
[22:55:49.492] 2012-09-16 02:55:49: start parsing lu_status @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:55:49.493] 2012-09-16 02:55:49: Starting parseLu. @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:55:49.507] 2012-09-16 02:55:49: 22:55:49:507 end parsing lu_status @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
--
[22:56:49.542] not well-formed @ http://10.141.xx.xx/port_3480/data_request?id=lu_status&DataVersion=744556281&MinimumDelay=1000&Timeout=60&LoadTime=1347744556&rand=0.803350951236185:1
[22:56:49.743] 2012-09-16 02:56:49: start parsing lu_status @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:56:49.744] 2012-09-16 02:56:49: Starting parseLu. @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:56:49.752] 2012-09-16 02:56:49: 22:56:49:752 end parsing lu_status @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
--
[22:56:59.566] 2012-09-16 02:56:59: Including script: http://10.141.xx.xx/port_3480/J_CaddxNX584SerialConnection.js @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:56:59.570] 2012-09-16 02:56:59: Including script: http://10.141.xx.xx/port_3480/J_CaddxNX584Security.js @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
[22:56:59.666] 2012-09-16 02:56:59: add keep @ http://10.141.xx.xx/cmh/js/common/cpanel_data.js?*1.5.408-1-29035329*:13476
« Last Edit: September 15, 2012, 11:13:03 pm by HakrWannaB »

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: September 15, 2012, 11:15:22 pm »
One last piece of information is that I had an earlier version of the plugin installed when I was using UI4.  I did get the zones to show up then, but a long time has passed since I used it and since then I upgraded to UI5.  I never deleted the earlier plugin files from when I was running UI4.  After upgrading to UI5 I reuploaded the latest plugin files.  I'm not sure if I needed to delete the old ones first, or they just get overwritten when I reinstalled the new plugin files. 

Probably there are some variables sitting on some of the devices that are messing with you.  I recommend that you wipe everything and start with a clean slate.  Also the installation instructions on http://code.mios.com/trac/mios_caddxnx584/wiki/UI4 for UI5 are a bit out of date, so consider them untrustworthy.  (Edit: I fixed them.)

1. Delete the top-level device.
2. SSH to your Vera and rm any files in /etc/cmh-ludl that have the NX-584 name in them.  Also delete /etc/cmh-ludl/S_AlarmPartition2.xml.lzo, because the file is now in /etc/cmh-lh.
3. Reboot Vera.  (Or just restart the web server and LuaUPnP, but rebooting is much simpler.)
4. Reinstall the plugin from apps.mios.com.
« Last Edit: September 15, 2012, 11:20:29 pm by futzle »

Offline HakrWannaB

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #6 on: September 16, 2012, 08:25:54 am »
futzle,

That did the trick thank you sooooooo much!!!

In the process of reinstalling, either my browser or security software automatically renamed the .js files to .js.txt.  When I looked at the old files sitting on Vera I saw that one of the .js files was indeed named .js.txt, which I'm sure screwed things up.  None the less everything is working as expected, except for Zone scanning, which isn't a big deal since I can manually add them. 

I really appreciate all your help.  Your support is fantastic and I now have a new hero!

Cheers!

Offline HakrWannaB

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #7 on: September 17, 2012, 11:33:50 am »
Hi futzle,

I've get things working nicely with Vera and my NX-8E system.  Thus far I've been using the iPhone Automator.app to arm and disarm my system remotely(after ensuring that my log files are stored on a USB key drive and not uploaded to the server).  The only downside I've noticed is that there's a long delay with Vera (and the Automator.app) when updating the interface to let me know that the system has changed to stay/armed/disarmed.  I can set a notification to tell me every time the state changes, but that's a bit annoying when I'm home and every time I change state I get an text message on my phone.  Do you know if there might be a way to send a notification only when Vera changes the alarm state, and not the keypad?  Also, I would be open to other work arounds that anyone else might have come up with.

As always thanks very much for your 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 #8 on: September 18, 2012, 06:27:37 am »
The only downside I've noticed is that there's a long delay with Vera (and the Automator.app) when updating the interface to let me know that the system has changed to stay/armed/disarmed.

That's a side-effect of the way jobs work.  The job that sets the state is "complete" when the panel responds with an acknowledgment to the original request.  At that stage the partition's state hasn't actually changed.  But in a second, it will.  The web interface checks every second, but some of the control points don't poll as frequently.

The fix is for the plugin to keep the job "open" until the requested state can be seen in the partition.  That's a pretty big change in behaviour and I'm worried about it introducing instability.  Which is why I haven't done it yet.

Quote
Do you know if there might be a way to send a notification only when Vera changes the alarm state, and not the keypad?

There are a few options you can do, all a bit hackish.  The panel really doesn't do anything different with a keypad arm compared to an API arm, so you get the same messages back from it either way.  All of the following methods use indirect proxies for a "real" keypad arming.

One is to make a user just for Vera, give it its own PIN.  When arming/disarming through Vera, use that PIN. When using the keypad, don't.  Then you can inspect the LastUser variable in the Luup Event code and "return false" if it isn't the Vera user, skipping the notification.

Two is to make a scene that both triggers the notification, and which sends the arm/disarm to the partition.  (You can stick PINs into a scene's actions on the Advanced page.)  Keypad arm/disarm won't invoke this scene, and so won't notify.

Three is to rely on differences in keypad arming vs access-point arming.  For instance, you probably never trigger an entry delay when you use an access point, but you do when using a keypad.  You can write code to check the ArmDetailState variable and act on state changes.