Configuration Files
Both the Primary and Wireless Sensor controllers utilize specialized configuration files to store your settings. These files are written/read from the SPIFFS (Serial Peripheral Interface Flash File System) area of the ESP32’s memory, ensuring your preferences—from Wi-Fi credentials to effect colors—are preserved across reboots and power cycles. The system uses the LittleFS format for these files.
⚠️ A Note on Manual Editing
While these files are accessible via certain third-party utilities, manual modification is not recommended. A single missing comma or a stray bracket in a JSON file can prevent the controller from booting. If you need to troubleshoot, use the “Config Dump” feature in the Controller Commands menu to view the raw data safely. Otherwise, the web application should be used to make changes to the system settings or options.
Primary Controller Files
1. Main Configuration (config.json)
This is the master configuration file for the Primary controller. It stores system interfaces, startup preferences, and integration keys.
Example primary config.json file
{
"device_name": "StairLEDs-Dev",
"led_gpio": 4,
"pir_1_gpio": 0,
"pir_2_gpio": 0,
"tof_1_data_gpio": 0,
"tof_1_clock_gpio": 0,
"tof_2_data_gpio": 0,
"tof_2_clock_gpio": 0,
"num_sensors": 2,
"use_tof": 0,
"wireless_sensors": 1,
"sensor1_dist": 50,
"sensor2_dist": 50,
"sensor1_cooldown": 0,
"sensor2_cooldown": 0,
"toggle_m1": 1,
"toggle_m2": 1,
"debounce_time": 0,
"led_count": 22,
"milli_amps": 5000,
"led_color": "#ff0000",
"led_state": 0,
"led_brightness": 40,
"led_effect_m1": "In-Out",
"led_effect_m2": "CrissCross",
"led_speed_m1": 10,
"led_speed_m2": 9,
"led_color1_m1": "#ff0000",
"led_color2_m1": "#0000ff",
"led_color1_m2": "#0000ff",
"led_color2_m2": "#00ff00",
"led_on_time": 5,
"use_boot_leds": true,
"anim_fast_ms": 500,
"anim_slow_ms": 7000,
"mqtt_addr_1": 192,
"mqtt_addr_2": 168,
"mqtt_addr_3": 1,
"mqtt_addr_4": 108,
"mqtt_port": 1883,
"mqtt_tele_period": 60,
"mqtt_user": "MQ_User_Name",
"mqtt_pw": "********",
"mqtt_topic_sub": "stairleds",
"mqtt_topic_pub": "stairleds"
}
2. Discovery Configuration (discovery.json)
This file is generated only after running the Home Assistant Discovery process. It tracks which entity groups are currently exposed to your smart home hub. This file is only found on the PRIMARY controller.
Example discovery.json file
{
"devname": "StairLEDs Dev",
"controls": true,
"sensors": true,
"config": true,
"diag": true
}
Wirless Sensor Controller Files
1. Main Configuration (config.json)
Similar to the primary unit, the wireless sensor controller stores its hardware-specific preferences and communication settings here.
Example wireless sensor config.json file
{
"device_name": "WirelessSensor1",
"ctrl_ip_addr": "192.168.1.217",
"pir_1_gpio": 18,
"tof_1_data_gpio": 21,
"tof_1_clock_gpio": 22,
"led_gpio": 2,
"use_led": 1,
"sensor_num": 1,
"use_tof": 1,
"sensor1_dist": 127
}
🔍 Future Firmware Updates
Future enhancements may require changes or additions to the configuration files. Normally this is seamless to the end user, since the configuration files are erased/recreated each time they are modified and saved via the web app. This means any changes are picked up automatically the first time the configuration file is saved. But always check any update’s release notes for any required actions regarding the configuration.