Commit 0834ad91 authored by Jérôme Courat's avatar Jérôme Courat

Update README.md with info about configuration files

parent e58d05b9
......@@ -10,4 +10,59 @@ lib_ldf_mode = deep+
```
First line indicates that LittleFS needs to be used instead of SPIFFS for filesystem,
second one indicates that library dependencies need to be deeply fetched.
\ No newline at end of file
second one indicates that library dependencies need to be deeply fetched.
## Runtime configuration files
Once running, the firmware will look for two files in the LittleFS filesystem section:
* **wifi.json** - contains WiFi settings, optionnally AP and Station modes.
* **mqtt.json** - contains MQTT settings, optional
Here is an example for each one
### wifi.json file
```
{
"wifi": {
"name": "iot-capteurX",
"ap": {
"enabled": true,
"ssid": "iot-capteurX-wifi",
"password": "password"
},
"sta": {
"enabled": true,
"ssid": "YOUR_SSID",
"password": "your_password"
}
}
}
```
### mqtt.json file
```
{
"mqtt": {
"active": true,
"host": "IP_OR_HOSTNAME",
"port": 1883,
"client": {
"id": "iot-capteurX",
"username": "guest",
"password": "guest"
},
"topics": {
"temperature": "iot/capteurX/temperature",
"humidity": "iot/capteurX/humidity",
"pressure": "iot/capteurX/pressure",
"voltage": "iot/capteurX/voltage",
"signal": "iot/capteurX/signal",
"command": "iot/capteurX/command"
}
}
}
```
Those files must be put in /data folder of your project. Thus the "Build Filesystem" and "Upload Filesystem" will process an upload them to your ESP.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment