From 5bc9573c3235d959463e75f6103b027d6f5efe84 Mon Sep 17 00:00:00 2001 From: Roman Bazalevsky Date: Mon, 18 Feb 2019 13:16:57 +0300 Subject: [PATCH 1/1] =?utf8?q?=D0=90=D0=B2=D1=82=D0=BE=D0=BF=D0=B5=D1=80?= =?utf8?q?=D0=B5=D0=BF=D0=BE=D0=B4=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD?= =?utf8?q?=D0=B8=D0=B5=20=D0=BA=20MQTT=20=D0=B8=20=D0=B4=D0=BB=D1=8F=20?= =?utf8?q?=D1=81=D0=BB=D1=83=D1=87=D0=B0=D1=8F=20=D0=BE=D0=B1=D1=80=D0=B0?= =?utf8?q?=D0=B1=D0=BE=D1=82=D0=BA=D0=B8=20=D0=BD=D0=B5-JSON=20(=D0=B2?= =?utf8?q?=D1=81=D0=B5=20=D0=B5=D1=89=D0=B5=20=D0=B8=D1=81=D0=BF=D0=BE?= =?utf8?q?=D0=BB=D1=8C=D0=B7=D1=83=D0=B5=D1=82=D1=81=D1=8F=20=D0=BD=D0=B0?= =?utf8?q?=20=D0=BE=D0=B4=D0=BD=D0=BE=D0=BC=20=D1=83=D1=81=D1=82=D1=80?= =?utf8?q?=D0=BE=D0=B9=D1=81=D1=82=D0=B2=D0=B5).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/weathermon | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/weathermon b/bin/weathermon index ade5bfa..fdf092a 100755 --- a/bin/weathermon +++ b/bin/weathermon @@ -248,6 +248,9 @@ function processLine(str) return '{'..name..'}' end end) + if not mqtt_client:socket() then + mqtt_client:reconnect() + end mqtt_client:publish(mqtt_path,v,0,false) mqtt_client:loop() end @@ -289,6 +292,9 @@ function processLine(str) return '{'..name..'}' end end) + if not mqtt_client:socket() then + mqtt_client:reconnect() + end mqtt_client:publish(mqtt_path,msg_body,0,false) mqtt_client:loop() end -- 2.34.1