From 3bda10cef9d234a4703f866e2c572050b1fdf102 Mon Sep 17 00:00:00 2001 From: Nikolay Abrosimov Date: Tue, 3 Mar 2026 17:22:00 +0400 Subject: [PATCH] Tag battery voltage has been added to nwave/nps405 user_registration uplink message protocol --- vendor/nwave/nps405-codec.yaml | 3 ++- vendor/nwave/nps405.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vendor/nwave/nps405-codec.yaml b/vendor/nwave/nps405-codec.yaml index da9787eefc..56c5c8967a 100644 --- a/vendor/nwave/nps405-codec.yaml +++ b/vendor/nwave/nps405-codec.yaml @@ -16,7 +16,7 @@ uplinkDecoder: - description: User Registration input: fPort: 10 - bytes: [0xD1, 0x1F, 0x34, 0x56, 0x78] + bytes: [0xD1, 0x20, 0x1F, 0x34, 0x56, 0x78] output: data: type: user_registration @@ -24,6 +24,7 @@ uplinkDecoder: previous_state_duration: 160 previous_state_duration_error: 4 previous_state_duration_overflow: false + tag_battery_voltage: 3.2 tag_id: '1F345678' - description: Heartbeat diff --git a/vendor/nwave/nps405.js b/vendor/nwave/nps405.js index 72ff35a2f1..efc8264a7c 100644 --- a/vendor/nwave/nps405.js +++ b/vendor/nwave/nps405.js @@ -110,8 +110,8 @@ function decodeUplink(input) { data.previous_state_duration_error = null; data.previous_state_duration_overflow = null; } - - data.tag_id = (bytes[1] << 24 | bytes[2] << 16 | bytes[3] << 8 | bytes[4]).toString(16).toUpperCase(); + data.tag_battery_voltage = bytes[1] * 0.1; + data.tag_id = (bytes[2] << 24 | bytes[3] << 16 | bytes[4] << 8 | bytes[5]).toString(16).toUpperCase(); break; }