Start MQTT without Telent Server

This commit is contained in:
Ollo 2021-01-15 18:02:17 +01:00
parent 86a9503de9
commit 34e47c9a39

View File

@ -72,7 +72,7 @@ function displayTime()
invertRows=true invertRows=true
end end
local characters = displayword.countChars(words) local characters = displayword.countChars(words)
ledBuf = displayword.generateLEDs(words, colorBg, color, color1, color2, color3, color4, invertRows, characters) ledBuf = displayword.generateLEDs(words, colorBg, color, color1, color2, color3, color4, invertRows, characters)
end end
displayword = nil displayword = nil
if (ledBuf ~= nil) then if (ledBuf ~= nil) then
@ -152,7 +152,7 @@ function normalOperation()
print('IP: ',wifi.sta.getip()) print('IP: ',wifi.sta.getip())
-- Here the WLAN is found, and something is done -- Here the WLAN is found, and something is done
print("Solving dependencies") print("Solving dependencies")
local dependModules = { "timecore" , "wordclock", "telnet", "mqtt" } local dependModules = { "timecore" , "wordclock", "mqtt" }
for _,mod in pairs(dependModules) do for _,mod in pairs(dependModules) do
print("Loading " .. mod) print("Loading " .. mod)
mydofile(mod) mydofile(mod)
@ -164,17 +164,18 @@ function normalOperation()
syncTimeFromInternet() syncTimeFromInternet()
setupCounter=setupCounter-1 setupCounter=setupCounter-1
elseif (setupCounter > 3) then elseif (setupCounter > 3) then
if (startTelnetServer ~= nil) then
startTelnetServer()
else
print("NO Telent found")
end
setupCounter=setupCounter-1
elseif (setupCounter > 2) then
if (startMqttClient ~= nil) then if (startMqttClient ~= nil) then
startMqttClient() startMqttClient()
else else
print("NO Mqtt found") print("NO Mqtt found")
mydofile("telnet")
end
setupCounter=setupCounter-1
elseif (setupCounter > 2) then
if (startTelnetServer ~= nil) then
startTelnetServer()
else
print("NO Telent found")
end end
setupCounter=setupCounter-1 setupCounter=setupCounter-1
else else