Uptime: ".. tostring(tmr.time()) .. " seconds" .. toggle_lights_form .. toggle_lights .. "
" .. get_info("hw") .. get_info("build_config") .. get_info("sw_version") .. "
")
+ res:send("Uptime: ".. tostring(tmr.time()) .. " seconds" .. toggle_lights_form .. toggle_mode .. "
" .. get_info("hw") .. get_info("build_config") .. get_info("sw_version") .. "
")
res:send("\r\n")
elseif req.url == "/toggle" then
res:send(nil, 303)
@@ -235,6 +255,8 @@ end
function connect_wifi()
print("Trying to connect to wifi with captive portal")
+ wifi.sta.disconnect()
+ wifi.sta.clearconfig()
enduser_setup.start(
function()
if wifi.sta.getip() ~= nil then