Essayé de déployer mon nouveau système sur un SonOff, pour l'instant cela fonctionne, mais il y a très peu de RAM :-(

This commit is contained in:
Christian Zufferey
2020-03-01 14:07:47 +01:00
parent 1e895448ed
commit 94f1dfead4
13 changed files with 444 additions and 94 deletions

View File

@@ -8,26 +8,31 @@
<title>API SonOff</title>
</head>
<body>
<h1>API SonOff zf200112.1706</h1>
<h1>API SonOff zf200118.1812</h1>
<a href="/">Home...</a><br><br>
<%
if _GET.LED == "on" then
gpio.write(zLED, gpio.LOW) gpio.mode(zLED, gpio.OUTPUT)
zout("LED=".._GET.LED.."<br>")
zout('<a href="api_sonoff.html?LED=off"> Off</a><br>')
end
if _GET.LED == "off" then
gpio.write(zLED, gpio.HIGH) gpio.mode(zLED, gpio.OUTPUT)
zout("LED=".._GET.LED.."<br>")
zout('<a href="api_sonoff.html?LED=on"> On</a>')
end
%>
<%
if _GET.RELAY == "on" then
gpio.mode(zRELAY, gpio.OUTPUT) gpio.write(zRELAY, gpio.HIGH)
zout("RELAY=".._GET.RELAY.."<br>")
zout('<a href="api_sonoff.html?RELAY=off"> Off</a><br>')
end
if _GET.RELAY == "off" then
gpio.mode(zRELAY, gpio.OUTPUT) gpio.write(zRELAY, gpio.LOW)
zout("RELAY=".._GET.RELAY.."<br>")
zout('<a href="api_sonoff.html?RELAY=on"> On</a>')
end
%>
</body>