Author Topic: Setup: NX-10  (Read 6132 times)

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #15 on: August 29, 2012, 06:45:38 pm »
Hi Alex,

Log 5 looks pretty clean.  That's what all Luup startups should look like for this plugin.

Log 4 is a mess.  The alarm panel is sending duplicate messages back to Vera.  Such behaviour is an indication that the panel has sent a message that it wants Vera to acknowledge, and it doesn't get the acknowledgment.  So it sends the message again.  Vera definitely is sending the acknowledgment packet, it's in the Luup log, so it's getting lost, sometimes, on the way from Vera to the panel.

The only time I've seen this before it turned out to be a dodgy serial connection.  The serial cable wasn't shielded and it was picking up RF interference.  Or the USB-to-serial adapter had a loose connection inside.  It's talked about earlier in this thread.  The fact that it happens only in Log 4 and not in Log 5 is an indication that the problem is intermittent.  Those are buggers to track down.

I can try and harden the plugin so that it is more resilient in the face of repeated messages sent by the panel, but if the Vera-to-Panel transmission channel has outages then even a best effort from the plugin is going to be a problem.

(Dis)arming with PIN requires you to have enabled the Primary keypad function with PIN feature.  The log indicates that you haven't enabled this, so only PINless arming will work.

Also, you found a bug with Log 4.  I had an uninitialized variable.  Thanks for spotting that.

Offline alexk

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #16 on: August 30, 2012, 03:33:29 am »
Hi Futzle,

Yes log 5 was my best log by far.  1/2/3 where from stuck startups and i am guessing it is to do with the cable.  I actually tucked the cable away in a box so that may be the reason.  I will take it out again for the testing and see if that makes it reliable.

Q1: Can u suggest a shielded cable i should buy?  NX-584 has  a male rs-232 pin so i would need a usb to male db9 shielded cable :). any advice welcome on that.


Q2: So regarding Primary Keypad with PIN which is a good funtion to have.  I think every time i enable that something happens to my main keyboards and wireless keyfobs + my SMS user profile.  I will do a re-enable and see what happens perhaps with a log (one thing at a time being changed :) ).  Any advice on this process? should i change the secondary keyboard setting when i change the primary one?

My current issues are:

Q3:  Partition 2/3 will not arm under the settings in the attached document. only partition 1 will and it wont disarm (obviously due to the primary keyboard setting) - am attaching a log where i try to arm partition 3 (and fail)

Q4: is keeping the log option enabled for the plugin a problem? (will it create a huge file that i need to delete?)

Also trying to add to this thread besides questions  - i am attaching a part of the nx-584 manual which indicated the default settings (bold) and in purple the ones I have on my Panel.  hope this is useful.

Re - bug log 4- i feel useful - huray!


Alex
« Last Edit: August 30, 2012, 04:32:18 am by alexk »

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #17 on: August 30, 2012, 06:37:44 pm »
Q1: Can u suggest a shielded cable i should buy?

Not usefully. You and I live on different continents; the chances of us both being able to buy the same item is slim.  Shielding is especially important on the RS-232 cable (the one that runs between your USB adapter and the NX-584 board).  My "cable" is actually just a gender changer plug.

If shielding isn't the issue I'd be looking for a bad connection.  Jiggle the connectors around and see if connectivity comes and goes.

Quote
Q2: should i change the secondary keyboard setting when i change the primary one?

Despite the names, there's no relationship between Primary and Secondary keypad functions.  There's nothing first-y or second-y about them.  So I do not expect changing the enabled state of one to affect the other at all.  I've got no idea why the SMS module objects to you enabling Primary Keypad function.  Let the forum know what you find out.

Quote
Q3:  Partition 2/3 will not arm under the settings in the attached document. only partition 1 will and it wont disarm (obviously due to the primary keyboard setting) - am attaching a log where i try to arm partition 3 (and fail)

I've read the log.  The plugin is definitely sending the right command (0x3e 0x02 0x04—the 0x02 is "Arm in Away mode" and the 0x04 is Partition 3).  It's even being acknowledged by the alarm, but the partition stays disarmed.  I wonder if, deep in the alarm panel's config, there is a bit that needs to be toggled to allow Quick Arm on partition 3.  It exists on the NX-8, according to the programmer manuals floating around on the Web.  (I have only an NX-4, which has only one partition.)

Quote
Q4: is keeping the log option enabled for the plugin a problem? (will it create a huge file that i need to delete?)

Vera rotates the log files.  It will just rotate them a bit quicker, is all.  I'd turn it off long-term, but a few days or weeks isn't going to hurt.  If you need to debug someone else's plugins and need to send them your log, it'd be polite to turn it off to avoid metaphorical noise in the log.

Thanks for the list of defaults vs required settings on the NX-584.

Offline alexk

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #18 on: August 31, 2012, 07:24:42 am »
hi Futzle,

regarding
Quote
Quote from: alexk on August 29, 2012, 11:33:29 pm
Q1: Can u suggest a shielded cable i should buy?

Not usefully. You and I live on different continents; the chances of us both being able to buy the same item is slim.  Shielding is especially important on the RS-232 cable (the one that runs between your USB adapter and the NX-584 board).  My "cable" is actually just a gender changer plug.

If shielding isn't the issue I'd be looking for a bad connection.  Jiggle the connectors around and see if connectivity comes and goes.

I moved the cable to away from various power sources and it is reliable.  i think the reason is that my usb serial cable is a usb to db25 with an adaptor to db9+ a connected db9 to db9 cable.  so basically more length than is necessary + a number of connections (obviously crappy shielding).  we do live in different continents but we are all served by the greater amazon organization.  i was thinking about this one.
http://www.amazon.co.uk/gp/product/B004ZMYTYC/ref=ox_sc_sfl_title_1?ie=UTF8&smid=A3P5ROKL5A1OLE
along with a gender changer.


Quote

Quote
Q2: should i change the secondary keyboard setting when i change the primary one?

Despite the names, there's no relationship between Primary and Secondary keypad functions.  There's nothing first-y or second-y about them.  So I do not expect changing the enabled state of one to affect the other at all.  I've got no idea why the SMS module objects to you enabling Primary Keypad function.  Let the forum know what you find out.


regarding Q2 (primary keyboard etc) I will do some tests now that i have reliability.  the problem isnt the sms module i am sure.  the sms module is the result of something happening to the main unit.  I am guessing it is something to do with the keyboard address set in the NX-584. will test and let you know.

Quote

Quote
Q3:  Partition 2/3 will not arm under the settings in the attached document. only partition 1 will and it wont disarm (obviously due to the primary keyboard setting) - am attaching a log where i try to arm partition 3 (and fail)

I've read the log.  The plugin is definitely sending the right command (0x3e 0x02 0x04—the 0x02 is "Arm in Away mode" and the 0x04 is Partition 3).  It's even being acknowledged by the alarm, but the partition stays disarmed.  I wonder if, deep in the alarm panel's config, there is a bit that needs to be toggled to allow Quick Arm on partition 3.  It exists on the NX-8, according to the programmer manuals floating around on the Web.  (I have only an NX-4, which has only one partition.)

you are correct.  fixed.


Q5:  do sensors in the caddx only give a tripped state when armed?  is it possible when not armed?  this way you can use the alarm sensors for other functions also.

Q6.  is it possible to have a scenario: if after sunset and before sunrise and alarm goes off then all lights on?

Q7:  why arent the partitions recognized by Ivera iphone app?  any ideas?

Q8:  what are some intersting reasons you have created this pluggin for? Obviously webcontrol of the alarm system is one.  it beats sms arming etc. also setting off lights in case of alarms + notifications ofcourse. anything else?

Q9.  Assuming you use Vera to liaise with the alarm and do functions in an alarm.  this makes the system critical.  I would like in that case to make sure that the link between vera is always working and to be notified if the link is down or the app crashes.  is this possible?  i.e. to install a check everyminute that the app is functioning and that it can talk to the alarm?


thanks and i will be back with all results from further testing. Pls do let me know if you want any scenarios tested and logged :)


Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #19 on: August 31, 2012, 06:25:26 pm »
Q5:  do sensors in the caddx only give a tripped state when armed?

They work irrespective of partition state.  You can use sensors for occupancy detection independently of the alarm features.

Quote
Q6.  is it possible to have a scenario: if after sunset and before sunrise and alarm goes off then all lights on?

Yes, but that's just generic scene programming, so it's off-topic for this thread.

Quote
Q7:  why arent the partitions recognized by Ivera iphone app?

Partition support is needed in the phone app.  Some don't have partition support; I knew SQremote was in that category; seems that iVera is too.  You'll have to get support added by the developer of the app (or, since iVera is looking like abandonware, pick a different app).

Quote
Q8:  what are some intersting reasons you have created this pluggin for? Obviously webcontrol of the alarm system is one.  it beats sms arming etc. also setting off lights in case of alarms + notifications ofcourse. anything else?

Seriously, all I use it for is as a backup for when I forget to arm the panel when I leave for work.  I check over the web interface if I armed the partition, and if necessary send a quick arm.  I also have events that fire on arm and disarm that turn on/off cameras inside the house.

Quote
Q9.  [...] this makes the system critical.  I would like in that case to make sure that the link between vera is always working and to be notified if the link is down or the app crashes.  is this possible?  i.e. to install a check everyminute that the app is functioning and that it can talk to the alarm?

If there's no activity in the house then there is no activity on the serial line.  Distinguishing "no activity" from "no connection" is Hard on serial connections.  The best you could do is periodically send a dummy status request (Partition Snapshot would be a good one) and then raise the alarm (figuratively) if you get no reply.  Driving that periodic operation is actually hard, and mixing serial communication with timers on UI4 can lead to corruption of the user's devices, so I haven't tried to add it.  When I no longer have to support UI4 I will see about adding an "Are you there?" action.

Offline alexk

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #20 on: September 10, 2012, 03:04:28 am »
Goodmorning - still testing in my free time but I am going to change the RS232 cable as I am loosing some notifications when the alarm goes off.  will restart the testing after that is fixed.

Offline alexk

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #21 on: September 11, 2012, 03:29:38 am »
Futzle,

a quick question.  is it expected behaviour that the status of the partition from the web ui isnt always updated when i logon?  sometimes i need to do a refresh (ie. restart the luup engine) in order for the partition status to be correctly reported.  this only occurs when i log on and check the status. works fine after a refresh.

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #22 on: September 11, 2012, 05:04:24 am »
Hi alexk, no, that is not the expected behaviour. It's also not the behaviour that I see.

See if clearing the browser cache and reloading the web page has any effect.

Offline alexk

  • Jr. Member
  • **
  • Posts: 90
  • Karma: +1/-0
Re: Re: Plugin for Caddx/GE/Networx NX-584/NX-8E security system
« Reply #23 on: September 14, 2012, 08:56:26 am »
Hey Futzle

at some point you told me to enable logging and then use the following SSH command.
tail -f /var/log/cmh/LuaUPnP.log

to capture logs.

what do i need to disable what we started? just the logging check box in the alarm device or does the tail command also start something?


thanks

Alex