Permalink
Browse files

HASP 0.30

  • Loading branch information...
aderusha committed Oct 15, 2018
1 parent 3ce5f5f commit e417b9c19d81da0816de589ddf539d83c09fb715
View
Binary file not shown.
@@ -72,7 +72,7 @@ MQTTClient mqttClient(256);
ESP8266WebServer webServer(80);
ESP8266HTTPUpdateServer httpOTAUpdate;
const float haspVersion = 0.291; // Current HASP software release version
const float haspVersion = 0.30; // Current HASP software release version
byte nextionReturnBuffer[128]; // Byte array to pass around data coming from the panel
uint8_t nextionReturnIndex = 0; // Index for nextionReturnBuffer
uint8_t nextionActivePage = 0; // Track active LCD page
@@ -133,7 +133,7 @@ void setup()
sendNextionCmd("rest"); // reset the LCD
// Uncomment for testing, clears all saved settings on each boot
// clearSavedConfig();
//clearSavedConfig();
readSavedConfig(); // Check filesystem for a saved config.json
setupWifi(); // Start up networking
@@ -1716,10 +1716,23 @@ void webHandleLcdUpload()
else
{
debugPrintln(F("LCD OTA: Failure"));
delay(5000); // delay for user to read output
espReset();
}
}
}
else if (upload.status == UPLOAD_FILE_ABORTED)
{
debugPrintln(F("LCD OTA: ERROR: upload.status returned: UPLOAD_FILE_ABORTED"));
delay(5000); // delay for user to read output
espReset();
}
else
{
debugPrintln(String(F("LCD OTA: upload.status returned: ")) + String(upload.status));
delay(5000); // delay for user to read output
espReset();
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -1983,4 +1996,4 @@ void debugPrint(String debugText)
handleTelnetClient();
}
#endif
}
}
@@ -19,9 +19,7 @@ If you're running Windows and you just want to get started without dealing with
* Navigate to the HASP firmware image you downloaded and click `Open` to select it
* Switch back to the `Operation` tab and click `Flash(F)`
Now proceed to the [Nextion HMI](02_Nextion_HMI.md) document to flash firmware to the LCD.
---
Now proceed to [First-time Setup](#first-time-setup) to connect to your wireless network.
## Arduino IDE
@@ -38,6 +36,16 @@ Next you will need to add several libraries to your Arduino environment. [Follo
To enable future firmware updates you'll need to modify settings in the Arudino IDE for 1M SPIFFs, leaving 3M free for code and updates. In the Arduino IDE select `Tools` > `Flash Size:` > `4M (1M SPIFFS)`. If you're using [PlatformIO](https://platformio.org/) instead of Arduino, [modify the build flags](http://docs.platformio.org/en/latest/platforms/espressif8266.html#flash-size) to include `-Wl,-Teagle.flash.4m1m.ld`
![Arduino Erase All Flash Contents](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/Arduino_1M_SPIFFS.png?raw=true)
**Warning:** [ArduinoJson as installed by the Arduino IDE is a beta release](https://github.com/bblanchon/ArduinoJson/issues/756), which currently doesn't work with the existing codebase. You'll need to manually install the latest stable 5.x release for this sketch to work.
ESP8266 for Arduino version 2.4.2 breaks LCD firmware uploading from the web page, use version 2.4.1 of the ESP8266 board manager package to compile until this error is resolved. If using PlatformIO, set the directive `platform = espressif8266@1.7.3` in your `platformio.ini`.
## First-time Setup
Once your device has been flashed, restart it and connect to the WiFi SSID and password displayed on the LCD panel (or serial output if you don't have the LCD ready). You should be prompted to open a [configuration website](http://192.168.4.1) to find your WiFi network and password. You can set the MQTT broker information and admin credentials now, or use the web interface to do so later. Once you `save settings` the device will connect to your network. Congratulations, you are now online!
![WiFi Config 0](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/WiFi_Config_0.png?raw=true) ![WiFi Config 1](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/WiFi_Config_1.png?raw=true) ![WiFi Config 2](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/Images/WiFi_Config_2.png?raw=true)
## Firmware updates
After the initial firmware deployment you should be able to upload new firmware through the web admin interface or [using Arduino OTA updates](https://randomnerdtutorials.com/esp8266-ota-updates-with-arduino-ide-over-the-air/) without connecting to your device via USB.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
View
@@ -16,7 +16,7 @@ If you want to jump right in, follow the steps below in order to build and setup
### Step 1 - [Arduino Sketch](01_Arduino_Sketch.md)
Get started with deploying your code to the ESP8266.
Get started with deploying your code to the ESP8266 and getting it connected to WiFi and your MQTT broker.
### Step 2 - [Nextion HMI](02_Nextion_HMI.md)
View
@@ -1,6 +1,6 @@
{
"d1_mini": {
"version": "0.29",
"version": "0.30",
"firmware": "http://haswitchplate.com/update/HASwitchPlate.ino.d1_mini.bin"
},
"NX3224T024_011R": {

0 comments on commit e417b9c

Please sign in to comment.