Skip to content

Commit 40eb7d5

Browse files
committed
Merged latest features from 'sidoh/v1.7.0' into dev
2 parents 8e421aa + dd74c22 commit 40eb7d5

24 files changed

Lines changed: 521 additions & 1676 deletions

.build_web.py

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from shutil import copyfile
2-
from subprocess import check_output
2+
from subprocess import check_output, CalledProcessError
33
import sys
44
import os
55
import platform
@@ -20,14 +20,25 @@ def build_web():
2020
os.chdir("web")
2121
print("Attempting to build webpage...")
2222
try:
23-
print check_output(["npm", "install"])
24-
print check_output(["node_modules/.bin/gulp"])
23+
if platform.system() == "Windows":
24+
print check_output(["npm.cmd", "install", "--only=dev"])
25+
print check_output(["node_modules\\.bin\\gulp.cmd"])
26+
else:
27+
print check_output(["npm", "install"])
28+
print check_output(["node_modules/.bin/gulp"])
2529
copyfile("build/index.html.gz.h", "../dist/index.html.gz.h")
26-
30+
except OSError as e:
31+
print "Encountered error OSError building webpage:", e
32+
if e.filename:
33+
print "Filename is", e.filename
34+
print "WARNING: Failed to build web package. Using pre-built page."
35+
except CalledProcessError as e:
36+
print e.output
37+
print "Encountered error CalledProcessError building webpage:", e
38+
print "WARNING: Failed to build web package. Using pre-built page."
2739
except Exception as e:
28-
print "Encountered error building webpage: ", e
40+
print "Encountered error", type(e).__name__, "building webpage:", e
2941
print "WARNING: Failed to build web package. Using pre-built page."
30-
pass
3142
finally:
3243
os.chdir("..");
3344

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ You can find pre-compiled firmware images on the [releases](https://github.com/b
7171

7272
This project uses [WiFiManager](https://github.com/tzapu/WiFiManager) to avoid the need to hardcode AP credentials in the firmware.
7373

74-
When the ESP powers on, you should be able to see a network named "ESPXXXXX", with XXXXX being an identifier for your ESP. Connect to this AP and a window should pop up prompting you to enter WiFi credentials.
74+
When the ESP powers on, you should be able to see a network named "ESPXXXXX", with XXXXX being an identifier for your ESP. Connect to this AP and a window should pop up prompting you to enter WiFi credentials. If your board has a built-in LED (or you wire up an LED), it will [flash to indicate the status](#led-status).
7575

7676
The network password is "**milightHub**".
7777

@@ -89,6 +89,19 @@ The HTTP endpoints (shown below) will be fully functional at this point. You sho
8989

9090
![Web UI](http://imgur.com/XNNigvL.png)
9191

92+
## LED Status
93+
94+
Some ESP boards have a built-in LED, on pin #2. This LED will flash to indicate the current status of the hub:
95+
96+
* Fast flash (on/off once per second) means the Wifi is not configured. See [Configure Wifi](#configure-wifi) to configure the hub.
97+
* Occasional blips of light (a flicker of light every 1.5 seconds) means the hub is on wifi and ready to operate.
98+
* Rapid blips of light for brief periods (three rapid flashes) means packets are either detected from a device or are being sent to a device.
99+
* Solid light means the Wifi waited to be configured and gave up, or something went wrong with wifi configuration.
100+
101+
You can configure the LED pin from the web console. Note that pin means the GPIO number, not the D number ... for example, D2 is actually GPIO4 and therefore its pin 4. If you specify the pin as a negative number, it will reverse the LED (the built-in LED on pin 2 is reversed, so the default is -2).
102+
103+
If you want to wire up your own LED on a pin, such as on D2/GPIO4, put a wire from D2 to one side of a 220 ohm resister. On the other side, connect it to the positive side (the longer wire) of a 3.3V LED. Then connect the negative side of the LED (the shorter wire) to ground. If you use a different voltage LED, or a high current LED, you will need to add a driver circuit.
104+
92105
## REST endpoints
93106

94107
1. `GET /`. Opens web UI.
@@ -234,3 +247,8 @@ You can select between versions 5 and 6 of the UDP protocol (documented [here](h
234247
## Acknowledgements
235248

236249
* @WoodsterDK added support for LT8900 radios.
250+
251+
252+
253+
[info-license]: https://github.com/sidoh/esp8266_milight_hub/blob/master/LICENSE
254+
[shield-license]: https://img.shields.io/badge/license-MIT-blue.svg

dist/index.html.gz.h

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

lib/ESP8266WebServer/keywords.txt

Lines changed: 0 additions & 36 deletions
This file was deleted.

lib/ESP8266WebServer/library.properties

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)