21  Interactive Troubleshooting Flowchart

Step-by-Step Debugging for Common IoT Issues

21.1 IoT Troubleshooting Guide

TipSystematic Debugging

Select your problem category and follow the interactive flowchart. Each step includes diagnostic commands and solutions.


21.2 Select Problem Category


21.3 Troubleshooting Flowchart


21.4 Quick Diagnostic Commands

21.4.1 Essential Debug Commands

Issue Command Expected Output
Wi-Fi status Wi-Fi.status() 3 = Connected
IP address Wi-Fi.localIP() e.g., 192.168.1.100
Signal strength Wi-Fi.RSSI() -30 (excellent) to -90 (poor)
Free memory ESP.getFreeHeap() >20000 bytes healthy
MQTT state mqtt.state() 0 = Connected
I2C scan See code above Device addresses

21.4.2 Common Error Codes

Wi-Fi Status Meaning
0 WL_IDLE_STATUS
1 WL_NO_SSID_AVAIL
3 WL_CONNECTED
4 WL_CONNECT_FAILED
6 WL_DISCONNECTED
MQTT State Meaning
-4 Connection timeout
-3 Connection lost
-2 Connect failed
0 Connected
4 Bad credentials