Search found 6 matches

by Kleriger
Tue Jan 21, 2020 7:33 pm
Forum: Programs, Libraries and Tools
Topic: umqtt.robust: ensure that broker received the message
Replies: 10
Views: 2981

Re: umqtt.robust: ensure that broker received the message

Then I will familiarize myself with asyncio and test TLS with the esp32. I will then post the result edit: I tested my program after an update to MP version 1.12 and now it also works with encryption. Apparently the version can handle TLS on esp32 better, I guess that's why the asyncio-mqtt version ...
by Kleriger
Fri Jan 17, 2020 3:52 pm
Forum: Programs, Libraries and Tools
Topic: umqtt.robust: ensure that broker received the message
Replies: 10
Views: 2981

Re: umqtt.robust: ensure that broker received the message

If you ran a second MQTT client it could subscribe to the topic and publish a response. Your main client could wait for the subscription and do something if it's not received in the requisite period. I tried that. I created an mqqt client for publish and one for subscribe on the esp32 and compared ...
by Kleriger
Fri Jan 17, 2020 10:46 am
Forum: ESP32 boards
Topic: Does a microcontroller need a break?
Replies: 2
Views: 812

Does a microcontroller need a break?

Hello, I have two quick questions. Is it necessary to use a sleep in "main.py" when I run a loop? I know this from programming on the computer so that the CPU is not 100% used. For example: while True: do_quick_stuff() time.sleep(0.1) For my program development I use a lot of serial outputs to see w...
by Kleriger
Wed Jan 15, 2020 10:13 am
Forum: Programs, Libraries and Tools
Topic: umqtt.robust: ensure that broker received the message
Replies: 10
Views: 2981

Re: umqtt.robust: ensure that broker received the message

With qos==1 publish waits until it gets a response packet which confirms reception. This can take time depending on the server, and I believe TLS slows it down too. If you try it with a local broker without TLS response is fast. The implementation is broken because if it never gets the response pac...
by Kleriger
Tue Jan 14, 2020 12:24 pm
Forum: Programs, Libraries and Tools
Topic: umqtt.robust: ensure that broker received the message
Replies: 10
Views: 2981

Re: umqtt.robust: ensure that broker received the message

If you ran a second MQTT client it could subscribe to the topic and publish a response. Your main client could wait for the subscription and do something if it's not received in the requisite period. The other approach would be to use the resilient asynchronous MQTT library. Asynchronous code (base...
by Kleriger
Mon Dec 30, 2019 10:02 am
Forum: General Discussion and Questions
Topic: ring / fifo buffer
Replies: 8
Views: 2533

Re: ring / fifo buffer

Ringbuffers are pretty basic. attached a simple class, which can be varied in various ways. i just sketched it. It has three methods, The parameter to the constructor is the size of the buffer. put() puts a byte into the buffer, not overwriting previous content. get() returns the first value. None ...