adafruit / Adafruit_MQTT_Library

Arduino library for MQTT support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MQTT ERROR: rejected, not a valid topic format - When connecting to AdafruitIO

rum-neutralo opened this issue · comments

  • Arduino board: ESP8266 D1 Mini
  • Arduino IDE version: Platform.io Adafruit MQTT Library @ 1.0.3

Adafruit_MQTT_Subscribe slider = Adafruit_MQTT_Subscribe(&mqtt, AIO_USERNAME "/feeds/slider");

When i run:
mqtt.subscribe(&slider);
the Adafruit.IO MQTT Errors show
"MYUSERNAME/errors" => rejected, not a valid topic format ?

Seams to be a Problem together with another library
WiFiUDP ntpUDP; NTPClient timeClient(ntpUDP, "europe.pool.ntp.org", 3600, 60000); ...

Having removed the ntpUDP and NTPClient the subscription works

I'm still seeing this in my sketch and I'm not using the ntpUDP and NTPClient libraries. How did you determine it was a problem with WiFiUDP ? My sketch uses MDNS which uses WiFiUDP though. I commented that out but I still get the same strange error "not a valid topic format".

Resolved by @mkraats on the forums

Ah, one should always be careful after dusting off old code. Apparently, I had used:

#define AIO_MYFEED "myfeedname"

But now, only:

#define AIO_PM25 "/feeds/groupname.feedname"

Seems to work.