UI6 readiness

Edit: From version 75 onwards, this plugin should work on UI5 and UI6.

I’ve bitten the bullet and updated my production Vera to 1.6.641. (Once you get past the scary default UI and into the Advanced UI it’s not that bad…)

With the update I noticed that my conversion of the JavaScript tabs to jQuery was incomplete. I’ve now fixed up the remaining tabs so that they work. I’ve done minimal testing, so there may still be weirdnesses.

Version 75 is now sitting with MCV for approval. It should still work on UI5; if not, please tell me.

I upgraded my Vera Lite Firmware to UI6 without issue and everything seem to work fine. I accidently deleted my Caddx NX584 Security System app, so I also deleted my GC100 app. I tried to re-install everything, But the Connect tab of the Caddx NX584 will not open, so I can enter the serial information. I have had everything working for the past 2 years, so I would appreciate any help I can get.

You can bypass the Connect tab if necessary.

If you have a direct serial connection, or if your GC100 has created a virtual IPSerial port, assign the port to the plugin at Apps > Develop Apps > Serial Port Configuration.

If you are using some other serial-to-IP gateway then you can type the IP address and port number (format: 12.34.56.78:9012) in the IP Address field towards the top of the Advanced tab of the security system plugin device.

Then save, refresh your browser, etc etc

Once you’ve got it working again then I would like you to help me debug the broken Connect tab, because it should be working (and is for me).

GC100 creates a virtual IPSerial port, and it has assigned a port to the plugin at Apps > Develop Apps > Serial Port Configuration

I have included 2 screen shots. All the other tabs on the Caddx NX584 work fine, it’s just the Connect tab.

Great. All you have to do is click on the drop down “Used by device” and change “Please select” to the Caddx plugin device. Then save. By doing this you are doing exactly the same as what you would do on the plugin’s Connect tab.

Clearly there is a bug in the code for the Connect tab that barfs when there is an IP serial port. (I don’t have any any more so I wasn’t able to fully test the UI6 migration.) I will need to change around a few things on my Vera to reproduce the bug, which will take time. So to get yourself going right away, do the workaround in my previous paragraph. If you’re adept at JavaScript debugging and can pop up the error console on your browser to get the error message and line number then I can probably fix it faster.

okay, the red indicator on the Caddx NX584 has turned to normal, but Partition1 was not created. I tried my hand at debugging, but I don’t get anything when selecting the Connect tab. The information below is from pressing the other tab. I am trying to help as much as I can with very limited knowledge

2014-5-21 22:22:55 : remove keep cpanel_data.js?1.6.641-1-16070424:13681
2014-5-21 22:23:1 : String.prototype.evalJSON error: SyntaxError: Unexpected identifier cpanel_data.js?1.6.641-1-16070424:13681
2014-5-21 22:23:9 : String.prototype.evalJSON error: SyntaxError: Unexpected identifier cpanel_data.js?1.6.641-1-16070424:13681
2014-5-21 22:23:12 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:LogEventScanResponse’ of undefined

This is what I get when I scan for zones:

2014-5-21 22:31:53 : start parsing lu_status cpanel_data.js?1.6.641-1-16070424:13681
2014-5-21 22:31:53 : Starting parseLu. cpanel_data.js?1.6.641-1-16070424:13681
2014-5-21 22:31:53 : 22:31:53:553 end parsing lu_status cpanel_data.js?1.6.641-1-16070424:13681
2014-5-21 22:31:56 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:31:57 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:31:57 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:31:58 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:31:58 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:31:59 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:31:59 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:32:0 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:32:0 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:32:1 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:32:1 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456
2014-5-21 22:32:2 : String.prototype.evalJSON error: SyntaxError: Unexpected token : cpanel_data.js?1.6.641-1-16070424:13681
Uncaught TypeError: Cannot read property ‘u:ZoneScanResponse’ of undefined J_CaddxNX584Security.js:456

Thanks for the error console output. That’s about what I would expect to see if the plugin hasn’t even created the partition child device: the plugin has likely exited without completing its initialization. Don’t bother with the other tabs until the plugin has created the partition.

If you’ve got the connection configured properly then the child partition device(s) should pop up almost automatically. The fact that that’s not happening tells me that there is a further problem between the plugin and the NX-584. A Luup log might provide a hint. Don’t rule out the possibility that the issue is actually with Vera talking to the GC100.

Some screen captures of your Caddx device’s Advanced tab would also help me a lot.

Here, try this version of the J_CaddxNX584SerialConnection.js file (unzip first). For me, this makes the Connect tab show serial ports correctly. I moved my USB-to-Serial adapter directly to the back of the Vera and successfully communicated with my NX-584.

As always, clear your browser cache, reload Luup. Tested on Firefox.

I now have access to the Connect tab, but the partition still is not available. I guess I will have to connect to my GC100 with my laptop to see if there is an output. I’m almost 99% sure my GC100 is working properly, so I’m not sure why my setup no longer works. I do thank you for all your help.

Thanks for testing that. I will wrap it into the next release of the plugin.

but the partition still is not available

Catching a Luup log could probably pinpoint the problem from here. My theory is that there is something related to creating a set of devices completely from scratch, which of course I’m loath to test on my production system.

Hope this is what you need:

That’s great. Now you just need to press the Reload button in the web UI immediately after you type the “tail” command. All the interesting stuff is logged right after a Luup restart. For bonus points, turn on the debugging checkbox in the Caddx plugin’s Configure tab before you do it. You need only capture about 30 seconds.

I followed you instructions:

Thanks. I will take a look at it soon. I’m not seeing the plugin’s normal startup messages, which is odd. It looks a bit like the plugin is hanging while establishing the connection to the GC100. It’s a little hard to tell looking at the log on my phone’s tiny screen. When I’ve had a chance to see it on a real computer I will have a better idea.

Are you seeing any persistent messages in the web UI in the top centre? The log suggests that you are.

I see a message stating, “Caddx NX584 Security System[25]:Failed to open IO Port”

Right. Then the plugin hasn’t even started yet because it can’t talk to your GC100. The log you posted shows that the plugin is trying to connect to the right location, repeatedly. Your next steps are to verify that the UI6 update hasn’t broken your GC100 link. See if there is anyone else on the forum with a GC100 and UI6; I recall another topic in the last couple of months.

I was able to get it all working by reverting to a backup I made right after I upgraded. I re-added the Connect tab fix and now everything is working correctly. I thank you again for all the time you dedicated to my issue. Thanks!!!