elp
New Member
Posts: 15
|
Post by elp on Jul 14, 2021 9:20:59 GMT -8
I just got the FT-020T WeatherRack2 & the F016T/H Indoor Temp-Humid Transmitter working with the SDL Arduino WeatherRack2 application from github. I have reliably been receiving readings from both units for about 24 hours. It seems to work great!
However, the architecture that I planned to implement was to have my ESP32 communicate via MQTT to other devices on my network and to store data into an InfluxDB database that is running on a Raspberry Pi.
Unfortunately, when looking at the timing in the SDL_WeatherRack2 app on the ESP32, I was disappointed to see that the waitForNextMessage method is blocking. This results in over 80% of the time in the ESP32 being spent in this library method.
My question is: Is there a library for the WeatherRack2 that is non-blocking? (I presume that this would require using interrupts with Interrupt Service Routines.)
If there is such a library, can you direct me to it?
If there is not such a library, I'll need to change my planned project architecture.
Thanks for your time and attention.
|
|
|
Post by SDL on Jul 14, 2021 10:24:24 GMT -8
There are plans to turn it into a non-blocking RTOS task for one of our upcoming projects (OurWeather2) but it hasn't been even scheduled yet.
Then it will be an unblocking CPU1 task. I am somewhat concerned that the task will end up taking a lot (maybe your 80% number) of CPU1. Software demodulation is CPU expensive. Now, if we manage to get the Interrupt version working, then the CPU utilization will plummet to about 20% or 30%. Much better.
BP
|
|
elp
New Member
Posts: 15
|
Post by elp on Jul 14, 2021 10:30:14 GMT -8
Thanks for your quick reply!
I think I will modify my plan to simply have my ESP32 transmit the data received from the WeatherRack & T/H sensor to my Raspberry Pi via MQTT as received (basically replacing the Serial.print()'s in the example project) & have the Pi store the data in InfluxDB & handle all the MQTT communication with the other devices on my network.
Thanks again!
|
|