Search found 2 matches

by mattECE22
Sat Jan 15, 2022 3:25 am
Forum: General Discussion
Topic: loop MQTT publish message after timer ends, event loop issues
Replies: 2
Views: 3042

Re: loop MQTT publish message after timer ends, event loop issues

I think I solved the issue, which avoids using the new event loop at all and has an independent publish method. The other "client" was not working so I made the client inside the example handler a global variable and wrote a publish method that I can now call from inside the timer callback. Let me k...
by mattECE22
Fri Jan 14, 2022 7:00 pm
Forum: General Discussion
Topic: loop MQTT publish message after timer ends, event loop issues
Replies: 2
Views: 3042

loop MQTT publish message after timer ends, event loop issues

I am going off the example given for MQTT TCP and have modified it to publish messages to my PC which works fine, however I will need to eventually read sensor data and publish it to the PC every 5 to 10 seconds. I have been unable to successfully publish outside of the given example handler (as tha...