DIAGNOSIS: Error 4002 indicates the thermostat is already registered to another Sensi account. This happens with used thermostats or after a factory reset wasn't completed fully.
FIX: The thermostat must be released from the previous account. The current account holder must log into the Sensi app, select the thermostat, go to Settings > Remove Thermostat. Only then can you add it to your account.
IF THAT DIDN'T WORK: Perform a full factory reset on the thermostat. Press and hold Menu and Back buttons simultaneously for 15 seconds until the screen flashes. Then go through the setup wizard again, ensuring you connect to Wi-Fi before trying to add it in the app.
HEADS UP: If you purchased the thermostat new and see this error, contact Emerson support. There is a known issue where some units were incorrectly pre-registered during manufacturing.