Everything was working fine, I left my project running for a few hours to make sure things were gravy.
After ~6 hours, my devices stopped working and, upon further investigation, I realized it was because my API key had changed. I definitely didn't do this (I didn't do ANYTHING, just left it running). And I'm confident the key changed (as opposed to a typo) because that same API key was hardcoded into a bunch of projects that all were working and stopped at the same time.
What happened? Why would this happen? Was there some auto-regen to do with requests? I was only making MQTT pings every few hours at most.
I'm making this wifi device as a holiday gift for someone, so I'd like to resolve this before I hand it over! Any help is appreciated.
Thanks!
EDIT:
I got a *belated email from Adafruit explaining things! I pushed my code to my github and the config file included my IO key - I had accidentally set the repo visibility to public. As a result, Adafruit automatically reset my key.
As an aside, I'm confused why this:
Code: Select all
Serial.print(mqtt.connectErrorString(ret));
Code: Select all
Connection Failed
Code: Select all
Adafruit IO request failed: 401 Unauthorized - request failed - invalid API key provided