Overhaul garage door example (#93)

* script for controlling garage that is aware of door states

* Overhaul garage door example

Hardware now calls for reed relay in order to be able to tell the state
of the switch. This way, we can have distinct open/close operations
that error if the door is already in that state. Allows for potential
better integration with home automation systems.

* Prepare for push to GitHub

* Restore defaults

* Make HTTP auth realm match zeroconf networking name
This commit is contained in:
Marcos
2017-07-01 15:18:11 -05:00
committed by GitHub
parent a96ebc6196
commit adde150009
8 changed files with 190 additions and 36 deletions

32
http/garage_door.html Normal file
View File

@@ -0,0 +1,32 @@
<html>
<head>
<title>Garage control</title>
</head>
<body>
<div align="center">
<h2>Door 1</h2>
<form action="garage_door.lua" method="post"/>
<input type="hidden" name="door" value="1"/>
<input type="submit" name="action" value="status"/>
<input type="submit" name="action" value="open"/>
<input type="submit" name="action" value="close"/>
<input type="submit" name="action" value="toggle"/>
</form>
<h2>Door 2</h2>
<form action="garage_door.lua" method="post"/>
<input type="hidden" name="door" value="2"/>
<input type="submit" name="action" value="status"/>
<input type="submit" name="action" value="open"/>
<input type="submit" name="action" value="close"/>
<input type="submit" name="action" value="toggle"/>
</form>
</div>
</body>
</html>