From 7eba612882ffddb91e026ad992a6592ea1b00aa7 Mon Sep 17 00:00:00 2001 From: Tilo <63953734+ullriti@users.noreply.github.com> Date: Thu, 14 Nov 2024 20:45:45 +0100 Subject: [PATCH] MLR003 REV2.4: New Temperature_Drop_Detection Bit (#831) * MLR003 REV2.4: New Temperature_Drop_Detection Bit * Update mlr003-codec.yaml --------- Co-authored-by: Jaime Trinidad <81958808+Jaime-Trinidad@users.noreply.github.com> --- vendor/micropelt/mlr003-codec.yaml | 4 ++++ vendor/micropelt/mlr003.js | 1 + 2 files changed, 5 insertions(+) diff --git a/vendor/micropelt/mlr003-codec.yaml b/vendor/micropelt/mlr003-codec.yaml index 82dd02e920..2f223ab514 100644 --- a/vendor/micropelt/mlr003-codec.yaml +++ b/vendor/micropelt/mlr003-codec.yaml @@ -15,6 +15,7 @@ uplinkDecoder: Flow_Temperature: 106.00 Ambient_Sensor_Raw: 60.75 Ambient_Temperature: 40.25 + Temperature_Drop_Detection: 0 Energy_Storage: 0 Harvesting_Active: 1 Ambient_Sensor_Failure: 0 @@ -42,6 +43,7 @@ uplinkDecoder: Flow_Temperature: 13.50 Ambient_Sensor_Raw: 15.00 Ambient_Temperature: 15.00 + Temperature_Drop_Detection: 0 Energy_Storage: 0 Harvesting_Active: 0 Ambient_Sensor_Failure: 0 @@ -69,6 +71,7 @@ uplinkDecoder: Flow_Temperature: 33 Ambient_Sensor_Raw: 28.75 Ambient_Temperature: 24 + Temperature_Drop_Detection: 0 Energy_Storage: 0 Harvesting_Active: 1 Ambient_Sensor_Failure: 0 @@ -94,6 +97,7 @@ uplinkDecoder: Flow_Temperature: 22 Ambient_Sensor_Raw: 19.75 Ambient_Temperature: 19.25 + Temperature_Drop_Detection: 0 Energy_Storage: 0 Harvesting_Active: 0 Ambient_Sensor_Failure: 0 diff --git a/vendor/micropelt/mlr003.js b/vendor/micropelt/mlr003.js index aaf20befe7..ba712a5376 100644 --- a/vendor/micropelt/mlr003.js +++ b/vendor/micropelt/mlr003.js @@ -8,6 +8,7 @@ function decodeUplink(input) { Flow_Temperature: input.bytes[2]*0.5, Ambient_Sensor_Raw: input.bytes[3]*0.25, Ambient_Temperature: input.bytes[4]*0.25, + Temperature_Drop_Detection: input.bytes[5]>>7 & 0x01, Energy_Storage: input.bytes[5]>>6 & 0x01, Harvesting_Active: input.bytes[5]>>5 & 0x01, Ambient_Sensor_Failure: input.bytes[5]>>4 & 0x01,