Custom device menu

br03 years ago

Hi, friends. Maybe someone already has a ready solution. I'm trying to add more information to the device menu.
I add a new column here app/view/edit/Devices.js

text: Strings.positionSpeed,
dataIndex: 'speed',
renderer: Traccar.AttributeFormatter.getFormatter('speed')

and add field here app/model/Device.js
name: 'speed',
type: 'number'

But it doesn't work. As you can see in the screenshot, the speed is not true

Any ideas? thanks.

Anton Tananaev3 years ago

How do you set the new fields?

br03 years ago

I created them in a file app/model/Device.js
name: 'speed',
type: 'number'

Anton Tananaev3 years ago

Unfortunately that doesn't answer the question. I'm talking about setting values, not declaring the fields.

br03 years ago

You say about the file java/org/traccar/model/Device.java ?

private String positionSpeed;

public String getPositionSpeed() {
return positionSpeed;

public void setPositionSpeed(String positionSpeed) {
this.positionSpeed = positionSpeed;
Anton Tananaev3 years ago

I'm not saying. I'm asking you. There are many ways to implement it.

br03 years ago

It should work, right? But I missed something else because it doesn't work for me.

Anton Tananaev3 years ago

It won't work. The field name doesn't even match, so I'm not sure how you expect it to work.

Anyway, if you want help, provide full context. So far I feel like I need this more than you because I have to keep asking about stuff you omitted in your original post.

br03 years ago

That's all I have. Thanks. The answers here have not changed :)

Anton Tananaev3 years ago

They won't change. This is not a forum where we teach basics of software development. There are other better places where you can learn that.