SonOff home page 200109.1847

Menu:

SonOff API LED On
SonOff API LED OFF
SonOff API RELAY On
SonOff API RELAY OFF

Wifi setup (setup_gadget, 192.168.4.1)
Wifi clear, effacement configuration WIFI
Affichage des températures, affiche les températures mesurées

<% if (vars ~= nil) then zout("
vars: "..vars.."
") for k, v in string.gmatch(vars, "(%w+)=(%w+%p+%w+)&*") do _GET[k] = v zout(k..": "..v.."
") end end if (_GET.SetupWIFI == "true") then print("toto") zout("WIFI SETUP MODE") file.putcontents("_setup_wifi_", "") tmr.create():alarm(3*1000, tmr.ALARM_SINGLE, function() node.restart() end) end if (_GET.RESTART == "true") then zout("oups restart...") end %>
Etat de la LED: <% if gpio.read(zLED) == 1 then zout("OFF") else zout("ON") end %>
Etat du RELAY: <% zRELAY=6 if gpio.read(zRELAY) == 0 then zout("OFF") else zout("ON") end %>

<% a,b,c = wifi.sta.getip() if a ~= nil then zout("IP: "..a.."     MASK: "..b.."     GATEWAY: "..c.."
") end collectgarbage() zout("RAM: "..node.heap()) %>