Skip to content

Commit

Permalink
Merge branch 'display_credentials'
Browse files Browse the repository at this point in the history
  • Loading branch information
universam1 committed Sep 28, 2017
2 parents 0cd76ca + 3bea15a commit 6f734ee
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 55 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ script:
- platformio run
deploy:
provider: releases
prerelease: true
api_key:
secure: bU4iotLTrslYAlXQmSoMaGfCsjpM96TrKKne/2gFTlg++EQwjD/Z/i6T59lO7YVwp1GTD3qp/E4vSXfgkEm559mFIKZkd1IT8Vx/hpjX5CU6/OinGNmj1hYJw5M9DI1kQtc0wFDpbyNDnjPpKqBpFmIpqFyJUC7b3vctk/BMPkiiI5ncuBGp2f35M4qN2FedpTWoZdSAVZms7hsKFP4qZcih6stSlncUNf/niLwf78B31r5Td3G1aYQtHkB0BzyGQSgCvVuZ+PBm6zD/EWqRUGo6OWBCgwykbIZlgu45J4q46yQ2uS1CvRf4DFzIWU79bPg26MmxpjFe3oZucITTUtvOSzHFn8b1nuJE8IajYdM1KHSREl8Piej3A446P+JDQPk6ki3jCRyQentaZofI2ePUuqrvsV3iL4qKXMWpX1cOGU2c6nx0vvl/oft4rEcccibGpGZr0RIL7Ebpp7D4DSQ+bM+2XkuFab3W3QdrqrB6A0DOJuJfu/MvxEgkLtlpypZ2Z3g/F/TDgJkLSNEvX9e6kGAAIiIgkKz/zuuy04eNX+jox22TldovjbNSMCDfeeD6ghfKm0Q1+mdZax2dhvldgKOiwcZFL+TozN3AdPkr5GG/9m+dVaUGdrMK/n6uEJ++FZeUmdT8Pa2u/m3w2A4zeqMUWLM4WZMaUDW4cnA=
file: ".pioenvs/d1_mini_stage/firmware.bin"
Expand Down
27 changes: 7 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
iSpindel | iSpindle
===================

![Dashboard](/pics/blackedition.png)

**DIY elektronische Bierspindel | electronic Hydrometer**
***https://universam1.github.io/iSpindel***

[![Build Status](https://travis-ci.org/universam1/iSpindel.svg?branch=master)](https://travis-ci.org/universam1/iSpindel)

Expand All @@ -27,6 +28,8 @@ Check out *IOT DEVICE PULLS ITS WEIGHT IN HOME BREWING* at http://hackaday.com/2
***

## News

> 28.09.2017 Firmware 5.5.0: Recall saved Wifi credential thus persisting over configuration changes
> 31.08.2017 iSpindle.py Version 1.3.1: genericTCP Update (local server & prep for public server); Firmware 5.4.2: Memory improvements.
> 29.08.2017 Firmware 5.4.1: Rewrite of the upload class to streamline and allow further data items. Also add iSpindel.de as data server as preset.
> 08.08.2017 [calibration tool](https://universam1.github.io/iSpindel/tools/calibration/calibration.htm) to calculate gravity as alternative to the Excel sheet
Expand All @@ -35,22 +38,6 @@ Check out *IOT DEVICE PULLS ITS WEIGHT IN HOME BREWING* at http://hackaday.com/2
> 22.05.2017 updated build docs
> 22.05.2017 switching build environment to platform.io
> 01.05.2017 Major Firmware update to 5.x
>### Calculate the Gravity
>now within the iSpindel by expression evaluation! The conversion polynom can be stored per iSpindel and sends as an additional metric (without a unit). Therefore, whether Plato or SG is prefered is up to the user defined polynom. There are two variable available `tilt` and `temp`
>
>### [Kalibrierung](docs/Kalibrierung.md)
>
>![Gravity](pics/polynom.png)
>
>### [Firmware update via Web Browser](docs/Firmware.md)
>
>![Offset](pics/firmware.png)
>### Calibrate Hardware Offset
>of the MPU6050. Greatly reduces the issue of not perfectly aligned sensor.
>
>![Offset](pics/offset.png)
> 12.04.2017 Mentioned in http://www.homebrewtalk.com/showthread.php?t=598187
> 01.03.2017 Mentioned in hackaday.com http://hackaday.com/2017/03/01/iot-device-pulls-its-weight-in-home-brewing/
> 23.02.17 English documentation added
Expand Down Expand Up @@ -79,7 +66,7 @@ Check out *IOT DEVICE PULLS ITS WEIGHT IN HOME BREWING* at http://hackaday.com/2
>- Power saving on empty battery
>- added custom Battery conversion factor
>- Bugfixes
>
> 11.12.16 Sources and drawer online
> 11.12.16: FHEM upload documentation & firmware (thanks @MSBannert!)
> 07.12.16: Schematics
Expand All @@ -88,9 +75,9 @@ Check out *IOT DEVICE PULLS ITS WEIGHT IN HOME BREWING* at http://hackaday.com/2
***

> The `iSpindle` is a young project and under heavy development, see german [Hobbybrauer.de Thread](http://hobbybrauer.de/forum/viewtopic.php?f=7&t=11235). Contribution and support is appreciated especially regarding creation and translation of documentation. Feel free to provide a `pull request`.
> The `iSpindle` is under heavy development, see german [Hobbybrauer.de Thread](http://hobbybrauer.de/forum/viewtopic.php?f=7&t=11235). Contribution and support is appreciated especially regarding creation and translation of documentation. Feel free to provide a `pull request`.
>
> Die `iSpindel` befindet sich zur Zeit mitten in der Entwicklung, siehe dazu [den Hobbybrauer.de Thread](http://hobbybrauer.de/forum/viewtopic.php?f=7&t=11235). Mithilfe ist herzlich willkommen und Ergänzungen bitte per Pull Request einreichen. Großes Dank an alle die Unterstützung leisten seitens Grundlagen erarbeiten oder passende Hardware zu finden.
> Die `iSpindel` befindet sich in andauernder Entwicklung, siehe dazu [den Hobbybrauer.de Thread](http://hobbybrauer.de/forum/viewtopic.php?f=7&t=11235). Mithilfe ist herzlich willkommen und Ergänzungen bitte per Pull Request einreichen. Großes Dank an alle die Unterstützung leisten seitens Grundlagen erarbeiten oder passende Hardware zu finden.
![Spindel im Reinwasser](pics/floating.jpg)
![Dashboard](pics/Dashboard.jpg)
Expand Down
25 changes: 0 additions & 25 deletions bin/CHANGELOG

This file was deleted.

Binary file removed bin/iSpindel-5.1.2.bin
Binary file not shown.
Binary file removed bin/iSpindel-5.2.1.bin
Binary file not shown.
Binary file removed bin/iSpindel.3.4.4.bin
Binary file not shown.
Binary file removed bin/iSpindel.4.1.6.bin
Binary file not shown.
Binary file added pics/blackedition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed pics/firmware.png
Binary file not shown.
Binary file removed pics/offset.png
Binary file not shown.
Binary file removed pics/polynom.png
Binary file not shown.
2 changes: 1 addition & 1 deletion pio/lib/Globals/Globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern Ticker flasher;
// #include <stdint.h>

// defines go here
#define FIRMWAREVERSION "5.4.2"
#define FIRMWAREVERSION "5.5.0"


#define API_FHEM true
Expand Down
8 changes: 7 additions & 1 deletion pio/lib/WiFiManagerKT/WiFiManagerKT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,13 @@ void WiFiManager::handleWifi() {
page += "<br/>";
}

page += FPSTR(HTTP_FORM_START);
// page += FPSTR(HTTP_FORM_START);
page += FPSTR(HTTP_FORM_START1);
page += _ssid;
page += FPSTR(HTTP_FORM_START2);
page += _pass;
page += FPSTR(HTTP_FORM_START3);

char parLength[2];
// add the extra parameters to the form
for (int i = 0; i < _paramsCount; i++) {
Expand Down
10 changes: 7 additions & 3 deletions pio/lib/WiFiManagerKT/WiFiManagerKT.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ const char HTTP_HEAD_END[] PROGMEM = "</head><body><div class=\"container\">";
const char HTTP_PORTAL_OPTIONS[] PROGMEM = "<form action=\"/iSpindel\" method=\"get\"><button class=\"btn\">iSpindel Info</button></form><br/><form action=\"/wifi\" method=\"get\"><button class=\"btn\">Configuration</button></form><br/><form action=\"/mnt\" method=\"get\"><button class=\"btn\">Maintenance</button></form><br/><form action=\"/i\" method=\"get\"><button class=\"btn\">Information</button></form><br/><form action=\"/close\" method=\"get\"><button class=\"btn\">Exit Portal</button></form><br/>";
const char HTTP_ITEM[] PROGMEM = "<div><a href=\"#p\" onclick=\"c(this)\">{v}</a>&nbsp;<span class=\"q {i}\">{r}%</span></div>";
const char JSON_ITEM[] PROGMEM = "{\"SSID\":\"{v}\", \"Encryption\":{i}, \"Quality\":\"{r}\"}";
const char HTTP_FORM_START[] PROGMEM = "<form method=\"get\" action=\"wifisave\"><label>SSID</label><input id=\"s\" name=\"s\" length=32 placeholder=\"SSID\"><label>Password</label><input id=\"p\" name=\"p\" length=64 placeholder=\"password\">";
// const char HTTP_FORM_START[] PROGMEM = "<form method=\"get\" action=\"wifisave\"><label>SSID</label><input id=\"s\" name=\"s\" length=32 placeholder=\"SSID\"><label>Password</label><input id=\"p\" name=\"p\" length=64 placeholder=\"password\">";
const char HTTP_FORM_START1[] PROGMEM = "<form method=\"get\" action=\"wifisave\"><label>SSID</label><input id=\"s\" name=\"s\" length=32 placeholder=\"SSID\" value=\"";
const char HTTP_FORM_START2[] PROGMEM = "\"><label>Password</label><input id=\"p\" name=\"p\" length=64 placeholder=\"password\" value=\"";
const char HTTP_FORM_START3[] PROGMEM = "\">";

const char HTTP_FORM_LABEL[] PROGMEM = "<label for=\"{i}\">{p}</label>";
const char HTTP_FORM_PARAM[] PROGMEM = "<input id=\"{i}\" name=\"{n}\" length={l} placeholder=\"{p}\" value=\"{v}\" {c}>";
const char HTTP_FORM_END[] PROGMEM = "<button class=\"btn\" type=\"submit\">save</button></form>";
Expand Down Expand Up @@ -208,6 +212,8 @@ class WiFiManager
//Scan for WiFiNetworks in range and sort by signal strength
//space for indices array allocated on the heap and should be freed when no longer required
int scanWifiNetworks(int **indicesptr);
String _ssid = "";
String _pass = "";

private:
std::unique_ptr<DNSServer> dnsServer;
Expand All @@ -224,8 +230,6 @@ class WiFiManager

const char *_apName = "no-net";
const char *_apPassword = NULL;
String _ssid = "";
String _pass = "";
unsigned long _configPortalTimeout = 0;
unsigned long _connectTimeout = 0;
unsigned long _configPortalStart = 0;
Expand Down
7 changes: 3 additions & 4 deletions pio/src/iSpindel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,17 +315,16 @@ bool startConfiguration()
wifiManager.addParameter(&custom_url);
WiFiManagerParameter custom_polynom_lbl("<hr><label for=\"POLYN\">Gravity conversion<br/>ex. \"0.00438*(tilt)*(tilt) + 0.13647*(tilt) - 6.96\"</label>");
wifiManager.addParameter(&custom_polynom_lbl);
// f.e. '0.00438*(tilt)*(tilt) + 0.13647*(tilt) - 6.96'
WiFiManagerParameter custom_polynom("POLYN", "Polynominal", my_polynominal, 70, WFM_NO_LABEL);
wifiManager.addParameter(&custom_polynom);
// WiFiManagerParameter custom_polynom_temp("POLYTEMP", "calibration Temperatur C", String(my_polynominal_temp).c_str(), 5, TYPE_NUMBER);
// wifiManager.addParameter(&custom_polynom_temp);

wifiManager._ssid = my_ssid;
wifiManager._pass = my_psk;

SerialOut(F("started Portal"));
wifiManager.startConfigPortal("iSpindel");

strcpy(my_polynominal, custom_polynom.getValue());
// my_polynominal_temp = String(custom_polynom_temp.getValue()).toInt();

validateInput(custom_name.getValue(), my_name);
validateInput(custom_token.getValue(), my_token);
Expand Down
1 change: 0 additions & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ upload_speed = 921600
lib_deps =
ArduinoJson
ESPAsyncWebServer
ESPAsyncTCP

0 comments on commit 6f734ee

Please sign in to comment.