Taking a deeper look it appears that the problem lies in this function:
local function appendZones (rootPtr, zones)
for zoneNo, zoneAddress, zoneChannel, zoneName in zones:gmatch("(%d+)-(%d*)-?(%d*)-?([^;]+)") do
debug("(VistaAlarmPanel::appendZones) Appending zone #"..zoneNo.." with address ["..zoneAddress.."] and channel ["..zoneChannel.."]")
local parameters = SID.SECURITY_SENSOR..",Armed=1\n"..SID.SECURITY_SENSOR..",Tripped=0"
luup.chdev.append(lug_device, rootPtr, "vista_zone_"..zoneNo, "Zone #"..zoneNo.." - "..zoneName, "urn:schemas-micasaverde-com:device:MotionSensor:1", "D_MotionSensor1.xml", "", parameters, false)
zoneNo = tonumber(zoneNo, 10)
local zoneType = ZONE_TYPE.UNKNOWN
if (zoneAddress:len() == 2 and zoneChannel:len() == 1) then
zoneType = ZONE_TYPE.WIRED
elseif (zoneAddress:len() == 7 and zoneChannel:len() == 1) then
zoneType = ZONE_TYPE.RF
end
g_zones[zoneNo] = {
address = zoneAddress, -- keep address as string because RF serial # "0000012" != address "12"
channel = tonumber(zoneChannel, 10),
type = zoneType
}
end
end
There may be a few ways to fix this. One way would be to change the device type to doorswitch. However this would make all zones door's. What I would like to do is have the ability to change the zone type in the zone list as I mentioned earlier. I need to take a look at how that list is being handled to see if that is possible.