send command no working

Felipe2 years ago

I have created different commands at https://demo3.traccar.org/ and when I try to send one, I cannot do it since the list to search for the saved commands does not appear any of the created ones,
when calling the endpoint https://demo3.traccar.org/api/commands it lists the created commands but in devideId all of them are zero, it's like the command was not related to the device, any suggestions, thanks

Anton Tananaev2 years ago

Have you linked it to your device?

Felipe2 years ago

I have installed the traccar client app on my cell phone and I have linked the device with the demo, in the demo it appears online, but I cannot link the saved commands, could it be something related to permissions? Thank you

Anton Tananaev2 years ago

What prevents you from doing it? Do you get an error?

Felipe2 years ago

it is https://demo2.traccar.org/settings/command-send/1871
where the saved commands should be listed to be able to send. I don't see any of the ones to add in https://demo2.traccar.org/settings/command
so when pressing send it gives the following error, since the description does not come

Column 'description' cannot be null - SQLIntegrityConstraintViolationException (... < QueryBuilder:473 < DatabaseStorage:89 < CommandsManager:88 < ...)
Anton Tananaev2 years ago

That's all great, but I don't see anywhere an attempt to link it to your device. Are you aware that you need to link it?

Devices > Edit > Connections > Commands

Felipe2 years ago

Those steps that tell me where I'm supposed to be? since I can't find it here
https://demo2.traccar.org/

Anton Tananaev2 years ago

It's available on all demo servers.

Felipe2 years ago

i found it, i was missing that part i will add saved commands to my device now i go to https://demo2.traccar.org/settings/command-send/1871

but even so, the saved commands are not listed, it only tells me new

Anton Tananaev2 years ago

What command type have you saved and what protocol are your devices using?

Felipe2 years ago

5055 since it is a mobile phone I have created command type powerOff, engineStop, powerOff, deviceIdentification

Anton Tananaev2 years ago

And why do you need to make those commands as saved instead using them directly? It seems like you don't understand the purpose of saved commands.

Felipe2 years ago

does not work send direct command from here
https://demo2.traccar.org/settings/command-send/1871
a combobox appears that asks for saved commands, that's why I ask if I put send it gives this error

Column 'description' cannot be null - SQLIntegrityConstraintViolationException (... < QueryBuilder:473 < DatabaseStorage:89 < CommandsManager:88 < ...)

that's why I'm asking, do you have an email to send you a screenshot, it seems that you don't understand me

Anton Tananaev2 years ago

First of all, the commands that you're trying to send are not supported by the OsmAnd protocol.

Secondly, using saved commands won't suddenly make those commands supported. And in general it makes zero sense to make saved commands without any parameters. The whole point is to save some parameters. It is mostly used for custom commands.

As for the error you're getting, it's a known issue that's already fixed on master.

Felipe2 years ago

And what command can I use for that protocol, to test?