MQTT BROKEN

Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Locked
User avatar
PanosProject
 
Posts: 6
Joined: Fri Apr 03, 2020 8:13 am

MQTT BROKEN

Post by PanosProject »

Hide
MQTT ERROR: unexpected error saving data on PanosProject/feeds/Irms, Validation failed: Name has already been taken, Key has already been taken


i got this error... i did a mistake and delete all data io .... and after this i tried to run again the same project and i receive this

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: MQTT BROKEN

Post by brubell »

Hi PanosProject, I replied to your email. Let's continue this convo there, thanks!

User avatar
fraktal
 
Posts: 3
Joined: Mon Jan 16, 2012 8:48 pm

Re: MQTT BROKEN

Post by fraktal »

Hi

I'm trying to use the example sketch and am getting this same error. I've tried several times to get this working but would appreciate any help. Really of the idea of Adafruit IO but have not been able to find any help for this error from searching online.

Thanks

Chris

User avatar
fraktal
 
Posts: 3
Joined: Mon Jan 16, 2012 8:48 pm

Re: MQTT BROKEN

Post by fraktal »

To clarify a bit...

I'm running the example sketch on an ESP32 board. Everything seems to run fine from the hardware side. Have no problems connecting to Adafruit IO and my local WiFi.
When I go to the Adafruit IO page I get this message each time my sketch sends a message:
'MQTT ERROR: unexpected error saving data on fraktal/feeds/counter, Validation failed: Name has already been taken, Key has already been taken'
I tried using a feed name other than the default. Tried creating the feed on Adafruit IO first (not sure if this is needed or not).
This is my first attempt at IOT and I'm sure I am missing something obvious, but apparently it is not obvious to me :)
I really love the idea of IOT but am having a tough time getting started. Any help or suggestions for an IOT noob would be greatly appreciated.

User avatar
brubell
Learn User Page
 
Posts: 2010
Joined: Fri Jul 17, 2015 10:33 pm

Re: MQTT BROKEN

Post by brubell »

Fraktal,

Which example sketch are you using?

User avatar
fraktal
 
Posts: 3
Joined: Mon Jan 16, 2012 8:48 pm

Re: MQTT BROKEN

Post by fraktal »

File -> Examples -> Adafruit IO Arduino -> adafruitio_00_publish

I was finally able to sort it out over the weekend. Given this was the third time I'd attempted this over the last year, I thought I would share with the forum for completeness. Please correct me if I am giving bad information.

When you create a feed on the Adafruit IO website, it puts it into a default group, When I created a feed called counter and examined the info, it said the name was 'counter' and the key was 'counter.' However if you view the 'Feeds' section of the website, it will show that the feed name is 'counter' and the key is actually 'default.counter'. To get the example to work I had to change the name of the feed in the Arduino sketch to 'default.counter'.

I'm guessing this was a newbie mistake that is probably outlined in one of the many tutorials, but hopefully this will save someone else some time in the future.

User avatar
mmorton
 
Posts: 1
Joined: Fri Dec 11, 2015 2:30 pm

Re: MQTT BROKEN

Post by mmorton »

Thank you - you're not alone. I had the same issue. After reading this post, I got my code working too.

Locked
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.

Return to “Internet of Things: Adafruit IO and Wippersnapper”