Lots of remote changes.

dht is now processing commands!
hurray!
This commit is contained in:
d-popov
2020-04-09 12:16:02 +03:00
parent 794eda52af
commit b628ade4dd
18 changed files with 1810 additions and 39 deletions

20
views/accontrol.ejs Normal file
View File

@@ -0,0 +1,20 @@
<h2>AC Control for <%= model.user.username %></h2>
<form action="/n/accontrol" class="form-inline" method="POST">
<div class="form-group">
<input type='checkbox' name='power' <%= model.data.power|true ? "checked" : "" %> data-toggle='toggle'
data-style='android' data-on='ON' data-off='Off' />
</div>
<div class="form-group">
<input type='checkbox' name='heat' <%= model.data.heat|true ? "checked" : "" %> data-toggle='toggle' data-on='Heat'
data-off='Cool' data-onstyle='warning' data-offstyle='info' />
</div>
<div class="form-group">
<input type='number' name='temp' value='<%= model.data.temp|23%>' min='16' max='32' step='0.5' />
</div>
<div class="form-group">
<!-- <input type='checkbox' name='econo'<%= model.data.econo ? "checked" : "" %> data-toggle='toggle' data-style='android' data-on='Eco' data-off='Normal' data-onstyle='info' data-offstyle='warning'/> -->
<input type='submit' class='button' value='SET!'>
</div>
</form>
INFO:
<%= model.info %>