espEasy - Thingspeak - BME280

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
spuet
New user
Posts: 3
Joined: 26 May 2024, 11:36

espEasy - Thingspeak - BME280

#1 Post by spuet » 26 May 2024, 11:45

Hey guys,

I have a little problem. ESPeasy is installed on an ESP32 and connected to a BME280 module. In ESPeasy it shows temperature(field1), humidity(field2) and pressure(field3). But when I set up Thingspeak as the controller and send the data, it shows me humidity on field1 instead of temperature and pressure on field2. No temperature at all.
Is there an option I missed? Thanks for your help.
Attachments
3.jpg
3.jpg (86.19 KiB) Viewed 495 times
Screenshot 2024-05-26 123555.png
Screenshot 2024-05-26 123555.png (25.11 KiB) Viewed 497 times

User avatar
Ath
Normal user
Posts: 3647
Joined: 10 Jun 2018, 12:06
Location: NL

Re: espEasy - Thingspeak - BME280

#2 Post by Ath » 26 May 2024, 13:07

What exact .bin file did you install on your ESP?
/Ton (PayPal.me)

spuet
New user
Posts: 3
Joined: 26 May 2024, 11:36

Re: espEasy - Thingspeak - BME280

#3 Post by spuet » 26 May 2024, 15:34

Under info it shows me the following:
Build:⋄ 20240229 - Mega32
System Libraries:⋄ ESP32 SDK 4.4.6
Git Build:⋄ HEAD_430cc29
Plugin Count:⋄ 48 ["Normal"]
Build Origin: GitHub Actions
Build Time:⋄ Feb 29 2024 16:18:30
Binary Filename:⋄ ESP_Easy_mega_20240229_normal_ESP32_4M316k
Build Platform:⋄ Linux-6.5.0-1015-azure-x86_64-with-glibc2.35
Git HEAD:⋄ HEAD_430cc29

I found another problem, it looks like my esp is rebooting every 30 seconds and sometimes the bme280 modul even gets deactivated. My WiFi connection is good, the router isnt far away, but it comes in his ages. I tried doing the same with an ESP8266 and get the same problem :/

User avatar
Ath
Normal user
Posts: 3647
Joined: 10 Jun 2018, 12:06
Location: NL

Re: espEasy - Thingspeak - BME280

#4 Post by Ath » 26 May 2024, 21:00

spuet wrote: 26 May 2024, 15:34 Under info it shows me the following:
Build:⋄ 20240229 - Mega32
System Libraries:⋄ ESP32 SDK 4.4.6
Git Build:⋄ HEAD_430cc29
Plugin Count:⋄ 48 ["Normal"]
Build Origin: GitHub Actions
Build Time:⋄ Feb 29 2024 16:18:30
Binary Filename:⋄ ESP_Easy_mega_20240229_normal_ESP32_4M316k
Build Platform:⋄ Linux-6.5.0-1015-azure-x86_64-with-glibc2.35
Git HEAD:⋄ HEAD_430cc29
That release is nearly 3 months old :o you might want to try a newer build, like a very recent build that was made available yesterday at the Web flasher: https://TD-er.nl/ESPEasy/latest
spuet wrote: 26 May 2024, 15:34 I found another problem, it looks like my esp is rebooting every 30 seconds and sometimes the bme280 modul even gets deactivated. My WiFi connection is good, the router isnt far away, but it comes in his ages. I tried doing the same with an ESP8266 and get the same problem :/
Hmm, that smells more like a power supply (or poor quality wiring) issue. Make sure the power supply can at least provide 1A at 5V, so it properly handles the higher current required during WiFi connection.
When using a breadboard for testing, double-check the patch wires, as these are often rather thin, causing too large voltage drops, resulting in unexpected reboots.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8868
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: espEasy - Thingspeak - BME280

#5 Post by TD-er » 26 May 2024, 21:23

Trying to send to a MQTT broker which may fail continuously can also lead to frequent reboots as ESPEasy does have a tendency to retry connecting a bit too agressively.
Also it can run out of memory when this happens and thus crash.

User avatar
Ath
Normal user
Posts: 3647
Joined: 10 Jun 2018, 12:06
Location: NL

Re: espEasy - Thingspeak - BME280

#6 Post by Ath » 26 May 2024, 23:10

Did some digging in the code (never used the Thingspeak controller myself :?), and you have to set an offset for the field number to use in the IDX field where you enabled the Thingspeak controller for the task. The first IDX/offset to use should be 1, not the default value 0.
For any other tasks you want to send to the Thingspeak server you should add the last used IDX + the number of values in that task into the IDX value of the next task, and so on.
Example:
Your first BME280 task (device) gets the IDX value 1 -> field1 = temperature, field2 = humidity, field3 = pressure.
Now lets add another BME280 sensor in a new task (device), then the IDX for the Thingspeak controller in this new task should at least be set to 4, so field4 = temperature, field5 = humidity, field6 = pressure.
Instead of adding the minimal number of values, you can opt to add 10 for every next task to send to Thingspeak, so setting IDX to 11 for the next task would send field11, field12, field13 and field14 (assuming that task has 4 values ;))
/Ton (PayPal.me)

User avatar
Ath
Normal user
Posts: 3647
Joined: 10 Jun 2018, 12:06
Location: NL

Re: espEasy - Thingspeak - BME280

#7 Post by Ath » 26 May 2024, 23:25

Hmm, seems the field numbers are limited to 1..8, and a channel has to be specified somewhere, but atm, I don't see how that has to be specified in the api call we use for sending data to Thingspeak.
Will do some more investigation tomorrow.
/Ton (PayPal.me)

spuet
New user
Posts: 3
Joined: 26 May 2024, 11:36

Re: espEasy - Thingspeak - BME280

#8 Post by spuet » 27 May 2024, 19:44

Guys, first of all thanks for the many replies. Awesome board!!! :twisted:
I did update to version: 20240525 normal 4M littleFS ETH [ESP32] but the "old" version isnt the problem. The BME280 was on IDX 0, changing it to 1, like adviced, helped at least with the temperature problem. Now thingspeaks shows the right numbers. The log dont show any connection issues, just the uptime
44105899: WD : Uptime 735 ConnectFailures 0 FreeMem 232664 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
44135955: WD : Uptime 736 ConnectFailures 0 FreeMem 232448 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init

So I get some results, but after a while ESPeasy deactive the device for no reason. One strange thing I noticed I got Uptime 736 but in the Maintab it shows under age(s) only 30 seconds and starts counting again

Things I tried:
[x] different location, very near to the router.
[x] deactivated controller (thingspeak) so only the BME280 and esp32 worked together
[x] different cables, right now there is now breadboard. The sensor is connected to the controller with some short arduino cables

Things I ll try:
Another network or maybe tethering with my smartphone.
Another sensor

Very strange, I already used some espeasy with the exact same network some years ago and I worked flawless. So I guess some settings are messed up.

User avatar
Ath
Normal user
Posts: 3647
Joined: 10 Jun 2018, 12:06
Location: NL

Re: espEasy - Thingspeak - BME280

#9 Post by Ath » 27 May 2024, 20:22

spuet wrote: 27 May 2024, 19:44 Guys, first of all thanks for the many replies. Awesome board!!! :twisted:
I did update to version: 20240525 normal 4M littleFS ETH [ESP32] but the "old" version isnt the problem. The BME280 was on IDX 0, changing it to 1, like adviced, helped at least with the temperature problem. Now thingspeaks shows the right numbers. The log dont show any connection issues, just the uptime
44105899: WD : Uptime 735 ConnectFailures 0 FreeMem 232664 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
44135955: WD : Uptime 736 ConnectFailures 0 FreeMem 232448 WiFiStatus: WL_CONNECTED 3 ESPeasy internal wifi status: Conn. IP Init
Ah, great, and you get nice uptimes too :)
spuet wrote: 27 May 2024, 19:44 So I get some results, but after a while ESPeasy deactive the device for no reason.

Things I tried:
[x] different location, very near to the router.
[x] deactivated controller (thingspeak) so only the BME280 and esp32 worked together
[x] different cables, right now there is now breadboard. The sensor is connected to the controller with some short arduino cables

Things I ll try:
Another network or maybe tethering with my smartphone.
Another sensor

Very strange, I already used some espeasy with the exact same network some years ago and I worked flawless. So I guess some settings are messed up.
Hmm, that's a bit strange, usually this is caused by wiring, the wires for I2C should be max. 30 cm, and properly connected. And have ~10k pull-up resistors on both the SDA and SCL signal lines to 3.3V (most sensor boards have those installed by default, but you might want to check that).
One thing that was changed about a year ago is the addition of a 'sensibility check' on the I2C bus, that checks at startup of a (I2) task if the device is available, and if not disables it immediately, and during normal operation after 10 connection failures also disables the device. This is to protect other tasks from failing/hanging I2C devices, as there had been some reports about that.
This check can be disabled on the Tools/Advanced page "Check I2C devices when enabled" (it's enabled by default), as long as over time the sensor keeps returning proper values.
spuet wrote: 27 May 2024, 19:44 One strange thing I noticed I got Uptime 736 but in the Maintab it shows under age(s) only 30 seconds and starts counting again
That Age value is not related to uptime at all. Age is the time in seconds since the last update via P2P was received, and usually is between 0 or a few seconds to ~30 seconds. That's perfectly normal.
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 0 guests