Commit Graph

52 Commits

Author SHA1 Message Date
ebd4b76a85 Reduce UI artefact size by removing moment.js
Remove moment.js dependency
2021-01-29 23:42:00 +00:00
3ecdc27550 Add additional settings to AP configuration (#215)
* add wifi settings option to set AP visible/non visible

* add add channel and max client settings

Co-authored-by: lukas <lukas.heiligenbrunner@gmail.com>
2021-01-03 18:51:11 +00:00
e771ab134a Settings placeholder substitution (#164)
* Use text formatting for default factory values to produce dynamic names.
Header files contains duplicates of factory values defined in factory_settings.ini Removed them to simplify the code.

* Use text formatting for default factory values to produce dynamic names.
Header files contains duplicates of factory values defined in factory_settings.ini Removed them to simplify the code.

* Configured the WiFi host name to contain the device id by default

* Removed possibility to use placeholders for FACTORY_WIFI_SSID factory setting.

* Update README.md

Updated documentation

* Use text formatting for default factory values to produce dynamic names.
Header files contains duplicates of factory values defined in factory_settings.ini Removed them to simplify the code.

* Configured the WiFi host name to contain the device id by default

* Removed possibility to use placeholders for FACTORY_WIFI_SSID factory setting.

* Added a space to the end of the file to comply project code style

* fix typos
clang formatting
use 2 spaces in ini files
use ${platform}-${chip_id} for hostname
put chip id in brackets in AP SSID

* restore (and update) factory setting ifndefs

- this is so src can be built without an exaustive set build-time defines
- standardize ordering of defines: factory settings, paths, config

* format and modify comment

* escape spaces in pio defines
experiment with removing $'s from our format strings (they are being substituted with empty values by pio)

* fix formatting in readme
rename FactoryValue to SettingValue, put in own header
give example of direct usage of FactorySetting::format in README.md

* auto format

* use hash to delimit placeholders

* fix factory_settings.ini

* remove flash string helpers

* format ini file

* use MAC address instead of chip id for properly unique identifier

* use lower case hex encoding for unique id
use chip id and unique id for more secure secret

* fix comment

* Use random values for JWT secret
Arduino uses the ESP random number generator for "true random" numbers on both esp32 and esp8266
This makes a better JWT secret and may be useful for other factory defaults too
In addition a modification has been made to force the FSPersistance to save the file if applying defaults

* Don't use spaces in default AP SSID

* restore helpful comment in factory_settings.ini
fix default defines

Co-authored-by: kasedy <kasedy@gmail.com>
2021-01-03 17:00:36 +00:00
6e22893051 Fix user form
* fix issue with checkbox on user form
* use consistent style for const char pointers
* use unique hostname by default
2020-11-21 23:40:31 +00:00
3d50cab9b7 Add missing security manager include to WebSocketTxRx.h (#194)
Previously the demo code was relying on the transitive include via HttpEndpoint.h
This change allows WebSocketTxRx.h to be used when no HttpEndpoint is in use
2020-08-22 13:30:24 +01:00
2711cb2f1f Fix issue when compiling with PROGMEM_WWW flag omitted (#186) 2020-07-28 08:29:58 +01:00
c16f7693fd Migrate to LittleFS under ESP8266
Make ESP8266 use LittleFS instead of deprecated SPIFFS
Make framework use the correct filesystem automatically and handle the call the FS.begin()
Change default MQTT keepalive to 60 seconds
Fix lodash security issue
2020-07-19 19:32:08 +01:00
6ef5df28c1 Add access point IP address configuration in UI
* Allow ap ip address to be configured via ui
* Add missing WiFi status to UI enum
* Update package-lock.json
2020-07-07 22:22:38 +01:00
1f07dcdab2 OTA Upload Feature (#162)
* Improve restart behaviour under esp8266
* Backend to support firmware update over HTTP
* UI for uploading new firmware
* Documentation changes
2020-06-29 00:25:58 +01:00
e86607bff3 PSRAM Status (#159)
Show PSRAM on status screen
Use correct calculation for heap fragmentation
Fix display of application error component
2020-06-21 23:02:07 +01:00
0bea2fde92 Add admin security predicate to time endpoint (#154) 2020-06-17 09:20:33 +01:00
55511e0611 Allow time & date to be configured manually when NTP is inactive (#153)
* Allow time to be configured manually when NTP is not active
* Standarize on primary button on the outside of dialog boxes
2020-06-16 22:24:15 +01:00
449d3c91ce Allow features to be disabled at build time (#143)
* Add framework for built-time feature selection
* Allow MQTT, NTP, OTA features to be disabled at build time
* Allow Project screens to be disabled at build time
* Allow security features to be disabled at build time
* Switch to std::function for StatefulService function aliases for greater flexibility
* Bump various UI lib versions
* Update docs
2020-06-09 21:57:44 +01:00
555b3efd8d Access point fixes (#137)
* add lingering mode to access point fix bug which prevents active access point from being re-configured
2020-05-30 09:47:24 +01:00
0d39c5ca00 Apply updates alternative (#135)
* Rename "serialize" and "deserialize" functions to "read" and "update" to reflect API in StatefulService
* Move new definitions to StatefulService.h so it is obvious it is not general purpose
* Update README
2020-05-29 20:18:43 +01:00
f73c957477 add TODO 2020-05-25 11:35:03 +01:00
b4f3fbe823 Remove SPIFFS reference from ESP8266 react, use FS pointer instead 2020-05-25 11:30:13 +01:00
98f49fd024 use "fs" instead of "spiffs" as spiffs is implementation specific 2020-05-25 11:04:13 +01:00
aa04cfd80c fix imports
use FSInfo struct for esp8266
2020-05-25 11:00:42 +01:00
6510a72789 apply PR comments 2020-05-25 01:41:45 +02:00
ab1c8e9ac1 Merged 2020-05-24 23:44:04 +02:00
49910e1272 add spiffs size + formatting 2020-05-24 23:35:32 +02:00
ce8929fd39 add spiffs size + formatting 2020-05-23 23:12:11 +02:00
bcb1098402 Make StatefulService buffer size configurable (#118)
Introduce DEFAULT_BUFFER_SIZE for StatefulService related classes
Add configurable buffer sizes for StatefulService related classes
Remove redundant function from HttpEndpoint
2020-05-22 19:26:12 +01:00
4fa491e309 adopt explicit initialization - with the exception of trivial classes (#122) 2020-05-21 23:41:29 +01:00
db0d98d425 Extend Status (#121)
* Added Sdk Version and ~heap fragmentation to system page
* Add flash chip speed to status page

Co-authored-by: kasedy <kasedy@gmail.com>
2020-05-21 22:52:07 +01:00
13f97b630f Fixed currentUpdatedHandlerId variable appearing multiple times in several build units. (#120)
* Fixed currentUpdatedHandlerId variable appearing multiple times in several build units
2020-05-21 20:55:22 +01:00
0e2124062f Use references & flash strings where approperate (#110)
* pass originId as const reference
* store strings for serial logging in flash
* Use string references where approperate.
2020-05-21 08:42:21 +01:00
4e6823ceec Fixed crash due to uninitialized variable (#116)
* Fixed crash due to uninitialized variable "Fatal exception 9(LoadStoreAlignmentCause)"
2020-05-20 18:51:04 +01:00
a59f32c420 Factory reset feature (#114)
Implemented factory-reset feature
Extract factory settings into separate ini file
Hide reset/factory reset from guest user

Co-authored-by: kasedy <kasedy@gmail.com>
2020-05-20 00:32:49 +01:00
51dabb705f Fix MqttPubSub Constructor
* Fix MqttPubSub constructor
* Add MQTT client accessor to MqttConnector
2020-05-17 22:02:00 +01:00
a1f4e57a21 Rework backend add MQTT and WebSocket support
* Update back end to add MQTT and WebSocket support
* Update demo project to demonstrate MQTT and WebSockets
* Update documentation to describe newly added and modified functionallity
* Introduce separate MQTT pub/sub, HTTP get/post and WebSocket rx/tx classes
* Significant reanaming - more accurate class names
* Use PROGMEM_WWW as default
* Update README documenting PROGMEM_WWW as default
* Update README with API changes
2020-05-14 23:23:45 +01:00
c47ea49a5d ui fixes
remove unused fuction
2020-03-28 21:30:10 +00:00
ea6aa78d60 Fix issue under ESP32 where there is a delay re-configuring WiFi
When re-configuring we must wait for it to disconnect and stop before reconnecting.
2020-02-01 20:21:18 +00:00
39a86b0411 External config
Allow config to be accessed from outside the framework core code.
2020-02-01 08:44:26 +00:00
ced5b74ba1 NTP Timezone & Enable/Disable Setting (#80)
* quick and dirty WIP to investigate timezones, currently only building under esp8266 platform
much of the status stuff has been stripped for now, to test the concepts

* support set of common features across ESP32/ESP8266 WRT timezone and sntp
return dates as ISO format strings

* remove time library, and timelib fix which is no longer required

* fix the icons

* remove temporary changes to demo project
2020-01-20 11:14:46 +00:00
59326c6426 provide OTA defaults (#77)
(cherry picked from commit 438b2585463e902b6e9710ae26c3aea4fe64928d)
2020-01-08 23:02:36 +00:00
bcfeef8004 Interface data storage in PROGMEM (#71)
Adds a webpack plugin to package interface as PROGMEM into a header file in the framework.
Adds a build flag to optionally enable serving from PROGMEM or SPIFFS as required
Adds documentation changes to describe changes
2019-12-29 17:54:12 +00:00
62f3d3fc7a fix broken imports under ESP32
use ESP32 rather than ESP_PLATFORM - it's ambigious
standardise to ifdef ESP32 elif defined(ESP8266)
use ifdef over if defined where possible
2019-12-24 11:19:19 +00:00
f4ae632956 reformat with .clang-format based on google's spec with some minor changes 2019-12-03 23:16:06 +00:00
7bf713dfea rename "reset" to "restart" 2019-12-01 08:28:40 +00:00
6aede04282 Set persistant WiFi opmode to WIFI_OFF if not already configured that way 2019-12-01 01:24:15 +00:00
f5533b69de fix formatting issue 2019-11-30 13:42:47 +00:00
6179435880 Merge branch 'master' into ft_remove_arduinojson6_workaround 2019-11-30 13:23:50 +00:00
1ded736b9a perfer restart on ESP32 platform 2019-11-30 13:15:59 +00:00
a840aba878 Use ESP.reset() rather than ESP.restart() - due to exceptions encountered on esp8266 2019-11-30 12:54:57 +00:00
78b9ae101e Add restart service for esp8266 and esp32
Add restart feature to status screen
Upgrade material-ui
Add icons to buttons
2019-11-30 12:34:52 +00:00
d650280a87 remove custom work-around for missing arduinojson6 support - it has since been added to async esp core 2019-11-30 09:58:28 +00:00
41f7579bd5 Resolve issue with AP.
Fix newly introduced null pointer in AuthenticationService.
2019-09-30 21:28:24 +01:00
f77428e4dc move initialization code to constructors as a simplfication 2019-09-28 21:29:46 +01:00