Traccar reports another alarm type than the device sends

Daniel Hölder2 years ago

Hi,
I just discovered that Traccar reports under Reports -> Events another alarm type than the device reports.

In this case "Restart" is reported as "Power on".

Logfile: $MGV002,1234567890,,S,000000,000000,V,0000.000000,N,00000.00000,E,00,00,00,,,,,,,,,,,,,,,,,,,01,100,Restart,,,0,,;!
Event report: "2024-02-04 01:56:38 Alarm Power On"

What could be the reason for this?

Anton Tananaev2 years ago

Probably the protocol is different, but you have to provide details like message samples and documentation.

Daniel Hölder2 years ago

Thanks, Anton, for the aswer that was quicker than my question. ;-) I sent it accidentially too early and amended it now.

Anton Tananaev2 years ago

Still need the protocol documentation though.

Daniel Hölder2 years ago

The protocol is Megastek.

I just checked the MegastekProtocolDecoder.java file and discovered, maybe, the reason. But I'm not sure since I'm not familiar with Java.

Does this mean that all three messages are reported as Power on:

       switch (value) {
            case "pw on":
            case "restart":
            case "poweron":
                return Position.ALARM_POWER_ON;
Anton Tananaev2 years ago

Yes.

Daniel Hölder2 years ago

Ok, thanks.