From e535a1c918dbc6d50fb89f1bfea798a257113f25 Mon Sep 17 00:00:00 2001 From: Markus Reschka Date: Sun, 29 Mar 2020 19:46:23 +0200 Subject: [PATCH] Updated mqtt response to current mqtt package --- helios.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helios.js b/helios.js index 5447f55..8b4704d 100644 --- a/helios.js +++ b/helios.js @@ -176,10 +176,10 @@ function queueWorker(task, callback) { task.self.modbusClient.readHoldingRegisters(1, task.heliosVar.modbuslen).then( function (resp) { log.debug('Helios get task modbus read for varname ' + task.heliosVar.variable + ' fininshed: ' + - JSON.stringify(resp) + ' payload in ASCII: ' + resp.payload.toString('ascii')); + JSON.stringify(resp) + ' payload in ASCII: ' + resp.response._body.valuesAsBuffer.toString('ascii')); //V-Teil prüfen, abschneiden und nur Wert weitergeben: - var responseArr = resp.payload.toString('ascii').split("="); + var responseArr = resp.response._body.valuesAsBuffer.toString('ascii').split("="); if (responseArr.length > 1 && responseArr[0] == task.heliosVar.variable) { responseArr.shift();