diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/BaseProtocolDecoder.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/traccar/BaseProtocolDecoder.java b/src/org/traccar/BaseProtocolDecoder.java index d8130c79e..ea0905bf2 100644 --- a/src/org/traccar/BaseProtocolDecoder.java +++ b/src/org/traccar/BaseProtocolDecoder.java @@ -36,6 +36,12 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder { Device device = new Device(); device.setName(uniqueId); device.setUniqueId(uniqueId); + device.setCategory(Context.getConfig().getString("database.registerUnknown.defaultCategory")); + + long defaultGroupId = Context.getConfig().getLong("database.registerUnknown.defaultGroupId"); + if (defaultGroupId != 0) { + device.setGroupId(defaultGroupId); + } try { Context.getDeviceManager().addDevice(device); |