From e6a783dea4ee708849943125e1fe55c4715c6431 Mon Sep 17 00:00:00 2001 From: Bluepr1nt Date: Wed, 29 Mar 2017 14:17:38 +0200 Subject: [PATCH] t --- mean-app/server/routes/thingapi.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mean-app/server/routes/thingapi.js b/mean-app/server/routes/thingapi.js index ce725cd..fdf219c 100644 --- a/mean-app/server/routes/thingapi.js +++ b/mean-app/server/routes/thingapi.js @@ -32,12 +32,14 @@ var parseTelegram = function(data, callback){ //TOE1 regx = /1-0:1\.8\.1\((\d{5,6}\.\d{3})\*kWh\)/g found = str.match(regx); + found = found[0].split(")"); + found = found[0].split("("); console.log("found:"); console.log(found[0]); console.log(found[1]); if(found) - toe1 = found[0]; + toe1 = found[1]; console.log(toe1); //TOE2