Auto add new devices

leontino8 years ago

Hello everyone,

I wanna know, if it's possible automate the creation of new device. When show "unknown device" on 'tracker-server.log' file, auto add on device list, on specific group, with custom name.

Thank you!

Anton Tananaev8 years ago

Yes, it's possible using "database.registerUnknown" parameter:

https://www.traccar.org/configuration-file/

You can also use "database.registerUnknown.defaultGroupId" parameter to specify group.

A Y5 years ago

Hello,
I used the suggestion written above, and indeed in the log file, I saw the location messages arrive (and a new device automatically registered message).
However, the device is not showing up automatically in the web UI and when I attempt to add the device in the UI I get a duplicate ID error message.
What can be done?
Is it possible to load all devices stored in the DB?

Anton Tananaev5 years ago

You can automatically add device to a group, as mentioned above. You can also manually link device as an admin.

A Y5 years ago

Thank you Anton for the swift reply.
Can you please point me to a documentation of how to link a device from database?
And if I automatically added a device to a group, how do I view the group in the web interface?

Anton Tananaev5 years ago

Users with access to the group should see all devices in the group.

Maulana5 years ago

my group name is "fakih"

I use config parameter

<entry key='database.registerUnknown.defaultGroupId'>fakih</entry>

but get eror log message:

error - For input string: "fakih" - NumberFormatException (... < Config:132 < *:123 < DeviceManager:79 < BaseProtocolDecoder:123 < ...)
Anton Tananaev5 years ago

The configuration parameter clearly says that it should be an id, not a name.

A Y4 years ago

May I inquire as to why this parameter (database.registerUnknown.defaultGroupId) is not in Documentation and not in the Keys.java file?
Is the documentation also opensource and can I contribute?

Anton Tananaev4 years ago

It's not in the documentation because we haven't had a chance to document it. Not in Keys because it hasn't been migrated.

As for contribution, it's always welcome. Send us HTML code to add to the documentation. The website itself is not really open source, but happy to update it.

A Y4 years ago

Here is an updated version of the server configuration documentation HTML.
Added the param : database.registerUnknown.defaultGroupId
And added a comment under database.registerUnknown - This is my observation, and of course, should be checked.

Anton Tananaev4 years ago

Added database.registerUnknown.defaultGroupId documentation, but the statement about database.registerUnknown is incorrect.

m3 years ago

Hello,
I used the suggestion written above, and indeed in the log file, I saw the location messages arrive (and a new device automatically registered message).
However, the device is not showing up automatically in the web UI and when I attempt to add the device in the UI I get a duplicate ID error message.
What can be done?
Is it possible to load all devices stored in the DB?

It happened to me too.
What is the solution?

Anton Tananaev3 years ago

The solution is to link the device to your user account.

m3 years ago

How do you do that?
Thanks so much for the quick answers!