1st MQTT message not published

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
IoTAll
 
Posts: 230
Joined: Wed May 31, 2017 6:34 pm

1st MQTT message not published

Post by IoTAll »

Hi!

I see a strange behaviour on the mqtt_winc1500 example from Adafruit MQTT library.

The example works fine as is, and I tried to modify it a little so that I only publish, not subscribe.

I see that if I comment out the line

Code: Select all

mqtt.subscribe(&onoffbutton);
in the Setup of the sketch, then the first message is not published, even though the connection to the MQTT broker is fine. The following messages are published ok.

If I leave this line, it works good from the first message.

Is this line important even if I don't want to subscribe?

Thank you!

User avatar
Jamicorn
 
Posts: 1
Joined: Wed Apr 28, 2021 8:46 am

Re: 1st MQTT message not published

Post by Jamicorn »

Beraid wrote:Not good. had the same trouble with my personal website which compares different gambling opportunities betfarm websitearound Nigeria. I just paid for it to a professional and he resolved it instead of me. I didn't want to lose the traffic. Hope that you will find the reason and resolve the trouble.
Oh man, what's wrong with you? Go away, spammer.

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”