From ab35b815fb8c6bd1cd014bd0ef9aa819ba01dd72 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 23 May 2023 13:19:49 +0200 Subject: [PATCH] fix --- src/preprocess.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/preprocess.py b/src/preprocess.py index 586d907..41562ed 100644 --- a/src/preprocess.py +++ b/src/preprocess.py @@ -104,10 +104,10 @@ def splitTopic(topic): deviceId = 'mains', variableId = r[0] elif (len(r) == 2): - (deviceId, variableid) = r + (deviceId, variableId) = r else: raise InvalidTopicException(topic) - return (appId, converterId, deviceId, variableid) + return (appId, converterId, deviceId, variableId) def mqttOnConnectCallback(client, userdata, flags, rc): logger.info("mqtt connected") @@ -124,7 +124,7 @@ def mqttOnMessageCallback(client, userdata, message): (appId, converterId, deviceId, variableId) = splitTopic(topic) dbh = DbOp(config) - variable = dbh.getVariable(appId, converterId, deviceId, variableid) + variable = dbh.getVariable(appId, converterId, deviceId, variableId) measurement = { "application": variable["application"], "variable": variable["variable"],