Problem with Suntech protocol and ST310UC2 module

Turbovix11 hours ago

Hello, there is a problem with the Suntech protocol and the ST310UC2 module. When sending a command to enable/disable output 1, the server continues to receive data from the module, but the interface no longer updates the information, requiring a server restart. This ST310UC2 module does not have output 2, but Traccar displays the possibility of you sending the command to control output 2. See the log below.


2025-01-22 10:01:56  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 09:57:40, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:01:58  INFO: [T344c19f4: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;12:58:10;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.07;100010;2;0248;007377;4.1;0\r
2025-01-22 10:01:58  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 09:58:10, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:02:00  INFO: [T344c19f4: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;12:58:40;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.07;100010;2;0249;007377;4.1;0\r
2025-01-22 10:02:00  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 09:58:40, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:02:01  INFO: [T344c19f4: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;12:59:10;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.11;100010;2;0250;007378;4.1;0\r
2025-01-22 10:02:01  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 09:59:10, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:02:03  INFO: [T344c19f4: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;12:59:40;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.07;100010;2;0251;007378;4.1;0\r
2025-01-22 10:02:03  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 09:59:40, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:02:04  INFO: [T344c19f4: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:00:10;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.07;100010;2;0252;007379;4.1;0\r
2025-01-22 10:02:05  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 10:00:10, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:02:06  INFO: [T344c19f4: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:00:40;1bd714;-20.417825;-040.337077;000.000;178.14;22;1;44;12.07;100010;2;0253;007379;4.1;0\r
2025-01-22 10:02:06  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 10:00:40, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:02:07  INFO: [T344c19f4: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:01:10;1bd714;-20.417825;-040.337077;000.000;178.14;22;1;44;12.04;100010;2;0254;007380;4.1;0\r
2025-01-22 10:02:07  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 10:01:10, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:02:09  INFO: [T344c19f4: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:01:40;1bd714;-20.417825;-040.337077;000.000;178.14;22;1;44;12.04;100010;2;0255;007380;4.1;0\r
2025-01-22 10:02:09  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 10:01:40, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:02:11  INFO: [T344c19f4: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:02:10;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.04;100010;2;0256;007381;4.1;0\r
2025-01-22 10:02:11  INFO: [T344c19f4] id: 807353438, time: 2025-01-22 10:02:10, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:02:30  INFO: user: 1, action: command, deviceId: 1, type: alarmArm
2025-01-22 10:02:30  INFO: [T344c19f4] id: 807353438, command type: alarmArm sent
2025-01-22 10:02:30  INFO: [T344c19f4: suntech > 187.60.53.106] ST300CMD;807353438;02;Enable2\r
2025-01-22 10:02:33  INFO: [T344c19f4: suntech < 187.60.53.106] ST300CMD;Res;807353438;407;Enable2\r-Error\r
2025-01-22 10:02:33  WARN: Position handler failed - Cannot invoke "java.util.Date.getTime()" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (FilterHandler:126 < *:212 < *:279 < BasePositionHandler:34 < ProcessingHandler:172 < DistanceHandler:74 < ...)
2025-01-22 10:02:33  WARN: Failed to store position - NULL not allowed for column "DEVICETIME"; SQL statement:
INSERT INTO tc_positions(address, protocol, valid, network, latitude, longitude, accuracy, deviceTime, fixTime, speed, serverTime, altitude, course, geofenceIds, deviceId, attributes) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23502-232] - JdbcSQLIntegrityConstraintViolationException (... < QueryBuilder:469 < DatabaseStorage:95 < DatabaseHandler:44 < BasePositionHandler:34 < ...)
2025-01-22 10:02:33  WARN: Event save error - NULL not allowed for column "EVENTTIME"; SQL statement:
INSERT INTO tc_events(positionId, eventTime, geofenceId, maintenanceId, type, deviceId, attributes) VALUES (?, ?, ?, ?, ?, ?, ?) [23502-232] - JdbcSQLIntegrityConstraintViolationException (... < QueryBuilder:469 < DatabaseStorage:95 < NotificationManager:86 < *:176 < ProcessingHandler:185 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.getTime()" because the return value of "org.traccar.model.Event.getEventTime()" is null - NullPointerException (NotificationManager:93 < *:176 < ProcessingHandler:185 < CommandResultEventHandler:34 < BaseEventHandler:33 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < OverspeedEventHandler:66 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.equals(Object)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (BehaviorEventHandler:44 < BaseEventHandler:33 < ProcessingHandler:184 < ... < *:184 < *:174 < DatabaseHandler:50 < ...)
...
2025-01-22 10:02:33  WARN: Position handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < PostProcessHandler:50 < BasePositionHandler:34 < ProcessingHandler:191 < ...)
2025-01-22 10:02:33  WARN: Position handler failed - date must not be null - NullPointerException (... < DateUtil:74 < PositionLogger:54 < ProcessingHandler:192 < BasePositionHandler:37 < ...)
2025-01-22 10:02:33  WARN: Event save error - NULL not allowed for column "EVENTTIME"; SQL statement:
INSERT INTO tc_events(positionId, eventTime, geofenceId, maintenanceId, type, deviceId, attributes) VALUES (?, ?, ?, ?, ?, ?, ?) [23502-232] - JdbcSQLIntegrityConstraintViolationException (... < QueryBuilder:469 < DatabaseStorage:95 < NotificationManager:86 < *:176 < ProcessingHandler:185 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.getTime()" because the return value of "org.traccar.model.Event.getEventTime()" is null - NullPointerException (NotificationManager:93 < *:176 < ProcessingHandler:185 < CommandResultEventHandler:34 < BaseEventHandler:33 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < OverspeedEventHandler:66 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.equals(Object)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (BehaviorEventHandler:44 < BaseEventHandler:33 < ProcessingHandler:184 < ... < *:184 < *:174 < BasePositionHandler:37 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < FuelEventHandler:43 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < MotionEventHandler:55 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < GeofenceEventHandler:40 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < IgnitionEventHandler:38 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (MaintenanceEventHandler:37 < BaseEventHandler:33 < ProcessingHandler:184 < ... < *:184 < *:174 < BasePositionHandler:37 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < DriverEventHandler:36 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Position handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < PostProcessHandler:50 < BasePositionHandler:34 < ProcessingHandler:191 < ...)
2025-01-22 10:02:33  WARN: Position handler failed - date must not be null - NullPointerException (... < DateUtil:74 < PositionLogger:54 < ProcessingHandler:192 < BasePositionHandler:37 < ...)
2025-01-22 10:02:33  WARN: Event save error - NULL not allowed for column "EVENTTIME"; SQL statement:
INSERT INTO tc_events(positionId, eventTime, geofenceId, maintenanceId, type, deviceId, attributes) VALUES (?, ?, ?, ?, ?, ?, ?) [23502-232] - JdbcSQLIntegrityConstraintViolationException (... < QueryBuilder:469 < DatabaseStorage:95 < NotificationManager:86 < *:176 < ProcessingHandler:185 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.getTime()" because the return value of "org.traccar.model.Event.getEventTime()" is null - NullPointerException (NotificationManager:93 < *:176 < ProcessingHandler:185 < CommandResultEventHandler:34 < BaseEventHandler:33 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < OverspeedEventHandler:66 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.equals(Object)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (BehaviorEventHandler:44 < BaseEventHandler:33 < ProcessingHandler:184 < ... < *:184 < *:174 < BasePositionHandler:37 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < FuelEventHandler:43 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < MotionEventHandler:55 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < GeofenceEventHandler:40 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < IgnitionEventHandler:38 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (MaintenanceEventHandler:37 < BaseEventHandler:33 < ProcessingHandler:184 < ... < *:184 < *:174 < BasePositionHandler:37 < ...)
2025-01-22 10:02:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < DriverEventHandler:36 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:02:33  WARN: Position handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < PostProcessHandler:50 < BasePositionHandler:34 < ProcessingHandler:191 < ...)
2025-01-22 10:02:33  WARN: [T344c19f4] error - date must not be null - NullPointerException (... < DateUtil:74 < PositionLogger:54 < ProcessingHandler:192 < BasePositionHandler:37 < ...)
2025-01-22 10:02:33  WARN: [T344c19f4] error - Index 1 out of bounds for length 1 - ArrayIndexOutOfBoundsException (SuntechProtocolDecoder:340 < *:960 < ExtendedObjectDecoder:73 < ... < WrapperContext:102 < ... < WrapperInboundHandler:56 < ...)
2025-01-22 10:02:33  INFO: [T344c19f4] disconnected
2025-01-22 10:02:33  INFO: Event id: 807353438, time: 2025-01-22 10:02:33, type: deviceOffline, notifications: 0
2025-01-22 10:02:42  INFO: [T68be3a48] connected
2025-01-22 10:02:42  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:02:40;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.04;100010;2;0257;007381;4.1;1\r
2025-01-22 10:02:42  INFO: Event id: 807353438, time: 2025-01-22 10:02:42, type: deviceOnline, notifications: 0
2025-01-22 10:03:10  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:03:10;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.07;100010;2;0258;007382;4.1;1\r
2025-01-22 10:03:40  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:03:40;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.11;100010;2;0259;007382;4.1;1\r
2025-01-22 10:04:10  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:04:10;1bd714;-20.417825;-040.337077;000.000;178.14;22;1;44;12.11;100010;2;0260;007383;4.1;1\r
2025-01-22 10:04:40  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:04:40;1bd714;-20.417825;-040.337077;000.000;178.14;22;1;44;12.11;100010;2;0261;007383;4.1;1\r
2025-01-22 10:05:10  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:05:10;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.11;100010;2;0262;007384;4.1;1\r
2025-01-22 10:05:40  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:05:40;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.11;100010;2;0263;007384;4.1;1\r
2025-01-22 10:06:11  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:06:10;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.11;100010;2;0264;007385;4.1;1\r
2025-01-22 10:06:40  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:06:40;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;44;12.11;000010;2;0265;007385;4.1;1\r
2025-01-22 10:07:11  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:07:10;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.11;000010;2;0266;007386;4.1;1\r
2025-01-22 10:07:40  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:07:40;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.07;000010;2;0267;007386;4.1;1\r
2025-01-22 10:08:10  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:08:10;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.07;000010;2;0268;007387;4.1;1\r
2025-01-22 10:08:40  INFO: [T68be3a48: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:08:40;1bd714;-20.417825;-040.337077;000.000;178.14;21;1;44;12.07;000010;2;0269;007387;4.1;1\r
Turbovix11 hours ago

After I restarted the server it returned to normal, and started updating the module information, so I sent a command to turn off output 1, then it stopped updating the information again.


2025-01-22 10:13:41  INFO: Operating system name: Linux version: 6.12.8-2-default architecture: amd64
2025-01-22 10:13:41  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: Eclipse Adoptium version: 21.0.4+7-LTS
2025-01-22 10:13:41  INFO: Memory limit heap: 1904mb non-heap: 0mb
2025-01-22 10:13:41  INFO: Character encoding: UTF-8
2025-01-22 10:13:41  INFO: Version: 6.6
2025-01-22 10:13:41  INFO: Starting server...
2025-01-22 10:13:41  INFO: HikariPool-1 - Starting...
2025-01-22 10:13:42  INFO: HikariPool-1 - Added connection conn0: url=jdbc:h2:./data/database user=SA
2025-01-22 10:13:42  INFO: HikariPool-1 - Start completed.
2025-01-22 10:13:42  INFO: Set default schema name to PUBLIC
2025-01-22 10:13:42  INFO: Clearing database change log checksums
2025-01-22 10:13:43  INFO: Successfully acquired change log lock
2025-01-22 10:13:43  INFO: Successfully released change log lock
2025-01-22 10:13:47  INFO: Reading from PUBLIC.DATABASECHANGELOG
2025-01-22 10:13:48  INFO: Reading from PUBLIC.DATABASECHANGELOG
2025-01-22 10:13:48  INFO: Reading from PUBLIC.DATABASECHANGELOG
2025-01-22 10:13:48  INFO: UPDATE SUMMARY
2025-01-22 10:13:48  INFO: Run:                          0
2025-01-22 10:13:48  INFO: Previously run:              50
2025-01-22 10:13:48  INFO: Filtered out:                 0
2025-01-22 10:13:48  INFO: -------------------------------
2025-01-22 10:13:48  INFO: Total change sets:           50

2025-01-22 10:13:48  INFO: Update summary generated
2025-01-22 10:13:48  INFO: Successfully released change log lock
2025-01-22 10:13:48  INFO: Command execution complete
2025-01-22 10:13:48  INFO: Health check enabled with period 480000
2025-01-22 10:13:51  INFO: jetty-11.0.24; built: 2024-08-26T18:11:22.448Z; git: 5dfc59a691b748796f922208956bd1f2794bcd16; jvm 21.0.4+7-LTS
2025-01-22 10:13:51  INFO: Started o.t.w.@5fb381af{/,null,AVAILABLE}
2025-01-22 10:13:51  INFO: Session workerName=node0
2025-01-22 10:13:52  INFO: Started o.e.j.s.ServletContextHandler@60aee8f8{/,null,AVAILABLE}
2025-01-22 10:13:52  INFO: Started ServerConnector@7ab0bfa7{HTTP/1.1, (http/1.1)}{0.0.0.0:8082}
2025-01-22 10:13:52  INFO: Started Server@4f976a49{STARTING}[11.0.24,sto=0] @12763ms
2025-01-22 10:13:53  INFO: [T52c29e29] connected
2025-01-22 10:13:53  INFO: [T52c29e29: suntech < 187.60.53.106] ST300ALV;807353438\r
2025-01-22 10:13:54  INFO: Event id: 807353438, time: 2025-01-22 10:13:54, type: deviceOnline, notifications: 0
2025-01-22 10:13:57  INFO: user: 1, action: login, from: 127.0.0.1
2025-01-22 10:14:29  INFO: [T52c29e29: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:14:29;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;44;12.11;100010;2;0276;007390;4.1;1\r
2025-01-22 10:14:29  INFO: [T52c29e29] id: 807353438, time: 2025-01-22 10:14:29, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:14:49  INFO: [T31ce84b6] connected
2025-01-22 10:14:49  INFO: [T31ce84b6: suntech < 187.60.53.112] ST300EMG;511691595;145;403;20250122;13:13:48;1b7363;-20.335988;-040.299930;000.000;000.00;0;0;71626337;12.18;000010;7;106160;3.8;0\r
2025-01-22 10:14:49  WARN: Unknown device - 511691595 (187.60.53.112)
2025-01-22 10:14:51  INFO: [T31ce84b6: suntech < 187.60.53.112] ST300EMG;511691595;145;403;20250122;13:14:48;1b7363;-20.335988;-040.299930;000.000;000.00;0;0;71626337;12.25;000010;7;106160;3.8;0\r
2025-01-22 10:14:51  WARN: Unknown device - 511691595 (187.60.53.112)
2025-01-22 10:14:59  INFO: [T52c29e29: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:14:59;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.07;100010;2;0277;007390;4.1;1\r
2025-01-22 10:14:59  INFO: [T52c29e29] id: 807353438, time: 2025-01-22 10:14:59, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:15:05  INFO: [T31ce84b6: suntech < 187.60.53.112] ST300EMG;511691595;145;403;20250122;13:15:04;1b7363;-20.335988;-040.299930;000.000;000.00;0;0;71626337;12.21;000010;7;106160;3.8;1\r
2025-01-22 10:15:05  WARN: Unknown device - 511691595 (187.60.53.112)
2025-01-22 10:15:29  INFO: [T52c29e29: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:15:29;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.07;100010;2;0278;007391;4.1;1\r
2025-01-22 10:15:29  INFO: [T52c29e29] id: 807353438, time: 2025-01-22 10:15:29, lat: -20.41783, lon: -40.33708, course: 178.1
2025-01-22 10:15:32  INFO: user: 1, action: command, deviceId: 1, type: engineStop
2025-01-22 10:15:32  INFO: [T52c29e29] id: 807353438, command type: engineStop sent
2025-01-22 10:15:32  INFO: [T52c29e29: suntech > 187.60.53.106] ST300CMD;807353438;02;Enable1\r
2025-01-22 10:15:33  INFO: [T52c29e29: suntech < 187.60.53.106] ST300CMD;Res;807353438;407;Enable1\r
2025-01-22 10:15:33  WARN: Position handler failed - Cannot invoke "java.util.Date.getTime()" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (FilterHandler:126 < *:212 < *:279 < BasePositionHandler:34 < ProcessingHandler:172 < DistanceHandler:74 < ...)
2025-01-22 10:15:33  WARN: Failed to store position - NULL not allowed for column "DEVICETIME"; SQL statement:
INSERT INTO tc_positions(address, protocol, valid, network, latitude, longitude, accuracy, deviceTime, fixTime, speed, serverTime, altitude, course, geofenceIds, deviceId, attributes) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23502-232] - JdbcSQLIntegrityConstraintViolationException (... < QueryBuilder:469 < DatabaseStorage:95 < DatabaseHandler:44 < BasePositionHandler:34 < ...)
2025-01-22 10:15:33  WARN: Event save error - NULL not allowed for column "EVENTTIME"; SQL statement:
INSERT INTO tc_events(geofenceId, maintenanceId, eventTime, positionId, type, deviceId, attributes) VALUES (?, ?, ?, ?, ?, ?, ?) [23502-232] - JdbcSQLIntegrityConstraintViolationException (... < QueryBuilder:469 < DatabaseStorage:95 < NotificationManager:86 < *:176 < ProcessingHandler:185 < ...)
2025-01-22 10:15:33  WARN: Event handler failed - Cannot invoke "java.util.Date.getTime()" because the return value of "org.traccar.model.Event.getEventTime()" is null - NullPointerException (NotificationManager:93 < *:176 < ProcessingHandler:185 < CommandResultEventHandler:34 < BaseEventHandler:33 < ...)
2025-01-22 10:15:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < OverspeedEventHandler:66 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:15:33  WARN: Event handler failed - Cannot invoke "java.util.Date.equals(Object)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (BehaviorEventHandler:44 < BaseEventHandler:33 < ProcessingHandler:184 < ... < *:184 < *:174 < DatabaseHandler:50 < ...)
2025-01-22 10:15:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < FuelEventHandler:43 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:15:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < MotionEventHandler:55 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:15:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < GeofenceEventHandler:40 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:15:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < IgnitionEventHandler:38 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:15:33  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (MaintenanceEventHandler:37 < BaseEventHandler:33 < ProcessingHandler:184 < ... < *:184 < *:174 < DatabaseHandler:50 < ...)
...
2025-01-22 10:15:34  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < MotionEventHandler:55 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:15:34  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < GeofenceEventHandler:40 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:15:34  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < IgnitionEventHandler:38 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:15:34  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (MaintenanceEventHandler:37 < BaseEventHandler:33 < ProcessingHandler:184 < ... < *:184 < *:174 < BasePositionHandler:37 < ...)
2025-01-22 10:15:34  WARN: Event handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < DriverEventHandler:36 < BaseEventHandler:33 < ProcessingHandler:184 < ...)
2025-01-22 10:15:34  WARN: Position handler failed - Cannot invoke "java.util.Date.compareTo(java.util.Date)" because the return value of "org.traccar.model.Position.getFixTime()" is null - NullPointerException (PositionUtil:41 < PostProcessHandler:50 < BasePositionHandler:34 < ProcessingHandler:191 < ...)
2025-01-22 10:15:34  WARN: [T52c29e29] error - date must not be null - NullPointerException (... < DateUtil:74 < PositionLogger:54 < ProcessingHandler:192 < BasePositionHandler:37 < ...)
2025-01-22 10:15:34  INFO: [T52c29e29] disconnected
2025-01-22 10:15:34  INFO: Event id: 807353438, time: 2025-01-22 10:15:34, type: deviceOffline, notifications: 0
2025-01-22 10:15:41  INFO: [T689790df] connected
2025-01-22 10:15:41  INFO: [T689790df: suntech < 187.60.53.106] ST300ALV;807353438\r
2025-01-22 10:15:41  INFO: Event id: 807353438, time: 2025-01-22 10:15:41, type: deviceOnline, notifications: 0
2025-01-22 10:15:59  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:15:59;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0279;007391;4.1;1\r
2025-01-22 10:16:04  INFO: [T31ce84b6: suntech < 187.60.53.112] ST300EMG;511691595;145;403;20250122;13:16:04;1b7302;-20.335988;-040.299930;000.000;000.00;0;0;71626337;12.21;000010;7;106160;3.8;1\r
2025-01-22 10:16:04  WARN: Unknown device - 511691595 (187.60.53.112)
2025-01-22 10:16:29  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:16:29;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.07;100010;2;0280;007392;4.1;1\r
2025-01-22 10:16:59  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:16:59;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0281;007392;4.1;1\r
2025-01-22 10:17:04  INFO: [T31ce84b6: suntech < 187.60.53.112] ST300EMG;511691595;145;403;20250122;13:17:04;1b7363;-20.335988;-040.299930;000.000;000.00;0;0;71626337;12.21;000010;7;106160;3.8;1\r
2025-01-22 10:17:04  WARN: Unknown device - 511691595 (187.60.53.112)
2025-01-22 10:17:29  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:17:29;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0282;007393;4.1;1\r
2025-01-22 10:17:59  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:17:59;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0283;007393;4.1;1\r
2025-01-22 10:18:29  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:18:29;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0284;007394;4.1;1\r
2025-01-22 10:18:59  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:18:59;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0285;007394;4.1;1\r
2025-01-22 10:19:29  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:19:29;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0286;007395;4.1;1\r
2025-01-22 10:19:59  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:19:59;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0287;007395;4.1;1\r
2025-01-22 10:20:29  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:20:29;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0288;007396;4.1;1\r
2025-01-22 10:20:59  INFO: [T689790df: suntech < 187.60.53.106] ST300STT;807353438;145;407;20250122;13:20:59;1bd714;-20.417825;-040.337077;000.000;178.14;20;1;47;12.11;100010;2;0289;007396;4.1;1\r
Antonio Junior10 hours ago

@Turbovix, I added this line before updating the position and solved the problem for sending commands to output 1.
As for output 2, as I mentioned on github, this model does not accept commands to activate/deactivate alarm, which is output 2, it requires a review of the protocol, I am looking for an alternative.

In the SuntechProtocolDecoder.java file, look for this code snippet, change it and test it.

Original

if (result) {
  position.set(Position.KEY_RESULT, String.join(";", Arrays.copyOfRange(values, index, values.length)));
  return position;
 }

Modified

  if (result) {
            getLastLocation(position, null);  // added to fix error when sending lock/unlock command
            position.set(Position.KEY_RESULT, String.join(";", Arrays.copyOfRange(values, index, values.length)));
            return position;
        }