X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/82c945cbf3ea97175cd2fba31f8ba92b9aade8ba..5f23c8a7c56799750221a9c2d8e904e154f8c515:/bin/weathermon?ds=inline 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