confused

Okay, I concocted a minimalistic node.js app that intercepts the forwarded events so that I can act on them. The 'act on them' is where I get confused.

I can send an sms to my device (tk103b) and receive via twillio the expected data. Cool! But twillio gets quickly expensive which is why I searched for and found this tool. Typing the same command as 'custom command' does not seem to give me any results. I dug on this site and found a document that seems to say that the commands are not those keywords ('begin123456' e.g.) but 3 numeric characters category, command, subcommand + parameters. Does that mean those things a bilingual (keywords vs. numeric cmds)? What a waste if that's true. It seems that this app builds an abstraction layer so that 'turn on the horn' converts into the respectively appropriate native format for the actual physical target device. So there are 'drivers' for each supported device type/dialect?

On the other side, I saw, that I can type a URL like for example 'http://localhost:8082/api/devices?all=true' and get a nicely formatted result set. Node would be helpful in creating the URL via GET or POST, hopefully returning the expected results. IF my understanding is correct, I would rather stay on the API level so that the software runs on different platforms (or newer more powerful devices of the same family) if needed. Would I use the low-level numeric codes I would be locked in as if I created my software on windows with visual studio ... there is no way to back out anymore unless one is willing to start from scratch. It's like going back to assembler!

Concluding: Do I understand correctly that traccar has a built-in translator that converts universal commands to the respective numeric commands and syntax expected by the target device? That would explain why my 'custom command' string returns nothing! Because the device expects the native codes and receives a -for this interpreter- nonsensical setof strings, But I may be totally wrong.

I could start building commands from those docs defining the protocols found in https://dl.dropboxusercontent.com/s/unaxctd97zqumkr/PROTOCOL123456%20out.doc . I could also peek with Wireshark, but why should I spend hours looking for something that some of the readers can give in a second or two? The wheel has obviously been already discovered...

IF I am right that the metalanguage in the API does in an abstract way what I want while staying universally applicable, I would use this way for sure.

But: I need mainly two commands at this moment: Turn engine power 'on' and 'off' and there seems to be neither this as a command option in the GUI nor do I see it in the API. My Java is too limited and the corpus too large to dig and analyze the source code as I read that there are commands that are implemented but not documented. I feel the author's pain. Documentation sux! But I would need to be able to do just that for the time being. My peers have been very helpful with my last questions showing me the path to the light :)

Would someone please tell me if I bark the wrong tree up and my assumptions are wrong ... and help me to understand the SMS strings vs. numeric codes. And if there is a way to send those strings as they are ( 'begin123456') through an interface that would understand them (other than as an expensive and wasteful SMS) instead of numeric codes?
Or even better, does anyone know what API call is the right one to be sent to turn the power on, off and off once the speed drops below 20 km/h??

I am also happy with pointers to where I can find what I don't seem to see.

Thanks again
guenter

Btw. once I have a bare receive and act node skeleton I will publish it on git as a NODE.JS starter.

What is the difference between /commands and /commands/types other than that /commands returns an empty list ([]) while /commands/types returns an ample amount of commands:

[{"type":"custom"},{"type":"deviceIdentification"},{"type":"positionSingle"},{"type":"positionPeriodic"},{"type":"positionStop"},{"type":"engineStop"},{"type":"engineResume"},{"type":"alarmArm"},{"type":"alarmDisarm"},{"type":"setTimezone"},{"type":"requestPhoto"},{"type":"rebootDevice"},{"type":"sendSms"},{"type":"sendUssd"},{"type":"sosNumber"},{"type":"silenceTime"},{"type":"setPhonebook"},{"type":"voiceMessage"},{"type":"outputControl"},{"type":"voiceMonitoring"},{"type":"setAgps"},{"type":"setIndicator"},{"type":"configuration"},{"type":"getVersion"},{"type":"firmwareUpdate"},{"type":"setConnection"},{"type":"setOdometer"},{"type":"getModemStatus"},{"type":"getDeviceStatus"},{"type":"modePowerSaving"},{"type":"modeDeepSleep"},{"type":"movementAlarm"},{"type":"alarmBattery"},{"type":"alarmSos"},{"type":"alarmRemove"},{"type":"alarmClock"},{"type":"alarmSpeed"},{"type":"alarmFall"},{"type":"alarmVibration"}]

When I want to send a command utilizing the API the docs say ( https://www.traccar.org/api-reference/#path--commands-send ):
link

Where 'Command' is defined as:
Command: object

id: integer
deviceId: integer
description: string
type: string
attributes: object

I have no idea what the 'engine on' and 'engine off' commands have since the text does not work. The command list (above) does not give me the ids.
Using the command as string leads to a "NullPointerException (CommandResource:63 < ...)" as 400 (I am admin)
link

What a, I doing wrong or where could I get the id of the command and why should it be an id and not the command itself as found in the 'types' where the id may change in the next update? And, repeating myself what's the diff between command and command-type?

guenter