You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implemented factory-reset feature
Extract factory settings into separate ini file
Hide reset/factory reset from guest user
Co-authored-by: kasedy <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+26-16Lines changed: 26 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,40 +149,50 @@ You can enable CORS on the back end by uncommenting the -D ENABLE_CORS build fla
149
149
-D CORS_ORIGIN=\"http://localhost:3000\"
150
150
```
151
151
152
-
## Device configuration & default settings
152
+
## Factory settings
153
153
154
-
The SPIFFS image (in the ['data'](data) folder) contains a JSON settings file for each of the configurable features.
154
+
The firmware has built-in factory settings which act as default values for the various configurable services where settings are not saved on the file system. These settings can be overridden using the build flags defined in [factory_settings.ini](factory_settings.ini).
155
155
156
-
The config files can be found in the ['data/config'](data/config) directory:
156
+
Customize the settings as you see fit, for example you might configure your home WiFi network as the factory default:
157
157
158
-
File | Description
159
-
---- | -----------
160
-
[apSettings.json](data/config/apSettings.json) | Access point settings
These files can be pre-loaded with default configuration and [uploaded to the device](#uploading-the-file-system-image) if required. There are sensible defaults provided by the firmware, so this is optional.
The default settings configure the device to bring up an access point on start up which can be used to configure the device:
166
+
By default, the factory settings configure the device to bring up an access point on start up which can be used to configure the device:
172
167
173
168
* SSID: ESP8266-React
174
169
* Password: esp-react
175
170
176
171
### Security settings and user credentials
177
172
178
-
The security settings and user credentials provide the following users by default:
173
+
By default, the factory settings configure two user accounts with the following credentials:
179
174
180
175
Username | Password
181
176
-------- | --------
182
177
admin | admin
183
178
guest | guest
184
179
185
-
It is recommended that you change the JWT secret and user credentials from their defaults protect your device. You can do this in the user interface, or by modifying [securitySettings.json](data/config/securitySettings.json) before [uploading the file system image](#uploading-the-file-system-image).
180
+
It is recommended that you change the user credentials from their defaults better protect your device. You can do this in the user interface, or by modifying [factory_settings.ini](factory_settings.ini) as mentioned above.
181
+
182
+
### Customizing the factory time zone setting
183
+
184
+
Changing factory time zone setting is a common requirement. This requires a little effort because the time zone name and POSIX format are stored as separate values for the moment. The time zone names and POSIX formats are contained in the UI code in [TZ.ts](interface/src/ntp/TZ.ts). Take the appropriate pair of values from there, for example, for Los Angeles you would use:
If not overridden with a build flag, the firmware will use the device ID to generate factory defaults for settings such as the JWT secret and MQTT client ID.
194
+
195
+
> **Tip**: Random values are generally better defaults for these settings, so it is recommended you leave these flags undefined.
0 commit comments