Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

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.
Please be positive and constructive with your questions and comments.

1st MQTT message not published

by IoTAll on Mon Apr 26, 2021 8:40 am

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 | TOGGLE FULL SIZE
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!

IoTAll
 
Posts: 200
Joined: Wed May 31, 2017 6:34 pm

Re: 1st MQTT message not published

by Jamicorn on Wed Apr 28, 2021 8:47 am

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.

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

Please be positive and constructive with your questions and comments.