From e8407c8d4eec5a1eafb159dc9e33433b3d786493 Mon Sep 17 00:00:00 2001 From: Watteco <87481956+Watteco@users.noreply.github.com> Date: Thu, 13 Jul 2023 17:08:39 +0200 Subject: [PATCH] Update modbus-sensor.js shift 3 bytes to show the modbus payload --- vendor/nke-watteco/modbus-sensor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/nke-watteco/modbus-sensor.js b/vendor/nke-watteco/modbus-sensor.js index 04a8748b9d..1c84b9233a 100644 --- a/vendor/nke-watteco/modbus-sensor.js +++ b/vendor/nke-watteco/modbus-sensor.js @@ -976,7 +976,7 @@ function Decoder(bytes, port) { // initMultiModbusValue() stdData.value.multimodbus_payload = "" - bytes.slice(index+1).forEach((value, i) => bytes[i] = value.toString( 16 ).toUpperCase().length === 1 ? "0" + value.toString( 16 ).toUpperCase() : value.toString( 16 ).toUpperCase()) + bytes.slice(index+4).forEach((value, i) => bytes[i] = value.toString( 16 ).toUpperCase().length === 1 ? "0" + value.toString( 16 ).toUpperCase() : value.toString( 16 ).toUpperCase()) stdData.value.multimodbus_payload = bytes.join('') } tab.push(stdData); @@ -1098,4 +1098,4 @@ function decodeUplink(input) { errors: [] }; return decodedInput.data.data -} \ No newline at end of file +}