We have moved at community.getvera.com

Author Topic: Setup questions  (Read 2008 times)

Offline bikeman147

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Setup questions
« on: February 01, 2011, 11:15:15 am »
Thanks for all of the development and code work.  It's impressive what a group of inspired enthusiast can accomplish!  I'm considering adding an NX-8e to my system, but have some questions before I do.

1) Can MCV support the maximum number of zones (192 I believe)?
2) Does the number of zones (max setting) affect scanning speed or performance?
3) Can a single device in a zone be "duplicated" as a single device in MCV?  Such that it appears no differently than native zwave device?
4) Can the NX interface create an "interrupt" for a priority event instead of waiting for a specific sensor/zone getting rescanned with all IO via the serial interface?

What I'm trying to accomplish is a combination of motion sensing for security and, less critical, environment control.  To do this, it's much easier to use a motion sensor attached to the security system instead of two sensors (one to security, the second zwave to MCV).  This needs to be fast - a second or so response time for some lighting uses.  And moderate - 30 to 60 seconds for temperature control. 

I suspect I know the answer, but I'm hoping greater minds than mind have already worked through it.  If MCV Luup code can be multithreaded, with difference scan rates for different tasks, then a solution exists or is feasible.   

Offline guessed

  • Community Beta
  • Master Member
  • ******
  • Posts: 5301
  • Karma: +92/-22
  • Release compat is not a bolted-on afterthought
Re: Setup questions
« Reply #1 on: February 01, 2011, 12:38:07 pm »
1) Can MCV support the maximum number of zones (192 I believe)?
That would only be limited by Vera Memory.  I have about 100 Devices, of which ~23 are my Alarm Panel (Paradox), 10 are another alarm Panel (DSC), and the rest are either ZWave or "AV" Gear items

I'm a beta user, and I need the release of MiOS that has the "USB Memory" support, in order to free up internal memory to run my devices (and not crash Vera)

If you're going to have 192 devices, then it's likely you'll need the same release (which is being discussed in another thread)

Quote
2) Does the number of zones (max setting) affect scanning speed or performance?
On startup, all the Alarm Plugins need to "scan" the Zones in the system to find their current state, and get it in sync with the MiOS version of it.  After startup, events are sent by the Panel for all Zone changes, so this "scan" is not done again.

These parameters define how quickly that initial scan can be done.  In my case, I have 21 Zones, but the Panel is capable of 48, so it's a time saver (at Vera powerup) to not have to scan all the zones I don't have.

Quote
3) Can a single device in a zone be "duplicated" as a single device in MCV?  Such that it appears no differently than native zwave device?
The "Zones" that are generated are made to look like "Motion Sensors" in MiOS, so they behave just like a ZWave one.  In turn, these then show up in Control Points like SQRemote (etc), since they use the standard interface.

What doesn't show up, since it's not standardized, is the Panel, or Partitions, themselves.  This is the topic of another thread to get that standardized so that the Control Points have a UI for Alarm systems (in general)

Quote
4) Can the NX interface create an "interrupt" for a priority event instead of waiting for a specific sensor/zone getting rescanned with all IO via the serial interface?
I'll leave that to @futzle, due to the specific knowledge of how the GE devices work, but...

In general, for the Panels we've seen so far, only startup needs to "poll" all of the Zones, Partitions and Panel status information.  After startup, the Panel delivers change events for any Zone opened, or closed, along with Panel and Partition events (relating to Arming, Disarming, Breach etc)

These change-events are really small, and the Plugins are "waiting" for them to occur (blocking on the specific IO channel that's been assigned to them)

Excluding MiOS quirks, these are delivered very fast and typically show up within ~1 second of them occurring.  For my Panel, these delays are most often a result of the Panel itself delivering the IO Message.

Quote
What I'm trying to accomplish is a combination of motion sensing for security and, less critical, environment control.  To do this, it's much easier to use a motion sensor attached to the security system instead of two sensors (one to security, the second zwave to MCV).  This needs to be fast - a second or so response time for some lighting uses.  And moderate - 30 to 60 seconds for temperature control. 
Agreed.  Having two sensors in every room is not useful, esp when most of the ZWave ones are battery powered.

Quote
I suspect I know the answer, but I'm hoping greater minds than mind have already worked through it.  If MCV Luup code can be multithreaded, with difference scan rates for different tasks, then a solution exists or is feasible.   
At any given time, MiOS has "threads" hanging around for each Plugin (more or less) and these are typically blocked by the IO Channel they're listening to (Serial, TCP Socket, etc, etc).

Most of the time, MiOS is just sitting idle for something to happen on an IO channel (one per plugin) so it can get on with processing that before going back to sleep.

Startup (Vera Powerup) is a lot different, since virtually every Plugin is "active" and getting it's initial state setup.  Startup times on Vera can be bad due to this High-CPU situation, but that settles once startup is complete (and hopefully it's not restarting constantly, something that's gotten a lot better in the newest beta's)

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup questions
« Reply #2 on: February 02, 2011, 05:09:59 am »
1) Can MCV support the maximum number of zones (192 I believe)?

As well as what @guessed says, the NX-8 serial protocol reserves an 8-bit field for the zone number, which the plugin happily passes through.  Whether that exposes all of the zones is something I couldn't say.  I've got three zones, and I know that someone here has eight.

Quote
2) Does the number of zones (max setting) affect scanning speed or performance?

@guessed describes the NX-584 plugin startup correctly.  After restarting the Luup engine, the plugin starts from scratch, and asks the alarm panel for information about every zone.  This does take time.  For three zones, a couple of seconds.

There's now a setting in the plugin that lets you enumerate exactly which zones you have, as a list of numbers.  After you do that, the maximum-zone-number setting isn't used.

After startup, everything happens as interrupts sent by the panel.  The plugin doesn't poll the panel at all.  It keeps internal variables reflecting the state of the zones and partitions, and updates them every time a zone or partition changes status.  It's very hard to get out of sync, because the NX-584 protocol insists that every status change be acknowledged.  Also it tends to be chatty and include redundant information in packets.

Quote
3) Can a single device in a zone be "duplicated" as a single device in MCV?  Such that it appears no differently than native zwave device?

A single device is a zone.  "Zone" in the plugin is one sensor, be it a motion sensor or reed switch or smoke detector.  This is reflected in the Vera UI, though at the moment all of them appear as Motion Sensors.

I don't know how native Z-Wave motion sensors appear in the Vera UI—they don't sell them in my country—but they probably appear the same.

("Duplicated" isn't a verb I'd use here.  Consequently I'm not sure that I've answered the question you are asking.)

Quote
4) Can the NX interface create an "interrupt" for a priority event instead of waiting for a specific sensor/zone getting rescanned with all IO via the serial interface?
...
This needs to be fast - a second or so response time for some lighting uses.

Yes, it's that fast.  All zone status changes are reported instantly by the panel back to the plugin, over the serial interface.  If I walk from room to room, the Motion Sensor device in the Vera UI switches to Tripped and back off in real time.  Only the zone that was tripped reports; there's no "scanning", it's all interrupts.

The plugin itself doesn't perform other tasks like running scenes, so there's no risk of the plugin "doing something else" and missing a zone status change.  Each Luup plugin runs as its own Unix process, including any scene that you've created that reacts to, say, a zone being tripped.  So yes, you get your multithreading.

Offline eddie

  • Beta Testers
  • Jr. Member
  • *****
  • Posts: 51
  • Karma: +0/-0
Re: Setup questions
« Reply #3 on: February 02, 2011, 08:50:37 am »
1) Can MCV support the maximum number of zones (192 I believe)?

As well as what @guessed says, the NX-8 serial protocol reserves an 8-bit field for the zone number, which the plugin happily passes through.  Whether that exposes all of the zones is something I couldn't say.  I've got three zones, and I know that someone here has eight.

I have 17 zones in my house,  I changed the MAXIMUM_ZONE = 17. But only see 16 zones.

Not sure if there is an issue here.

« Last Edit: February 02, 2011, 08:52:52 am by eddie »

Offline futzle

  • Moderator
  • Master Member
  • *****
  • Posts: 3260
  • Karma: +192/-9
Re: Setup questions
« Reply #4 on: February 02, 2011, 03:22:53 pm »
I have 17 zones in my house,  I changed the MAXIMUM_ZONE = 17. But only see 16 zones.

Click the setup spanner/wrench on the Security System (not partition) device, and switch to the Advanced Tab.  Down the bottom (scroll to see it) is a variable "Zones".  Add ",17" (or whatever number your zone is) to the end, and save.

Offline eddie

  • Beta Testers
  • Jr. Member
  • *****
  • Posts: 51
  • Karma: +0/-0
Re: Setup questions
« Reply #5 on: February 16, 2011, 08:03:05 am »
I have 17 zones in my house,  I changed the MAXIMUM_ZONE = 17. But only see 16 zones.

Click the setup spanner/wrench on the Security System (not partition) device, and switch to the Advanced Tab.  Down the bottom (scroll to see it) is a variable "Zones".  Add ",17" (or whatever number your zone is) to the end, and save.


That worked,  now I have all 17 zones.

Thanks

Eric