Problem with Saved Commands

mahmoud Yehia7 years ago

Happy new year every one,
I'm facing a problem in sending saved commands to a device using the web app, I've successfully created a command after testing the command syntax itself by sending it as a custom command to the device directly using the web app and it worked perfectly, however when i try to send the saved command to the same connected device after assigning the command to it, it disconnect instantly and the commend failed to be delivered to the device, is there something i'm missing, device type is Ruptela ECO+ 4

Anton Tananaev7 years ago

You should check logs for errors.

mahmoud Yehia7 years ago

Hello again Anton,

I apologize for my delayed response as i wasn't able to access the the physical machine traccar installed on it till now, I found the following error in the log file when I tried to send a saved command to the ruptela device:

2018-02-02 16:36:36  WARN: [31709884] error - NullPointerException (BaseProtocolEncoder:28 < *:53 < ... < ActiveDevice:51 < BaseProtocol:76 < ...)
2018-02-02 16:36:36  INFO: [31709884] disconnected

the device itself connects again after one or two minutes and work as expected.

any advice please???

Anton Tananaev7 years ago

It looks like you are trying to send command to a device that doesn't exist anymore.

mahmoud Yehia7 years ago

Hummm , this is strange, how I’ll be able to select the device to send the saved command to it if it doesn’t exist, let me descripe in details the steps I performed to produce this error:
A. I test the command by performing the following:
1- select the device from the devices list “device is connected”
2- Press the send command button on top of the devices list.
3- select new command.
4- in the type drop down select custom command
5- write the command in the data field
6- press send
7- a pop message showed up indicating that the command sent successfully, and i double check the events and the locations tables and the expected results is there.

B. Creating the saved command
1- press on the top right options and select saved commands
2- An empty grid showed up i click on the new button
3- in the create new command popup give the command a name, select custom command from the type drop down list, write down the command syntax in the data field, and press save.
4- select the device from the devices list
5- press on the options list and select saved commands
6- a grid will show including the command i created.
7- mark the checkbox beside this command.

C. Sending the saved command:
1- select the device from the devices list “device is still connected”.
2- press on the send commands button.
3- choose the name i gave the saved command
4- click send
5- instantly the device disconnected with the exception i shared with you earlier in the log, it didn’t even appear in the web interface.

Am i missing something??

Anton Tananaev7 years ago

That's too much information. I would recommend to record or something.

mahmoud Yehia7 years ago

Hello Anton,

Kindly find the record of the steps to regenerate this error in the following dropbox link
https://www.dropbox.com/s/8n4khnhz3w6ahor/2018-02-05-16-28-30.flv?dl=0

Anton Tananaev7 years ago

Why did you click twice at the end? First time it clearly worked. Second time your device went offline, so it obviously didn't work.

It seems like your server or network is slow. You can see it by the fact that list of commands took so long to load. So, command also takes longer than usual.

mahmoud Yehia7 years ago

actually it didn't work in both times, It was my mistake to click twice but I wasn't sure that the first click actually took place because the popup usually closes after my click.

The problem is that the first click was the one that causes the device to go offline and the null pointer exception has been thrown in the log.

abyss7 years ago

Have you tried restart traccar service?

abyss7 years ago

Oh..I have found... there was a problem in 3.14 https://github.com/tananaev/traccar/issues/3592
You need to update to 3.15

Cisco3 years ago

hi there!

is possible assign a saved custom command for a device? unfortunatelly is not there any assign button near device list! anyway by hand i can send that custom command successfully. but i cant see in device saved commands list anything what i saved under settings- saved commands.

thx for help

best regards

Anton Tananaev3 years ago

4 year old thread is probably not the best place to ask this.

Cisco3 years ago

then where can i ask it?

Anton Tananaev3 years ago

Is there a reason you can't create a new topic for it?