queclink-parser 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/src/index.js +6 -1
- package/src/messages/es.json +39 -2
- package/src/utils.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
### 1.5.0 (2023-03-08)
|
|
2
|
+
|
|
3
|
+
##### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **ACK:** command field added to ACK generic commands ([bd5f8701](https://github.com/jaayesta/queclink-parser/commit/bd5f870172e86f654f74ecfabfe8de7b85139a88))
|
|
6
|
+
|
|
7
|
+
#### 1.4.3 (2023-03-04)
|
|
8
|
+
|
|
9
|
+
##### New Features
|
|
10
|
+
|
|
11
|
+
* **overSpeed:** overspeedtype added to over speed alarm ([fc3554d4](https://github.com/jaayesta/queclink-parser/commit/fc3554d4b48b7da43b62931272fa048b68d1f736))
|
|
12
|
+
|
|
1
13
|
#### 1.4.2 (2023-01-16)
|
|
2
14
|
|
|
3
15
|
##### Bug Fixes
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -135,6 +135,7 @@ const getAckCommand = (raw, lang) => {
|
|
|
135
135
|
const command = parsedData[0].split(':')
|
|
136
136
|
|
|
137
137
|
let data = {
|
|
138
|
+
raw: rawData,
|
|
138
139
|
manufacturer: 'queclink',
|
|
139
140
|
device: 'Queclink-COMMAND-OK',
|
|
140
141
|
type: 'ok',
|
|
@@ -144,11 +145,16 @@ const getAckCommand = (raw, lang) => {
|
|
|
144
145
|
: null,
|
|
145
146
|
counter: parseInt(utils.hex2dec(parsedData[parsedData.length - 1]), 10)
|
|
146
147
|
}
|
|
148
|
+
|
|
149
|
+
data.message = messages['+ACK'][command[1]] || messages.default
|
|
150
|
+
data.command = 'CONFIG'
|
|
147
151
|
if (command[1] === 'GTSPD') {
|
|
148
152
|
data.command = 'SETOVERSPEEDALARM'
|
|
149
153
|
} else if (command[1] === 'GTOUT') {
|
|
150
154
|
data.command = 'SETIOSWITCH'
|
|
151
155
|
} else if (command[1] === 'GTRTO') {
|
|
156
|
+
data.message =
|
|
157
|
+
messages['+ACK'][command[1]][parsedData[4]] || messages.default
|
|
152
158
|
if (parsedData[4] === 'RESET') {
|
|
153
159
|
data.command = 'CLEARBUF'
|
|
154
160
|
} else if (parsedData[4] === 'REBOOT') {
|
|
@@ -159,7 +165,6 @@ const getAckCommand = (raw, lang) => {
|
|
|
159
165
|
} else if (command[1] === 'GTJBS') {
|
|
160
166
|
data.command = 'ANTIJAMMER'
|
|
161
167
|
}
|
|
162
|
-
data.message = messages[data.command] || messages.default
|
|
163
168
|
return data
|
|
164
169
|
}
|
|
165
170
|
|
package/src/messages/es.json
CHANGED
|
@@ -146,5 +146,42 @@
|
|
|
146
146
|
"GTDOG": "Dispositivo reiniciado por protocolo",
|
|
147
147
|
"GTGSM": "GSM Report",
|
|
148
148
|
"GTCRA": "Posible choque detectado",
|
|
149
|
-
"GTDTT": "Data transparente del puerto serial"
|
|
150
|
-
|
|
149
|
+
"GTDTT": "Data transparente del puerto serial",
|
|
150
|
+
"+ACK": {
|
|
151
|
+
"GTBSI": "Config: APN",
|
|
152
|
+
"GTSRI": "Config: servidor backend",
|
|
153
|
+
"GTQSS": "Config: APN y servidor backend",
|
|
154
|
+
"GTCFG": "Configuración global",
|
|
155
|
+
"GTPIN": "Config: SIM desbloqueada",
|
|
156
|
+
"GTFRI": "Config: reportes de ubicación",
|
|
157
|
+
"GTTOW": "Alarma configurada: remolque",
|
|
158
|
+
"GTSPD": "Alarma configurada: velocidad",
|
|
159
|
+
"GTSPA": "Alarma configurada: exceso de velocidad",
|
|
160
|
+
"GTBZA": "Alarma configurada: buzzer",
|
|
161
|
+
"GTSOS": "Alarma configurada: botón SOS",
|
|
162
|
+
"GTIDL": "Alarma configurada: ralentí",
|
|
163
|
+
"GTHBM": "Alarma configurada: conducción brusca",
|
|
164
|
+
"GTJBS": "Alarma configurada: jamming",
|
|
165
|
+
"GTJDC": "Config: detección de jamming",
|
|
166
|
+
"GTOUT": "Cambio de estado en las salidas digitales",
|
|
167
|
+
"GTDIS": "Config: entradas digitales",
|
|
168
|
+
"GTEPS": "Config: monitoreo de batería en vehículo",
|
|
169
|
+
"GTURT": "Config: comunicación serial",
|
|
170
|
+
"GTIDA": "Config: identificación de conductor",
|
|
171
|
+
"GTACD": "Config: dispositivo AC100",
|
|
172
|
+
"GTHMC": "Config: horómetro",
|
|
173
|
+
"GTCMD": "Config: nuevo comando en memoria",
|
|
174
|
+
"GTUDF": "Config: función personalizada",
|
|
175
|
+
"GTRTO": {
|
|
176
|
+
"GPS": "Se enviará el estado GNSS",
|
|
177
|
+
"RTL": "Solicitud de posición actual",
|
|
178
|
+
"READ": "Solicitud de configuración vigente",
|
|
179
|
+
"REBOOT": "Dispositivo Reiniciado",
|
|
180
|
+
"RESET": "Restaurar configuración de fábrica",
|
|
181
|
+
"PWROFF": "Dispositivo apagado",
|
|
182
|
+
"VER": "Solicitud de versión de firmware",
|
|
183
|
+
"BAT": "Solicitud de nivel de batería",
|
|
184
|
+
"IOS": "Solicitud de estados I/O"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
package/src/utils.js
CHANGED