We have moved at community.getvera.com

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

Offline eddie

  • Beta Testers
  • Jr. Member
  • *****
  • Posts: 51
  • Karma: +0/-0
Setup, NX-8E
« on: September 22, 2011, 08:45:02 am »
I have been trying to use the new USER tab.   I have enter my Master Code and clicked Get Info but the task seem to never complete.  The status shows Getting results and does not update.


Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup, NX-8E
« Reply #1 on: September 22, 2011, 04:59:57 pm »
Poo.  I was afraid that this would happen.  Never fear, I have a couple of ways that you can help me to debug this without telling me any of your PINs.

First, it's getting to "Getting result", which is quite late in the process, so it's probable that your alarm interface is doing everything right.  Good.  That puts the suspicion on the JavaScript code.

To test this, do the following:
1. Do exactly what you've done so far: in a browser, go to the Users tab, and attempt to get users' information.  When it gets to "Getting result", move on to the next step.
2. Open another browser tab, and visit: http://your-vera:3480/data_request?id=lr_UserScan&user=1&output_format=json
3. If successful, you'll see a snippet of JSON like this:
Code: [Select]
{"pin": "1234","partitions": "1,2,3,4,5,6,7,8","authorization": {"arm": "all","disarm": "true","bypass": "true","report": "true"}}

Try this for each of your users 1, 2, and 3.

Offline eddie

  • Beta Testers
  • Jr. Member
  • *****
  • Posts: 51
  • Karma: +0/-0
Re: Setup, NX-8E
« Reply #2 on: September 23, 2011, 08:34:53 pm »
So I tried the test and each of the url worked.   I get something like this for each user.


{"pin": "1234","partitions": "1,2,3,4,5,6,7,8","authorization": {"arm": "all","disarm": "true","master": "true","bypass": "true","report": "true"}}

Or this

{"pin": "2345","partitions": "1,2,3,4,5,6,7,8","authorization": {"arm": "all","disarm": "true","bypass": "true","report": "true"}}


Poo.  I was afraid that this would happen.  Never fear, I have a couple of ways that you can help me to debug this without telling me any of your PINs.

First, it's getting to "Getting result", which is quite late in the process, so it's probable that your alarm interface is doing everything right.  Good.  That puts the suspicion on the JavaScript code.

To test this, do the following:
1. Do exactly what you've done so far: in a browser, go to the Users tab, and attempt to get users' information.  When it gets to "Getting result", move on to the next step.
2. Open another browser tab, and visit: http://your-vera:3480/data_request?id=lr_UserScan&user=1&output_format=json
3. If successful, you'll see a snippet of JSON like this:
Code: [Select]
{"pin": "1234","partitions": "1,2,3,4,5,6,7,8","authorization": {"arm": "all","disarm": "true","bypass": "true","report": "true"}}

Try this for each of your users 1, 2, and 3.


Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup, NX-8E
« Reply #3 on: September 24, 2011, 02:41:02 am »
Thanks Eddie.  Definitely a JavaScript problem then.  Can you tell me what browser you're using?  Do you get different results using a different browser?

Offline eddie

  • Beta Testers
  • Jr. Member
  • *****
  • Posts: 51
  • Karma: +0/-0
Re: Setup, NX-8E
« Reply #4 on: September 24, 2011, 07:33:30 am »
Chrome and Safari on the Mac,  Firefox on the PC all show the same results. 
Thanks for looking at this.

Thanks Eddie.  Definitely a JavaScript problem then.  Can you tell me what browser you're using?  Do you get different results using a different browser?



Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup, NX-8E
« Reply #5 on: September 25, 2011, 04:17:00 am »
Eddie,

Two more things you can do for me to help debug this:

1. Do you also get a result for user 98?

Code: [Select]
{"pin": "----","partitions": "1,2,3,4,5,6,7,8","authorization": {"arm": "all","disarm": "true","bypass": "true","report": "true"}}

2. I've attached an instrumented version of J_CaddxNX584Security.js which makes lots of log messages in the JavaScript console.  Please install this version of J_CaddxNX584Security.js along with version @47 of the other files.  Then try to use the Users tab again.  A complete output of the instrumentation looks like:

Code: [Select]
About to call getScanUserResult
u = 1
pinCell.length = 1
authorizationCell.length = 1
setUserCodeEnabled = true
setUserAuthorizationEnabled = true
pinLength = 4
device = 93
Inside getScanUserResult
u = 1
pinCell.length = 1
authorizationCell.length = 1
setUserCodeEnabled = true
setUserAuthorizationEnabled = true
pinLength = 4
device = 93
getScanUserResult returning, user = 1
Returned from getScanUserResult, user = 1
Success
userInfo is valid JSON.
Setting pinCell[0].
Forming Authorization string.
setting authorizationCell[0].

I'm particularly interested if this output is truncated.  You can see the JavaScript in Firefox using Firebug, or you can see it in Safari using Develop > Show Error Console.

Offline eddie

  • Beta Testers
  • Jr. Member
  • *****
  • Posts: 51
  • Karma: +0/-0
Re: Setup, NX-8E
« Reply #6 on: September 25, 2011, 09:48:35 am »
So this could be part of the issue:

The User 98 gives me "Handler failed" most of the time.   After a reboot of the vera, I got the results you indicated:
{"pin": "----","partitions": "1,2,3,4,5,6,7,8","authorization": {"arm": "all","disarm": "true","bypass": "true","report": "true"}}, but the output in the TAB was the same.

This is what I see from the firebug output :

Code: [Select]
Success
cpanel...1.1338* (line 12518)
GET https://fwd2.mios.com/remote/port_3480/data_request?id=jobstatus&job=15&output_format=json

200 OK
219ms
GET https://fwd2.mios.com/lu_status.php?&DataVersion...t=60&LoadTime=1316957595&rand=0.8370807710161023

200 OK
1.29s
Clock sync to 2011-09-25 07:38:20 D init time: Sun Sep 25 2011 08:38:20 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
design...1.1338* (line 650)
About to call getScanUserResult
cpanel...1.1338* (line 12518)
u = 98
cpanel...1.1338* (line 12518)
pinCell.length = 0
cpanel...1.1338* (line 12518)
authorizationCell.length = 0
cpanel...1.1338* (line 12518)
setUserCodeEnabled = true
cpanel...1.1338* (line 12518)
setUserAuthorizationEnabled = true
cpanel...1.1338* (line 12518)
pinLength = 4
cpanel...1.1338* (line 12518)
device = 18
cpanel...1.1338* (line 12518)
Inside getScanUserResult
cpanel...1.1338* (line 12518)
u = 98
cpanel...1.1338* (line 12518)
pinCell.length = 0
cpanel...1.1338* (line 12518)
authorizationCell.length = 0
cpanel...1.1338* (line 12518)
setUserCodeEnabled = true
cpanel...1.1338* (line 12518)
setUserAuthorizationEnabled = true
cpanel...1.1338* (line 12518)
pinLength = 4
cpanel...1.1338* (line 12518)
device = 18
cpanel...1.1338* (line 12518)
GET https://fwd2.mios.com/remote/port_3480/data_request?id=lr_UserScan&user=98&output_format=json

200 OK
458ms
getScanUserResult returning, user = 98
cpanel...1.1338* (line 12518)
Returned from getScanUserResult, user = 98
cpanel...1.1338* (line 12518)
Success
cpanel...1.1338* (line 12518)
Clock sync to 2011-09-25 07:38:21 D init time: Sun Sep 25 2011 08:38:22 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
design...1.1338* (line 650)
GET https://fwd2.mios.com/lu_status.php?&DataVersion...t=60&LoadTime=1316957595&rand=0.8812793047918684

200 OK
1m 0s
Clock sync to 2011-09-25 07:39:22 D init time: Sun Sep 25 2011 08:38:23 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
design...1.1338* (line 650)
GET https://fwd2.mios.com/lu_status.php?&DataVersion...t=60&LoadTime=1316957595&rand=0.7008873986799068

200 OK
1m 0s
Clock sync to 2011-09-25 07:40:22 D init time: Sun Sep 25 2011 08:39:23 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
design...1.1338* (line 650)
GET https://fwd2.mios.com/lu_status.php?&DataVersion...t=60&LoadTime=1316957595&rand=0.6795827570457437

200 OK
54.34s
ICON: skins/default/icons/Door_Lock
cpanel...1.1338* (line 12518)
Clock sync to 2011-09-25 07:41:17 D init time: Sun Sep 25 2011 08:40:24 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
design...1.1338* (line 650)
GET https://fwd2.mios.com/lu_status.php?&DataVersion...t=60&LoadTime=1316957595&rand=0.8890178262178782

200 OK
1.46s
ICON: skins/default/icons/Door_Lock
cpanel...1.1338* (line 12518)
Clock sync to 2011-09-25 07:41:18 D init time: Sun Sep 25 2011 08:41:18 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
design...1.1338* (line 650)
GET https://fwd2.mios.com/lu_status.php?&DataVersion...t=60&LoadTime=1316957595&rand=0.6207305622279103

200 OK
1m 0s
Clock sync to 2011-09-25 07:42:19 D init time: Sun Sep 25 2011 08:41:20 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
design...1.1338* (line 650)
GET https://fwd2.mios.com/lu_status.php?&DataVersion...t=60&LoadTime=1316957595&rand=0.9231445122389477

200 OK
1m 0s
Clock sync to 2011-09-25 07:43:19 D init time: Sun Sep 25 2011 08:42:20 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
design...1.1338* (line 650)
GET https://fwd2.mios.com/lu_status.php?&DataVersion...t=60&LoadTime=1316957595&rand=0.8809885129915698

200 OK
1m 0s
Clock sync to 2011-09-25 07:44:20 D init time: Sun Sep 25 2011 08:43:21 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
design...1.1338* (line 650)
GET https://fwd2.mios.com/lu_status.php?&DataVersion...60&LoadTime=1316957595&rand=0.008520228759652748

200 OK
59.56s
ICON: skins/default/icons/Door_Lock
cpanel...1.1338* (line 12518)
Clock sync to 2011-09-25 07:45:19 D init time: Sun Sep 25 2011 08:44:21 GMT-0500 (CDT)
cpanel...1.1338* (line 12518)
logo class:
cpanel...1.1338* (line 12518)
Error: TypeError: $("scenes_" + obj.id + "_status") is null
 


Eddie,

Two more things you can do for me to help debug this:

1. Do you also get a result for user 98?

Code: [Select]
{"pin": "----","partitions": "1,2,3,4,5,6,7,8","authorization": {"arm": "all","disarm": "true","bypass": "true","report": "true"}}

2. I've attached an instrumented version of J_CaddxNX584Security.js which makes lots of log messages in the JavaScript console.  Please install this version of J_CaddxNX584Security.js along with version @47 of the other files.  Then try to use the Users tab again.  A complete output of the instrumentation looks like:

Code: [Select]
About to call getScanUserResult
u = 1
pinCell.length = 1
authorizationCell.length = 1
setUserCodeEnabled = true
setUserAuthorizationEnabled = true
pinLength = 4
device = 93
Inside getScanUserResult
u = 1
pinCell.length = 1
authorizationCell.length = 1
setUserCodeEnabled = true
setUserAuthorizationEnabled = true
pinLength = 4
device = 93
getScanUserResult returning, user = 1
Returned from getScanUserResult, user = 1
Success
userInfo is valid JSON.
Setting pinCell[0].
Forming Authorization string.
setting authorizationCell[0].

I'm particularly interested if this output is truncated.  You can see the JavaScript in Firefox using Firebug, or you can see it in Safari using Develop > Show Error Console.


Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup, NX-8E
« Reply #7 on: September 25, 2011, 05:35:45 pm »
Hey Eddie, are you doing this over the remote forwarder?  Or are you on the LAN?

Offline eddie

  • Beta Testers
  • Jr. Member
  • *****
  • Posts: 51
  • Karma: +0/-0
Re: Setup, NX-8E
« Reply #8 on: September 25, 2011, 05:49:15 pm »
Futzie:

This is being done remotely. This is my vacation house.



Hey Eddie, are you doing this over the remote forwarder?  Or are you on the LAN?


Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup
« Reply #9 on: September 25, 2011, 08:38:08 pm »
Right, that'd be why I can't reproduce it locally.

I'm at work but I've got two more ideas for you to try, which I'll tell you about when I get home.

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup, NX-8E
« Reply #10 on: September 26, 2011, 01:34:39 am »
Eddie,

New version of the JavaScript file attached.  Two new things that might help:

1. I no longer scan user 98, since it's a waste of time.
2. All of the lr_* requests have a random number attached to the request, to defeat any inadvertent caching.

Let me know if this behaves any differently.

Also please let me know if the Configuration and Zones tabs have similar issues.  On the Configuration tab, how many rows are in the table (1 or more)?  On the Zones tab, try to do a scan for a zone you don't have, and tell me what's in the "Info" column.
« Last Edit: September 26, 2011, 04:10:30 am by futzle »

Offline eddie

  • Beta Testers
  • Jr. Member
  • *****
  • Posts: 51
  • Karma: +0/-0
Re: Setup, NX-8E
« Reply #11 on: October 08, 2011, 02:39:43 pm »
Futzle:  Sorry I did not get back to you soon. I tried out the version 55 and still have the same issue with the JavaScript using remote access.   Both the Configuration Tab and Users tab seem to have a problem.
In the Configuration Tab,  I get the  updating bar and it does not go away.  If I click into another tab and come back to Configuration then it show me the results.
The Users tab,  is stuck on Getting Results.

Thanks for your time



I've just committed version 55, which lets you use a Master PIN to set the PINs of other users.

(I still don't know if these JavaScript tabs work fully over mios.com remote access.  Testers are welcome.  Paranoid testers too.)