Zones misclassified as Motion Sensors

First, thanks to all who has worked on the plug-in.

Some of my zones resolve the correct type (say door sensor) while many others are unresolved and default to motion. On the elk side there does not appear to be any setup difference between the zones.

I understand that this behavior is done in the below section of the lua routine but my familiarity ends here:

local function getDeviceType (zoneNo)

  -- Motion Sensors 
  -- No need to parse the MotionSensors state variable, because all the devices 
  -- that are not of one of the types below will be set as Motion Sensors by default. 
 
  if (g_zones[zoneNo].type == "1" or g_zones[zoneNo].type == "2") then 
    return {type = "urn:schemas-micasaverde-com:device:DoorSensor:1", 
        file = "D_DoorSensor1.xml", id = "elk_zone_"} 
      end

Can any experts point me towards a way to troubleshoot or experienced the same problem?

@YellowShark

while many others are unresolved and default to motion

Currently ELK/NESS to VERA is mapped as follows: -

?1? ? 01 = Burglar Entry/Exit 1		D_DoorSensor1.xml
?2? ? 02 = Burglar Entry/Exit 2		D_DoorSensor1.xml
?:? - 10 = Fire Alarm			D_SmokeSensor1.xml
?Q? - 33 = Temperature			D_TemperatureSensor1.xml

Everything else defaults to motion: -

?0? ? 00 = Disabled ?3? ? 03 = Burglar Perimeter Instant ?4? ? 04 = Burglar Interior ?5? ? 05 = Burglar Interior Follower ?6? ? 06 = Burglar Interior Night ?7? ? 07 = Burglar Interior Night Delay ?8? ? 08 = Burglar 24 Hour ?9? ? 09 = Burglar Box Tamper ?;? - 11 = Fire Verified ?<? - 12 = Fire Supervisory ?=? - 13 = Aux Alarm 1 ?>? - 14 = Aux Alarm 2 ??? ? 15 = Keyfob ?@? - 16 = Non Alarm ?A? ? 17 = Carbon Monoxide ?B? ? 18 = Emergency Alarm ?C? ? 19 = Freeze Alarm ?D? ? 20 = Gas Alarm ?E? - 21 = Heat Alarm ?F? - 22 = Medical Alarm ?G? - 23 = Police Alarm ?H? - 24 = Police No Indication ?I? - 25 = Water Alarm ?J? - 26 = Key Momentary Arm / Disarm ?K? - 27 = Key Momentary Arm Away ?L? - 28 = Key Momentary Arm Stay ?M? - 29 = Key Momentary Disarm ?N? - 30 = Key On/Off ?O? - 31 = Mute Audibles ?P? - 32 = Power Supervisory ?R? - 34 = Analog Zone ?S? - 35 = Phone Key ?T? - 36 = Intercom Key

When I get a chance I will have a closer look and see if I can clean it up.

Thank you this helps clear things up. I’ll try and noodle around with the code and have a go at it. Really great plugin.