X-Git-Url: https://git.rvb.name/openhab-process.git/blobdiff_plain/26d1617608ea0272ebb1373e6f489bc771091b21..f814617cb418b1557408bdd97eb265618a45b712:/mqtt-bt/scan-beacons?ds=sidebyside diff --git a/mqtt-bt/scan-beacons b/mqtt-bt/scan-beacons index a574f66..fd50f9d 100644 --- a/mqtt-bt/scan-beacons +++ b/mqtt-bt/scan-beacons @@ -55,14 +55,16 @@ end function mqtt_encode(str) if (str) then str = string.gsub (str, "\n", "") + str = string.gsub (str, ":", "-") str = string.gsub (str, "/", "-") + str = string.gsub (str, " ", "_") end return str end function printLog(str) if logging=="yes" then - capture("logger -t beaconmon "..str) + capture("logger -t beaconmon \""..str.."\"") else print(str) end @@ -99,7 +101,7 @@ end function mqtt_pub(path,value) res=mqtt_client:publish(path,value) - printLog("Pub "..path.." "..value.." returned "..res); + printLog("Pub "..path.." returned "..res); return res end