We have moved at community.getvera.com

Author Topic: UI7 and GE Caddx Plugin  (Read 32917 times)

Offline YzRacer

  • Full Member
  • ***
  • Posts: 139
  • Karma: +0/-0
Re: UI7 and GE Caddx Plugin
« Reply #45 on: January 29, 2015, 01:30:21 pm »
Futzle, I had an interesting scenario occur the other day with the plugin. I haven't been able to determine the cause and it seems the log and the UI7 gui did not match what was actually happening. My girlfriend reported a fail to set stay mode from the Authomation app when she went to bed on the night of the 26th. She didn't report this to me until the afternoon of the 27th, and when I checked the Vera web gui everything appeared to be normal, however I also could not set stay mode from the app and received no error on transmitting the message. I checked in on the luup log and saw the dreaded "Ignoring byte" message repeating over and over, however it was odd that the Vera web gui did not indicate "18 sensors are no longer connected" as I usually see with a comms failure. There were a few attempts to set stay and then I initiated a reboot via ssh and all was well.

I have attached a log for your review. I filtered it down a lot, but I want to note that the log starts at 0700 and there are no messages for device 18 (Caddx Plugin) until 1500. It appears there was 0 communication with the Caddx for several hours until I attempted to set stay mode. I am just looking for some input on whether this might be an issue with my USB to serial adapter or an issue with UI7. If it's the adapter I will swap it out, and if it's some other issue I would like to create some type of PLEG event that will reboot the Vera when this occurs.

I'm using this adapter:
http://www.amazon.com/gp/product/B006PIU2KO/ref=oh_aui_search_detailpage?ie=UTF8&psc=1
Premium High Speed USB 2.0 to Serial RS-232 DB-9 Converter - Supports Windows 8, 7, Vista, XP, 2000, 98, Linux and Mac / USB TO SERIAL ADAPTER (USB2-VE487) with FTDI Chipset

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: UI7 and GE Caddx Plugin
« Reply #46 on: January 29, 2015, 03:50:19 pm »
This kind of thing isn't unheard of. I get it too, a couple of times a year. It's unfortunately near impossible to pinpoint a culprit. As you've observed, a Luup restart, or a reset of the USB port with a power cycle, and it all comes good.

My gut feeling is that it is either the USB controller inside the host (Vera in your case, or my PC running ser2net in my case) or the USB adapter itself that is misbehaving. USB is unsuited to long periods of continuous uptime because it doesn't have any way of renegotiating connections if the state machine inside the controller gets out of whack. That's one reason why you continue to find RS-232 and RS-485 connections in equipment: it's so simple that it's hard to break.

I can test my hypothesis now: I've swapped out my PC running ser2net for a WIZNet Ethernet-to-serial gateway. No USB in sight. If I'm right, this will be exactly as reliable as Vera itself and have no other modes of failure.

The reason why the sensors don't report that they are disconnected in the Vera UI is because the plugin doesn't poll them. If the serial line goes quiet then the plugin just assumes that no one is moving to trigger sensors. This is partly because I never implemented polling, and partly because I doubt Vera's ability to poll reliably: plugins are single-threaded, so making it sleep-and-poll once an hour could interfere with actual use and mess with incoming asynchronous events.

Offline HansW

  • Full Member
  • ***
  • Posts: 109
  • Karma: +1/-0
Re: UI7 and GE Caddx Plugin
« Reply #47 on: January 29, 2015, 04:00:17 pm »
Quote
I can test my hypothesis now: I've swapped out my PC running ser2net for a WIZNet Ethernet-to-serial gateway. No USB in sight. If I'm right, this will be exactly as reliable as Vera itself and have no other modes of failure.

This soudns interesting, may caddx-interface also does not work from time to time so of this wiznet gateway can solve that I will get me one. I assume you have it working with the caddx, any pointer on how to set it up?

Regards, Hans
 

Offline YzRacer

  • Full Member
  • ***
  • Posts: 139
  • Karma: +0/-0
Re: UI7 and GE Caddx Plugin
« Reply #48 on: January 30, 2015, 12:42:41 pm »
This kind of thing isn't unheard of. I get it too, a couple of times a year. It's unfortunately near impossible to pinpoint a culprit. As you've observed, a Luup restart, or a reset of the USB port with a power cycle, and it all comes good.

My gut feeling is that it is either the USB controller inside the host (Vera in your case, or my PC running ser2net in my case) or the USB adapter itself that is misbehaving. USB is unsuited to long periods of continuous uptime because it doesn't have any way of renegotiating connections if the state machine inside the controller gets out of whack. That's one reason why you continue to find RS-232 and RS-485 connections in equipment: it's so simple that it's hard to break.

I can test my hypothesis now: I've swapped out my PC running ser2net for a WIZNet Ethernet-to-serial gateway. No USB in sight. If I'm right, this will be exactly as reliable as Vera itself and have no other modes of failure.

The reason why the sensors don't report that they are disconnected in the Vera UI is because the plugin doesn't poll them. If the serial line goes quiet then the plugin just assumes that no one is moving to trigger sensors. This is partly because I never implemented polling, and partly because I doubt Vera's ability to poll reliably: plugins are single-threaded, so making it sleep-and-poll once an hour could interfere with actual use and mess with incoming asynchronous events.

Futlze, as always, thanks for your input! This is the first time it's happened to me without alerting on the Vera home screen. I attribute this to increased stability as my Vera doesn't reboot nearly as often as it did before I became familiar with the system. In the cases where I saw 18 devices no longer connected the Vera likely had a luup restart that did not resolve the serial issue. I found I could change the serial configuration and then put it back with a luup reload and it would be good, or I could reboot.

It doesn't happen often, but I would like to implement something that reboots the Vera automatically if this happens again. If it doesn't poll and the line goes silent then how would you suggest I monitor for the condition? As we just saw it may be a very long time until a luup restart and PLEG isn't going to act on a status that hasn't changed. Perhaps a luup variable get command on a schedule with PLEG and maybe a bad return on the request could trigger a reboot? I'll play around with that idea and see what I come up with.

Offline tcrandal

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
Re: UI7 and GE Caddx Plugin
« Reply #49 on: February 08, 2015, 10:25:22 am »
I just upgraded to UI7 and have the plug-in working fine. I'm in the process of adding all of my zones manually, but there is no quick way to do it under UI7. I thought in past versions (it's been a while), I was able to add more than one sensor at a time manually, but after I click add, there are no additional boxes. It also tells me to "save", but under UI7, I don't think it has the same functionality, as things save automatically.

Also, once I add a zone, how long would it typically take for the sensor to appear, and how would I get it to "reload" under UI7?

Thank you so much for this plug-in, the Vera has successfully replaced my aging Stargate and this plug-in was key for my setup!

Offline YzRacer

  • Full Member
  • ***
  • Posts: 139
  • Karma: +0/-0
Re: UI7 and GE Caddx Plugin
« Reply #50 on: February 08, 2015, 10:46:48 am »
It was a tedious process for me to add my zones in UI7 as well. I found it's best to take your time and use F5 or CTL+F5 to reload your browser often. You can also go to the advanced tab of any device and scroll to the bottom to reload the Luup engine. It has been pretty reliable now that I have everything set.

Offline tcrandal

  • Sr. Newbie
  • *
  • Posts: 20
  • Karma: +0/-0
Re: UI7 and GE Caddx Plugin
« Reply #51 on: February 08, 2015, 03:15:51 pm »
It was a tedious process for me to add my zones in UI7 as well. I found it's best to take your time and use F5 or CTL+F5 to reload your browser often. You can also go to the advanced tab of any device and scroll to the bottom to reload the Luup engine. It has been pretty reliable now that I have everything set.

Thanks for the response! I just added them all successfully, and ended up rebooting after each, as I was showing duplicate names under the zones prior to reloading. I should have just reloaded the Luup engine - Getting used to UI7.




Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: UI7 and GE Caddx Plugin
« Reply #52 on: February 18, 2015, 05:16:17 pm »
It doesn't happen often, but I would like to implement something that reboots the Vera automatically if this happens again. If it doesn't poll and the line goes silent then how would you suggest I monitor for the condition?

There's probably no clean way to do this with the plugin in its current version (81).  Ideally the top-level device would have a "poll" action in its service list which would send an unsolicited packet to the alarm panel (say, a Get Configuration request).  Then, when the panel responds, a timestamp is updated on the device to reflect a successful round trip of communication.  This probably isn't too difficult to implement, so I'll add it to the pile of things to do.

A not-very-clean way with the current version would be to invoke a luup.call_action with some existing action that doesn't have a side-effect, say, urn:futzle-com:serviceId:CaddxNX584Security1/LogEventScan.  This starts a job which ideally should succeed or fail based on your serial connection being up or down.  You don't actually care about the log entries, just the fact that the request succeeded.  I'm not sure if or how you'd invoke that regularly from PLEG, so you've got some homework too.

Offline HansW

  • Full Member
  • ***
  • Posts: 109
  • Karma: +1/-0
Re: UI7 and GE Caddx Plugin
« Reply #53 on: April 23, 2015, 04:43:53 pm »
I have the Caddx Plugin running on UI7, updated to the latest version which seems to be 0.81 and when opening the connection tab I get:

Error executing function serialConnection(): jsonp.get_lu_device_variable_value is not a function

Any idea?

Hans

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5630
  • Karma: +157/-382
Re: UI7 and GE Caddx Plugin
« Reply #54 on: April 23, 2015, 04:52:32 pm »
I have the Caddx Plugin running on UI7, updated to the latest version which seems to be 0.81 and when opening the connection tab I get:

Error executing function serialConnection(): jsonp.get_lu_device_variable_value is not a function

Any idea?

Hans

Have you checked that the serial connection is re set back up?  Apps, Develop apps, serial port configuration, the bottom drop down "used by device" and select your Cadx panel?

I'm running 81.0 on two different vera edges using the latest UI7.

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: UI7 and GE Caddx Plugin
« Reply #55 on: April 23, 2015, 05:17:33 pm »

Error executing function serialConnection(): jsonp.get_lu_device_variable_value is not a function

The "Connect" tab does not and cannot work in UI7. You must use Vera's own serial connection interface to set up the serial port.

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5630
  • Karma: +157/-382
Re: UI7 and GE Caddx Plugin
« Reply #56 on: April 23, 2015, 05:52:17 pm »

Error executing function serialConnection(): jsonp.get_lu_device_variable_value is not a function

The "Connect" tab does not and cannot work in UI7. You must use Vera's own serial connection interface to set up the serial port.

Ahhh yes this is correct!

Offline HansW

  • Full Member
  • ***
  • Posts: 109
  • Karma: +1/-0
Re: UI7 and GE Caddx Plugin
« Reply #57 on: April 25, 2015, 08:58:57 am »
I must be overlooking something very obvious since I have checked out the forum and internet on setting up this wiznet interface to replace my USB cable but cannot get it to work.

The wiznet is configured with the correct baudrate, start and stopbits, a fixed ip address, port 5000 and server mode with server ip set to 0.0.0.0 and port 0.

In the caddx advanced tab I have set the wiznet ip address:5000 but setup fails.

Where can I go from here anyone??

Hans

Offline rstrouse

  • Hero Member
  • *****
  • Posts: 842
  • Karma: +30/-9
Re: UI7 and GE Caddx Plugin
« Reply #58 on: April 25, 2015, 03:05:30 pm »
I did not configure the serial port using the Serial Port configuration.  I simply put the IP address into the Advanced tab on the Caddx device.  Again I have no configuration for serial port under the Apps tab.
1xVera3 1.7.619, 4xLinear WT00Z, 3xLinear WS15Z, 1xLeviton VRCZ4, 10xCooper RF9540, 1xLeviton VRFI10, 1xLeviton VP00R, 2xLinear GD00Z-4, 1xGE/Jasco 45612, 1xGE/Jasco 45610,  4xGE/Jasco 45605, 2xYale YRD220-ZW-619, 1xCaddx NX584, Autelis Intellitouch Pool Control, OpenSprinkler

Offline HansW

  • Full Member
  • ***
  • Posts: 109
  • Karma: +1/-0
Re: UI7 and GE Caddx Plugin
« Reply #59 on: April 25, 2015, 03:20:04 pm »
Thanks, I tried that also but without luck...

Hans