Hi All,
I'm writing a script for interfacing my Caddx alarm panel and Housebot. (Originally I was going to write a full blown plugin, but have found that the generic serial interface and script device for parsing the output work really well!)
The Caddx panel can produce 4 bits of data per alarm zone. So faulted, bypassed, touble and alarm memory or any combination of such. I have 24 zones on my system so I need to hold 96 bits of information.
Is there a simpler way to do it rather than create 96 properties? A 24x4 array would be nice, but????
I know I could store the info in one property, but really don't want to have to deal with 16 possible values for that property if I'm displaying info or trying to extract info.
By the time I'm done with system status properties, partition status properties, interface configuration properties... I really don't need another 96 when I can have 24!
Any ideas?
Thanks
Tim
Arrays in Housebot???
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
It all depends on what you want to do. If you want to build a theme floorplan and display 24 zones, you need 24 properties to do that. Additionally you can build an alphalist and create one large log line containing info about all 24 zones and their states. In the list it would look like this:
Zone 1: Tripped while bypassed
Zone 2: Bypassed
Zone 3: Alarm
.
.
Zone 24: _
or just name your zones:
Hallway: Tripped while bypassed
Livingroom: Bypassed
It is easy to format all of this with tabs. So one alphalist property can hold a textual status of all zones and graphical properties can be used in your theme.
Zone 1: Tripped while bypassed
Zone 2: Bypassed
Zone 3: Alarm
.
.
Zone 24: _
or just name your zones:
Hallway: Tripped while bypassed
Livingroom: Bypassed
It is easy to format all of this with tabs. So one alphalist property can hold a textual status of all zones and graphical properties can be used in your theme.