Uplink command to get device events by date.
The corresponding downlink command: getEvents.
getEvents
Supported in MTX1 and MTX3 devices.
import * as getEvents from 'jooby-codec/mtx1/commands/uplink/getEvents.js';// response to getEvents downlink commandconst bytes = [ 0x17, 0x03, 0x0c, 0x02, 0x01, 0x0c, 0x21, 0x9d, 0x16, 0x19, 0x0c, 0x8f 0x01, 0x0c, 0x21, 0x79, 0x00, 0x0a, 0x16, 0x03, 0x04, 0x0c, 0x07, 0x18];// decoded payloadconst parameters = getEvents.fromBytes(bytes);console.log(parameters);// output:{ date: { year: 23, month: 3, date: 12 }, eventsNumber: 2, events: [ { hours: 1, minutes: 12, seconds: 33, event: 157, eventName: 'POWER_OVER_RELAY_OFF', power: [22, 25, 12, 143] }, { hours: 1, minutes: 12, seconds: 33, event: 121, eventName: 'TIME_CORRECT', newDate: { isSummerTime: 0, seconds: 10, minutes: 22, hours: 3, day: 4, date: 12, month: 7, year: 24 } } ]} Copy
import * as getEvents from 'jooby-codec/mtx1/commands/uplink/getEvents.js';// response to getEvents downlink commandconst bytes = [ 0x17, 0x03, 0x0c, 0x02, 0x01, 0x0c, 0x21, 0x9d, 0x16, 0x19, 0x0c, 0x8f 0x01, 0x0c, 0x21, 0x79, 0x00, 0x0a, 0x16, 0x03, 0x04, 0x0c, 0x07, 0x18];// decoded payloadconst parameters = getEvents.fromBytes(bytes);console.log(parameters);// output:{ date: { year: 23, month: 3, date: 12 }, eventsNumber: 2, events: [ { hours: 1, minutes: 12, seconds: 33, event: 157, eventName: 'POWER_OVER_RELAY_OFF', power: [22, 25, 12, 143] }, { hours: 1, minutes: 12, seconds: 33, event: 121, eventName: 'TIME_CORRECT', newDate: { isSummerTime: 0, seconds: 10, minutes: 22, hours: 3, day: 4, date: 12, month: 7, year: 24 } } ]}
Command format documentation
Uplink command to get device events by date.
The corresponding downlink command:
getEvents
.Supported in MTX1 and MTX3 devices.
Example: create command instance from command body hex dump
Command format documentation