UI7 and GE Caddx Plugin

@Futzle
What was I thinking, Lol. Yes I just took the plunge and upgraded from the UI6 to the released UI7 and It broke the Connect tab, configure, zones, users tab
Error executing function J_CaddxNX584SerialConnection.js.serialConnection(): undefined is not a function
Error executing function J_CaddxNX584Security.js.zoneTab(): undefined is not a function
Error executing function J_CaddxNX584Security.js.eventLogTab(): $F is not defined

It is still semi working from the UI7. I can arm the system from the ui7 but it will only engage the Stay mode?? it popped up a red bar at the bottom of the device stating device could not be found, but went away. I initiated a zone tamper and it correctly reported the zone Last Log:Bypass (Zone 12 Partition 1) I can also disarm it as well from the UI but have lost the ability to control from any of my IOS apps.

I tried reading other post and couldn’t find anything directly related to UI7 but I noted one where you upgraded to the UI6 and mentioned you were on version 75. I am currently on version 69 and set to Auto Update. Should I uninstall and reinstall the App, or is there a better way to resolve these issues.

Thanks for any input you Miss Futzle or anyone else that may be able to offer help. <:)

ElMagnifico, thanks very much for posting your experiences with your … brave upgrade to UI7. I haven’t dared to try it on my Vera Lite yet. I probably will soon, because there’s clearly no future in UI6.

Auto update of plugins is notoriously hit-and-miss. Even with the checkbox on, it doesn’t work all the time for everyone. That said, you should turn off auto-update for this plugin just in case I post an update that breaks your security setup.

There was a bug with the Connect tab recently which I fixed. Perhaps that’s the same one you found. Updating the plugin will fix it. It isn’t necessary to uninstall then reinstall; here is how you can force an update of a plugin on UI5: http://forum.micasaverde.com/index.php/topic,8643.msg80309.html#msg80309 (I don’t know if this works in UI7).

Doesn’t work in UI7, Receive Error: installation failed, however I can download each file, can I upload and overwrite the current luup files or should I uninstall and reinstall?
Thanks for the help

Yes, that should work.

Risk taker here too. I upgraded to UI7 and am now getting the following error when I try to configure the plugin:
Error executing function J_CaddxNX584SerialConnection.js.serialConnection(): ‘undefined’ is not a function (evaluating ‘jsonp.get_device_by_id(deviceId)’)

I’m running plugin version 0.78. Any suggestions?

Thanks!

It appears that I’ve been caught using a private API and this function has been removed. The JavaScript will have to be refactored to do this work itself rather than rely on MCV’s supplied jsonp object.

I’m unlikely to be upgrading my Vera to UI7 for weeks (if ever). Any user who is adept at debugging JavaScript is welcome to supply a patch, but until then you have two options: (1) modify the variables directly on the top-level device the same as how the JavaScript does, or (2) downgrade back to UI5 or UI6.

Thanks for reporting the exact error; that helps a lot.

Heh. I’ve had that happen too. :slight_smile:

It seems this isn’t the only problem with UI7 in this regard. It looks like the native controls for dealing with serial ports aren’t working in UI7. I’ve fed this back to the Vera team.

Once that gets resolved, I’ll take a look at refactoring to get this working. Where/how do you want me to feed that back to you? Diff? Patch on GitHub?

The main repository is on SVN at http://code.mios.com/svn_public/mios_caddxnx584

Recursive unified diffs would be my preferred option but I’ll take patches any way you care to supply them. I’ll send you a direct message with my email address.

I’ve bitten the (not very palatable IMO) bullet and upgraded to UI7 on my production Vera. (Yeah, yeah, I know.)

I’ve found and fixed the JavaScript errors at SVN revision 79. I invite anyone on UI7 to install the two updated JavaScript files and see how far they get. I use an IPSerial connection so I’m not affected by the Serial Port Configuration bug mentioned by eo.

More changes at SVN @80 that I’m considering making standard in UI7. This revision changes the way that the plugin handles bypassed zones (shown in Vera as security sensors). I can see the writing on the wall with how Vera handles sensor armed/bypass status, particularly with the Home/Away/Night/Vacation modes that UI7 makes quite prominent. Having Vera change the bypass status of zones in the security system in such a wholesale way is not desirable.

If you have enabled the “Toggle Zone Bypass” bit in your NX-584 (Location 3 Segment 4 Bit 8) or NX-8E (Location 211 Segment 4 Bit 8) configuration, then you get the historical behaviour with this plugin: if you change the bypass status of a zone in the UI then it is reflected in the bypass status of the zone in the alarm panel, and vice versa. Alarm panel zone bypass == Vera security sensor bypass.

If you disable the “Toggle Zone Bypass” bit, then you get the behaviour that every other alarm plugin for Vera already has: the Vera Armed/Bypass toggle is independent of the alarm panel’s bypass state. In this mode, the plugin has no visibility of the alarm panel’s concept of “bypassed”. If you choose to bypass zones via the alarm panel keypad then it will have no effect on Vera (though it will affect whether a partition reacts to the zone being tripped, just as if you’d never connected the Vera at all). If you change a Vera security sensor’s Armed/bypass state then it changes immediately and has no effect on the alarm panel. Alarm panel zone bypass and Vera security sensor bypass are two different things.

Thanks for taking the lead on this! I’ve been super busy and hadn’t had the chance to look at this in too much detail. I’ve upgraded to @80 and am getting mixed results.

When I try to go into the parent device and click (e.g. Caddx NX584 Security) and click connect, I get the following error:
Error executing function J_CaddxNX584SerialConnection.js.serialConnection(): jsonp.get_lu_device_variable_value is not a function

I’ve got a bit of a workaround for setting the serial port up via the Apps menu option. Google Chrome is my friend (I’ve sent the core issue onto MCV so they can get it fixed in the next release candidate), but alas I cannot scan for zones. I think the above error is related to my problem.

Any suggestions?

[quote=“eo, post:11, topic:182482”]When I try to go into the parent device and click (e.g. Caddx NX584 Security) and click connect, I get the following error:
Error executing function J_CaddxNX584SerialConnection.js.serialConnection(): jsonp.get_lu_device_variable_value is not a function[/quote]

Another private API, I suspect. The official JavaScript API is very limited and I found that to implement the Connect tab I had to call functions that the web UI uses, but which are apparently no longer available in UI7.

In truth I think I will have to ditch the Connect tab entirely, and get users to assign a serial device the official way, which is how you did it.

alas I cannot scan for zones. I think the above error is related to my problem.

Very doubtful. If you can see partitions then your interface is fully connected. Zone scanning is error-prone because it relies on users having configured their NX-584 to find their keypads on the Caddx bus. Failure to do so properly has no bad consequences on daily use, so you won’t notice it until you want to scan for zone names, at which point it fails. If you browse back through the history of discussions on this forum you will find a ton of reports about how zone scanning is or isn’t working for users. Sometimes it was a configuration error, sometimes it was timeouts on the Caddx bus (totally out of my control), and sometimes it was subtly different Caddx hardware that just doesn’t seem to adhere to the serial protocol spec.

If you’re getting a JavaScript error, or a message in the Luup log, when you scan for zones, I can look into it and see which of the previous categories best applies in your case.

Interestingly enough, I’m not seeing any error messages in the LuuP log, but I’m also not seeing any attempts to read data there either.

I do see the following:
50 09/12/14 0:50:37.654 luup_log:33: elapsed time: 0 seconds <0x2b7fc680>
50 09/12/14 0:50:37.654 luup_log:33: Going to poll devices <0x2b7fc680>
50 09/12/14 0:50:37.655 luup_log:33: Should be a successful lua startup <0x2b7fc680>
50 09/12/14 0:50:37.822 luup_log:35: Initializing Caddx NX-584 LEAK this:53248 start:139264 to 0xad0000 <0x2b7fc680>
50 09/12/14 0:50:37.822 luup_log:35: Opening serial port <0x2b7fc680>
50 09/12/14 0:50:37.980 luup_log:35: All message codes are supported. <0x2b7fc680>
50 09/12/14 0:50:37.981 luup_log:35: Zone Name enabled <0x2b7fc680>
50 09/12/14 0:50:37.982 luup_log:35: Log Event enabled <0x2b7fc680>
50 09/12/14 0:50:37.982 luup_log:35: Get User Information with PIN enabled <0x2b7fc680>
50 09/12/14 0:50:37.982 luup_log:35: Set User Code with PIN enabled <0x2b7fc680>
50 09/12/14 0:50:37.983 luup_log:35: Set User Authorization with PIN enabled <0x2b7fc680>
50 09/12/14 0:50:37.983 luup_log:35: Set Clock enabled <0x2b7fc680>
50 09/12/14 0:50:37.983 luup_log:35: Primary Keypad Function with PIN enabled <0x2b7fc680>
50 09/12/14 0:50:37.984 luup_log:35: Secondary Keypad Function enabled <0x2b7fc680>
50 09/12/14 0:50:37.984 luup_log:35: Zone bypass enabled <0x2b7fc680>
50 09/12/14 0:50:38.340 luup_log:35: Valid partition 1 <0x2b7fc680>
50 09/12/14 0:50:38.341 luup_log:35: PIN length is 4 <0x2b7fc680>
06 09/12/14 0:50:38.341 Device_Variable::m_szValue_set device: 35 service: urn:micasaverde-com:serviceId:HaDevice1 variable: BatteryLevel was: 100 now: 100 #hooks: 0 upnp: 0 v:0x868918/NONE duplicate:1 <0x2b7fc680>
06 09/12/14 0:50:38.341 Device_Variable::m_szValue_set device: 35 service: urn:futzle-com:serviceId:CaddxNX584Security1 variable: StackPointer was: 113 now: 113 #hooks: 0 upnp: 0 v:(nil)/NONE duplicate:1 <0x2b7fc680>
06 09/12/14 0:50:38.493 Device_Variable::m_szValue_set device: 36 service: urn:micasaverde-com:serviceId:AlarmPartition2 variable: LastUser was: User 1 now: User 1 #hooks: 0 upnp: 0 v:0x8ed1f8/NONE duplicate:0 <0x2b7fc680>
06 09/12/14 0:50:38.494 Device_Variable::m_szValue_set device: 36 service: urn:micasaverde-com:serviceId:AlarmPartition2 variable: ChimeEnabled was: 0 now: 0 #hooks: 0 upnp: 0 v:0x8e6748/NONE duplicate:1 <0x2b7fc680>
06 09/12/14 0:50:38.494 Device_Variable::m_szValue_set device: 36 service: urn:micasaverde-com:serviceId:AlarmPartition2 variable: AlarmMemory was: 0 now: 0 #hooks: 0 upnp: 0 v:0x8ecca0/NONE duplicate:0 <0x2b7fc680>
06 09/12/14 0:50:38.495 Device_Variable::m_szValue_set device: 36 service: urn:micasaverde-com:serviceId:AlarmPartition2 variable: Alarm was: None now: None #hooks: 0 upnp: 0 v:0x840a08/NONE duplicate:1 <0x2b7fc680>
06 09/12/14 0:50:38.495 Device_Variable::m_szValue_set device: 36 service: urn:micasaverde-com:serviceId:AlarmPartition2 variable: DetailedArmMode was: Ready now: Ready #hooks: 0 upnp: 0 v:0x8e6680/NONE duplicate:1 <0x2b7fc680>
06 09/12/14 0:50:38.496 Device_Variable::m_szValue_set device: 36 service: urn:micasaverde-com:serviceId:AlarmPartition2 variable: ArmMode was: Disarmed now: Disarmed #hooks: 0 upnp: 0 v:0x8e6608/NONE duplicate:1 <0x2b7fc680>

I am getting a bunch of 404s in my Chrome console that I believe are related to the scan (one for each device):
https://vera-us-oem-relay31.mios.com/www/port_3480/data_request?id=lu_action&serviceId=urn%3Afutzle-com%3AserviceId%3ACaddxNX584Security1&action=ZoneScan&Zone=1&DeviceNum=35&output_format=json

Not sure what the path “port_3480” does, but:

root@MiOS_30007741:/tmp/log/cmh# ps -eaf |grep 3481
3144 root 1676 S /bin/sh -c ser2net -n -C “3481:raw:0:/dev/ttyUSB0:9600 1STOPBIT NONE”
3147 root 800 S ser2net -n -C 3481 raw 0 /dev/ttyUSB0 9600 1STOPBIT NONE

You’re trying to scan zones over the remote web interface? That’s never worked. See how you go while your computer is on the same LAN as Vera.

Alrighty then.

Up and running. :slight_smile:

Thanks for all of your help!

Hi Futzle, I just updated from UI5 to UI7 and it broke the Connect, configure, zones and user tabs. My plugin version is 74 and Auto update is enabled. Is there any new version to fix this issue?

Thanks for great Plug-in.

There’s a version 80 that fixes the Configure, Zones and Users tab. See some earlier posts in this thread for the saga of the Connect tab; it may never work on UI7 so you may have to work around it depending on whether you are using a direct USB or Ethernet connection to your panel. (Which are you on?)

To update the plugin try this:

http://YourVeraIPAddress:3480/data_request?id=update_plugin&Plugin=1018

I’ve disabled auto-update for this plugin because I don’t want to break users’ security setups if I submit a bad update. You have to update the plugin yourself.

Thanks Futzle for quick reply. I am using USB. I tried updating plugin using the link and it updated to 78 not 80. After updating to 78 users tab is working but "connect " and “Zones” are still not working.

Can you please let me know what am doing wrong in updating and manual process of updating script files… Thanks for your help.

My apologies; I didn’t submit version 80 for approval to the app store. Now I have. Give it enough time for MCV to approve it during their office hours and try updating again.

The plugin’s “Connect” tab does not (and may never) work. You have to assign serial ports through Apps > Develop Apps > Serial Port Configuration. Note that UI7 1.7.318 does not let you assign serial ports to devices, so you may find that you need to be on 1.7.374.

Thanks Futzle. I’ll wait for Plugin version 80.

I am using Vera FW 1.7.374. Regarding serial port assign, can you please let me know the steps to add in configuration. My configuration ("Apps > Develop Apps > Serial Port Configuration) screen attached to the previous post ". Not sure what needs to be added here.