Traccar reports another alarm type than the device sends

Daniel Höldera year 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 Tananaeva year ago

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

Daniel Höldera year ago

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

Anton Tananaeva year ago

Still need the protocol documentation though.

Daniel Höldera year 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 Tananaeva year ago

Yes.

Daniel Höldera year ago

Ok, thanks.