These decoders are following the LoRa Alliance Payload Codec API Specification ts013-1.0.0
- fm432e_ap-decoder.js for FM432e v60
- fm432e_nc_1mn-decoder.js for FM432e v54
- fm432e_nc_10mn-15mn-decoder.js for FM432e v57
- fm432g_ap-decoder.js for FM432g v33
- fm432g_nc_10mn-15mn-decoder.js for FM432g v32
- fm432ir_ap-decoder.js for FM432ir v21 & v22
- fm432ir_nc_1mn-decoder.js for FM432ir v18
- fm432ir_nc_15mn-decoder.js for FM432ir v20
- fm432p_ap-decoder.js for FM432p v3.3.6
- fm432p_nc_10mn-15mn-decoder.js for FM432p v3.3.2
- fm432t_nc_1mn-decoder.js for FM432t v5.0.2 with 1 minute configuration
- fm432t_nc_10mn-15mn-decoder.js for FM432t v5.0.2
- tagawatt-decoder.js for TAGAWATT
- fm432e-i_ap-decoder.js for FM432e-i v1
In each file you will find a function DecodeUplink()
Expected input object format:
input:{
"bytes": [105, 1, 0, 0, 255, 255, 0, 1, 0, 2, 0, 3], // The uplink payload byte array, where each byte is represented by an integer
"fPort": 129, // The uplink message LoRaWAN fPort (always 129 in our products)
"recvTime": "2024-08-02T20:00:00.000+00:00" // The uplink message timestamp recorded by the LoRaWAN network server as a JavaScript Date object
}output may vary between products, and some variables are only available when a technical message is received. You can find the return format at the beginning of the DecodeUplink() function.
FM432e
Example of output JSON Object:
data: {
index : 1256,
message_type : "T1",
increments : [1,2,3,4],
powers: [1,2,3,4],
indexes: [1,2,3,4],
meter_type : "Electromechanical (Position A)",
low_battery : 0,
firmware_version: 54,
number_of_starts : 1,
time_step : 1,
param_id: 0,
redundancy: 0,
number_of_values: 4,
sensitivity: 0
},
warnings: [],
errors: []
}indexindex starting at 0 when the device startsmessage_typetype of messageincrementsarray containing the index increments. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...]. No increments available for 1min productspowersarray containing the load curve values in W. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...]indexesarray containing the indexes. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...]. No indexes available for 1min productsmeter_type"Electromechanical (Position A)" or "Electronic (Position B)"low_battery1 means the battery is low / 0 otherwisefirmware_versionfirmware version as an integernumber_of_startsnumber of starts of this sensortime_stepnumber of minutes for each measurementparam_idNAredundancywhen activated, previous increments are repeated (only available in _ap products)number_of_valuesnumber of measurement values in each T1 uplink (only available in _ap products)sensitivity0 = highest sensitivity / 3 = lowest sensitivity (only available in _ap products)
FM432e-i
Example of output JSON Object:
data: {
index : 1256,
message_type : "T1",
increments : [1,2,3,4],
powers: [1,2,3,4],
indexes: [1,2,3,4],
meter_type : "Electromechanical (Position A)",
low_battery : 0,
firmware_version: 54,
number_of_starts : 1,
time_step : 1,
param_id: 0,
redundancy: 0,
number_of_values: 4,
sensitivity: 0
},
warnings: [],
errors: []
}indexindex starting at 0 when the device startsmessage_typetype of messageincrementsarray containing the index increments. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...]. No increments available for 1min productspowersarray containing the load curve values in W. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...]indexesarray containing the indexes. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...]. No indexes available for 1min productsmeter_type"Electromechanical (Position A)" or "Electronic (Position B)"low_battery1 means the battery is low / 0 otherwisefirmware_versionfirmware version as an integernumber_of_startsnumber of starts of this sensortime_stepnumber of minutes for each measurementparam_idNAredundancywhen activated, previous increments are repeated (only available in _ap products)number_of_valuesnumber of measurement values in each T1 uplink (only available in _ap products)sensitivity0 = highest sensitivity / 3 = lowest sensitivity (only available in _ap products)
FM432g
Example of output JSON Object:
data: {
index : 1256,
message_type : "T1",
increments : [1,2,3,4],
indexes: [1,2,3,4],
meter_type : "Gas",
firmware_version: 54,
number_of_starts : 1,
time_step : 1,
param_id: 0,
redundancy: 0,
number_of_values: 4
},
warnings: [],
errors: []
}indexindex starting at 0 when the device startsmessage_typetype of messageincrementsarray containing the index increments. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...].indexesarray containing the indexes. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...].meter_type"Gas"firmware_versionfirmware version as an integernumber_of_startsnumber of starts of this sensortime_stepnumber of minutes for each measurementparam_idNAredundancywhen activated, previous increments are repeated (only available in _ap products)number_of_valuesnumber of measurement values in each T1 uplink (only available in _ap products)
FM432p
Example of output JSON Object:
data: {
index : 1256,
message_type : "T1",
increments : [1,2,3,4],
indexes: [1,2,3,4],
meter_type : "Pulse",
firmware_version: "3.3.6",
number_of_starts : 1,
time_step : 1,
redundancy: 0,
number_of_values: 4
},
warnings: [],
errors: []
}indexindex starting at 0 when the device startsmessage_typetype of messageincrementsarray containing the index increments. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...].indexesarray containing the indexes. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...].meter_type"Pulse"firmware_versionfirmware version as a stringnumber_of_startsnumber of starts of this sensortime_stepnumber of minutes for each measurementredundancywhen activated, previous increments are repeated (only available in _ap products)number_of_valuesnumber of measurement values in each T1 uplink (only available in _ap products)
FM432ir
Example of output JSON Object:
data: {
index : 1256,
message_type : "T1",
increments : [1,2,3,4],
powers: [1,2,3,4],
indexes: [1,2,3,4],
meter_type : "Electromechanical (Position A)",
low_battery : 0,
firmware_version: 54,
number_of_starts : 1,
time_step : 1,
scaler_e_pos: 0.1,
scaler_e_sum: null,
scaler_e_neg: 0.1,
obis: "E-POS values (OBIS code 1.8.0)",
param_id: 0,
redundancy: 0,
number_of_values: 4,
sensitivity: 0
},
warnings: [],
errors: []
}indexThe index starts at 0 when the device powers on for Electromechanical meters, and reflects the actual meter index if using mME. If "E_POS and E_NEG" is activated, this variable will become an object in the format{e_pos: 1, e_neg: 2}message_typetype of messageincrementsarray containing the index increments. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...]If "E_POS and E_NEG" is activated you will found two 2-dimensional arrays (first one for OBIS code 1.8.0, second one for OBIS code 2.8.0):[[[2024-08-02T19:30:00.000Z, 1],...],[[2024-08-02T19:30:00.000Z, 1],...]]powersarray containing the load curve values in W. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...]If "E_POS and E_NEG" is activated you will found two 2-dimensional arrays (first one for OBIS code 1.8.0, second one for OBIS code 2.8.0):[[[2024-08-02T19:30:00.000Z, 1],...],[[2024-08-02T19:30:00.000Z, 1],...]]indexesarray containing the indexes. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 1],...]If "E_POS and E_NEG" is activated you will found two 2-dimensional arrays (first one for OBIS code 1.8.0, second one for OBIS code 2.8.0):[[[2024-08-02T19:30:00.000Z, 1],...],[[2024-08-02T19:30:00.000Z, 1],...]]meter_type"Electromechanical (Position A)" or "mME (Position B)"low_battery1 means the battery is low / 0 otherwisefirmware_versionfirmware version as an integernumber_of_startsnumber of starts of this sensortime_stepnumber of minutes for each measurementscaler_e_posscaler for obis code 1.8.0scaler_e_sumscaler for obis code 16.8.0scaler_e_negscaler for obis code 2.8.0obis"E-POS values (OBIS code 1.8.0)" / "E-SUM values (OBIS code 16.8.0)" / "E-NEG values (OBIS code Z.8.0)" / "E-POS values (OBIS code 1.8.0) and E-NEG values (OBIS code 2.8.0)"param_idNAredundancywhen activated, previous increments are repeated (only available in _ap products)number_of_valuesnumber of measurement values in each T1 uplink (only available in _ap products)sensitivity0 = highest sensitivity / 3 = lowest sensitivity (only available in _ap products)
FM432t
Example of output JSON Object:
data: {
message_type : "T1",
temperatures : [20.12,20.24,23,22.5],
meter_type : "Temperature",
firmware_version: "5.0.2",
max_temp: 18.5,
min_temp: 21.5,
max_temp_variation: 0.5,
sampling : "average"
},
warnings: [],
errors: []
}message_typetype of messagetemperaturesarray containing the temperatures in °C. IfrecvTimeis provided, it will be a 2-dimensional array containing JavaScript Date objects[[2024-08-02T19:30:00.000Z, 20.5],...].meter_type"Temperature"firmware_versionfirmware version as a stringmax_tempmaximum temperature recorded in the last 24hmin_tempminimum temperature recorded in the last 24hmax_temp_variationmaximum variation recorded in the last 24hsampling"average" values or "instantaneous"
TAGAWATT
Example of output JSON Object:
data: {
time_shifting : 0,
message_type : "T1",
tags : [{
id_tag: 44559,
id_tag_str: "0000ae0f",
cumulative_energy: 15226,
},
{
id_tag: 44558,
id_tag_str: "0000ae0e",
cumulative_current: 152.26,
}],
},
warnings: [],
errors: []
}time_shifting(integer): Delay in minutes before the data was actually sent (used for time correction, e.g., in case of buffering or transmission delay). A value of 0 means real-time or no shift.message_type(string): Type of message. Example: "T1" for standard telemetry.tags(array): Array of tag objects (sensors) containing measurement data.id_tag(integer): Internal numeric identifier of the tag.id_tag_str(string): Hexadecimal string identifier (used in MQTT topics and interfaces).cumulative_energy(integer, optional): Energy in Wh, present only for power tags.cumulative_current(float, optional): Current in A, present only for current tags.- Tags without
cumulative_energyorcumulative_currentare typically voltage tags.