We have moved at community.getvera.com

Author Topic: Setup  (Read 2077 times)

Offline FreddyJones

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Setup
« on: August 23, 2010, 09:46:13 pm »
I am having issues getting this to install and run.

I am running version 1.1.1047 (ui4), NX8e, and an IP Serial port (wiz110sr)

From what I can tell I am getting some communication between the panel and vera, but it never fully initializes, the "running lua startup" never goes away and I never get the zones created.

Here is the relevant information from the log file:

50   08/23/10 20:34:55.086   luup_log:13: Initializing Caddx NX-584 <0x402>
50   08/23/10 20:34:55.089   luup_log:13: Sending message and waiting for response: 0x21 Interface Configuration Request <0x402>
50   08/23/10 20:34:55.092   luup_log:13: Message: Outgoing: 0x7e 0x01 0x21 0x22 0x23 <0x402>
50   08/23/10 20:34:55.264   luup_log:13: Received good message 0x01 <0x402>
50   08/23/10 20:34:55.265   luup_log:13: Message: Incoming message body: 0x30 0x2e 0x30 0x30 0x72 0x0f 0xfa 0x1f 0xff 0xfc <0x402>
50   08/23/10 20:34:55.266   luup_log:13: Handling message: 0x01 Interface Configuration <0x402>
50   08/23/10 20:34:55.267   luup_log:13: Firmware version 0.00 <0x402>
50   08/23/10 20:34:55.268   luup_log:13: Zone Name enabled <0x402>
50   08/23/10 20:34:55.269   luup_log:13: Set Clock enabled <0x402>
50   08/23/10 20:34:55.269   luup_log:13: Primary Keypad Function with PIN enabled <0x402>
50   08/23/10 20:34:55.270   luup_log:13: Secondary Keypad Function enabled <0x402>
50   08/23/10 20:34:55.271   luup_log:13: Zone bypass enabled <0x402>
50   08/23/10 20:34:55.275   luup_log:13: Message: Outgoing: 0x7e 0x07 0xbb 0x0a 0x08 0x17 0x14 0x22 0x02 0x24 0x9d <0x402>
50   08/23/10 20:34:55.365   luup_log:13: Received good message 0x1d <0x402>
50   08/23/10 20:34:55.366   luup_log:13: Message: Incoming message body: <0x402>
50   08/23/10 20:34:55.367   luup_log:13: Sending message and waiting for response: 0x28 System Status Request <0x402>
50   08/23/10 20:34:55.369   luup_log:13: Message: Outgoing: 0x7e 0x01 0x28 0x29 0x2a <0x402>
50   08/23/10 20:34:55.534   luup_log:13: Received good message 0x08, acknowledge requested <0x402>
50   08/23/10 20:34:55.535   luup_log:13: Message: Incoming message body: 0x04 0x00 0x00 0x00 0x00 0x02 0x00 0x00 0x00 0x01 0x5e <0x402>
50   08/23/10 20:34:55.536   luup_log:13: Handling message: 0x08 System Status <0x402>
50   08/23/10 20:34:55.537   luup_log:13: Valid partition 1 <0x402>
50   08/23/10 20:34:55.538   luup_log:13: PIN length is 4 <0x402>
50   08/23/10 20:34:55.539   luup_log:13: Sending message: 0x1D Positive Acknowledge <0x402>
50   08/23/10 20:34:55.540   luup_log:13: Message: Outgoing: 0x7e 0x01 0x1d 0x1e 0x1f <0x402>
50   08/23/10 20:34:55.544   luup_log:13: Getting zone name for 1 <0x402>
50   08/23/10 20:34:55.545   luup_log:13: Sending message and waiting for response: 0x23 Zone Name Request <0x402>
50   08/23/10 20:34:55.547   luup_log:13: Message: Outgoing: 0x7e 0x02 0x23 0x00 0x25 0x4c <0x402>
50   08/23/10 20:34:55.724   luup_log:13: Received inconvenient message 0x0a <0x402>
50   08/23/10 20:34:55.725   luup_log:13: Message: Unsolicited message body: 0x5e 0xb9 0xf7 0x00 0x00 0x08 0x17 0x14 0x23 <0x402>
50   08/23/10 20:34:55.726   luup_log:13: Sending message: 0x1D Positive Acknowledge <0x402>
50   08/23/10 20:34:55.727   luup_log:13: Message: Outgoing: 0x7e 0x01 0x1d 0x1e 0x1f <0x402>
50   08/23/10 20:34:55.731   luup_log:13: Message: Outgoing: 0x7e 0x02 0x23 0x00 0x25 0x4c <0x402>
50   08/23/10 20:35:05.742   luup_log:13: Input is nil <0x402>


The last line repeats indefinitely about every 10 seconds.

Any suggestions ??

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup
« Reply #1 on: August 23, 2010, 11:02:41 pm »
50   08/23/10 20:34:55.545   luup_log:13: Sending message and waiting for response: 0x23 Zone Name Request <0x402>
50   08/23/10 20:34:55.547   luup_log:13: Message: Outgoing: 0x7e 0x02 0x23 0x00 0x25 0x4c <0x402>
50   08/23/10 20:34:55.724   luup_log:13: Received inconvenient message 0x0a <0x402>
50   08/23/10 20:34:55.725   luup_log:13: Message: Unsolicited message body: 0x5e 0xb9 0xf7 0x00 0x00 0x08 0x17 0x14 0x23 <0x402>
50   08/23/10 20:34:55.726   luup_log:13: Sending message: 0x1D Positive Acknowledge <0x402>
50   08/23/10 20:34:55.727   luup_log:13: Message: Outgoing: 0x7e 0x01 0x1d 0x1e 0x1f <0x402>
50   08/23/10 20:34:55.731   luup_log:13: Message: Outgoing: 0x7e 0x02 0x23 0x00 0x25 0x4c <0x402>
50   08/23/10 20:35:05.742   luup_log:13: Input is nil <0x402>
The last line repeats indefinitely about every 10 seconds.

Thanks FreddyJones for testing this.  You're now into territory that I was unable to debug: AFAIK the NX-4 doesn't seem to handle Zone Name requests, and the NX-8E does.

There could be two things going on.  I don't know which one it is that's causing the deadlock.

One possibility is that I've misunderstood the protocol for Zone Name Request (0x23).  It should come back with a Zone Name Message (0x03) response or a Message Reject (0x1F) response, but you're either getting a 0x0a response (Log Event Message) or no response at all.  Tell me: does the line "Received inconvenient message 0x0a" (and the following two debug lines) appear every time you restart the plugin, or only sometimes?  Is the third byte in the body (0xf7) always the same?  That might help us to figure out if I need to treat the 0x0a response as the panel reporting failure or as mere noise to ignore.

The other possibility is that the zone name request is going to a keypad that doesn't exist.  My understanding of the zone name info is that it's not actually stored on the NX-8E/NX-584 at all, that the name is actually stored on the keypad, and so the panel has to send a sub-request to the keypad to get the zone name.  Is your keypad a NX-1448E?  Is it set to partition 1, keypad 1?  The NX-8E's location 212 has to be set accordingly.  Whatever information you've got, let me know.  Like I said, I don't have the hardware so you'll have to do the testing.

Either way, I need to better handle timeouts, to make the plugin handle timeouts more gracefully.  While I wait for your report on the above testing I will try to fix up the code so that timeouts in noncritical systems (like zone names) don't break the whole plugin.

While I'd like to get zone name detection working, if you're desperate to get past the hang before we come up with a fix, you can temporarily switch off that feature on your panel (Location 211, segment 1, data 4 "Zone Name Request") to cause the luup plugin to skip that step.  It will assign default zone names and carry on.  

I'm basing this information on the NX-8E installation manual I found here (http://www.smarthomeusa.com/Products/NX-8E/manuals/NX-8E-Installation.pdf).  Your version of the NX-8E might not be the same; I hear there are at least two versions.
« Last Edit: August 23, 2010, 11:09:08 pm by futzle »

Offline FreddyJones

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Setup
« Reply #2 on: August 24, 2010, 04:11:38 pm »

One possibility is that I've misunderstood the protocol for Zone Name Request (0x23).  It should come back with a Zone Name Message (0x03) response or a Message Reject (0x1F) response, but you're either getting a 0x0a response (Log Event Message) or no response at all.  Tell me: does the line "Received inconvenient message 0x0a" (and the following two debug lines) appear every time you restart the plugin, or only sometimes?  Is the third byte in the body (0xf7) always the same?  That might help us to figure out if I need to treat the 0x0a response as the panel reporting failure or as mere noise to ignore.


I restarted 3 times and all three times the "Received inconvenient message 0x0a" appeared.
The third byte is 0xf7 on all of them. On one of the restarts I got a "Received inconvenient message 0x08" but that was only on one.


The other possibility is that the zone name request is going to a keypad that doesn't exist.  My understanding of the zone name info is that it's not actually stored on the NX-8E/NX-584 at all, that the name is actually stored on the keypad, and so the panel has to send a sub-request to the keypad to get the zone name.  Is your keypad a NX-1448E?  Is it set to partition 1, keypad 1?  The NX-8E's location 212 has to be set accordingly.  Whatever information you've got, let me know.  Like I said, I don't have the hardware so you'll have to do the testing.


My understanding is that the names are in the keypads as well. I do currently have one NX-148E hooked up. My system is still in the implementation stage, so I have a couple more in the box waiting on me.  My location 212 is set to 192  which should be keypad 1 partition 1.   


While I'd like to get zone name detection working, if you're desperate to get past the hang before we come up with a fix, you can temporarily switch off that feature on your panel (Location 211, segment 1, data 4 "Zone Name Request") to cause the luup plugin to skip that step.  It will assign default zone names and carry on. 


I'm game as long as you are. Let me know what else I can get for you. I have the logs from my 3 restarts if you want them, I just thought I'd see if you wanted them before making such a lengthy post.


Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup
« Reply #3 on: August 24, 2010, 05:59:43 pm »
I restarted 3 times and all three times the "Received inconvenient message 0x0a" appeared.
The third byte is 0xf7 on all of them.
Clearly the panel is trying to tell us something.  I will treat that message as "cannot get zone name" and move on.

Quote
My location 212 is set to 192  which should be keypad 1 partition 1.   
Ok, that's the default so that's expected.  Does the keypad itself know that it is keypad-1-partition-1?  There's a command for that (*94, IIRC) that you type directly on the keypad.  It's explained in the installation manual.

Quote
I'm game as long as you are. Let me know what else I can get for you. I have the logs from my 3 restarts if you want them, I just thought I'd see if you wanted them before making such a lengthy post.
That's good for now; don't post the logs yet.  The ball's in my court now: I've raised a ticket to fix the timeout issue so I'll fix it when I have time.  Meanwhile, if you want to experiment further, turn off that bit in location 211 that I mentioned and try again.

Thanks again.

Offline FreddyJones

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Setup
« Reply #4 on: August 24, 2010, 08:08:17 pm »

Quote
Ok, that's the default so that's expected.  Does the keypad itself know that it is keypad-1-partition-1?  There's a command for that (*94, IIRC) that you type directly on the keypad.  It's explained in the installation manual.

Yes *94 show the keypad as keypad 1 partition 1

Quote
That's good for now; don't post the logs yet.  The ball's in my court now: I've raised a ticket to fix the timeout issue so I'll fix it when I have time.  Meanwhile, if you want to experiment further, turn off that bit in location 211 that I mentioned and try again.

I flipped the bit in 211 that you mentioned, I now get the zones created, but it only finishes initializing once in a while. I think in the 5 restarts I have done it has fully initialized twice. Let me know when you get a chance to work on it again and I'll get the logs from when it fails.

Quote
Thanks again.

Thanks go to you for working on this.


Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup
« Reply #5 on: August 31, 2010, 06:45:13 am »
@FreddyJones,

I've added some more robust timeout code to I_CaddxNX584Security.xml.  Please download it from http://code.mios.com/trac/mios_caddxnx584/browser/trunk (rev 14 or later) and see how you go.

It will still time out and fail to get the zone names; this change is just to prevent a hang when there's a timeout.

Offline FreddyJones

  • Newbie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Setup
« Reply #6 on: August 31, 2010, 04:19:38 pm »
@FreddyJones,

I've added some more robust timeout code to I_CaddxNX584Security.xml.  Please download it from http://code.mios.com/trac/mios_caddxnx584/browser/trunk (rev 14 or later) and see how you go.

It will still time out and fail to get the zone names; this change is just to prevent a hang when there's a timeout.

Yep, it now completes it's initialization. No more hang.

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup
« Reply #7 on: August 31, 2010, 05:10:07 pm »
Yep, it now completes it's initialization. No more hang.
Good to hear.  Now let's move onto the other problems you mentioned.  Can you post or pm me another log showing the initialization failure you mentioned last week, assuming it's still happening?