ESP32-C3 TH nodes

I have several nodes that I built and managed to get working using an ESP8266, with DHT22 and DS18B20 sensors, depending on the node (one has two DS18B20’s and a DHT22, another has a DHT22 only, and a few only have DHT22’s). I’m pretty sure I’d posted the code for them here probably ten or more years ago.

I’m looking to try and ‘upgrade’ to use an ESP32-C3 and AHT10 sensors, ideally with some sort of simple Web UI, kind of similar to the IotaWatt’s web UI, that can allow you to select and set the sensor addresses in the WebUI and set the destination address for the EmonCMS server, so a generic sketch can be loaded and then configured via the Web UI (unlike my ESP8266 sketches).

Before I ‘attempt’ to reinvent the wheel, has anyone here in the community already created such a thing that they’d share?

Edit: I’d also like the ability to run DS18B20 sensors, and maybe even DHT22’s, depending on the application.

Hi,
I’d go program the C3 with ESPHome. That’s very simple, you can send the data to emomcms with http, or use mqtt, or whatever you want.

I took a look at ESPHome, and the problem (for me) is it seems it integrates into Home Assistant… I don’t want that. I didn’t see a standalone way to use it.

That being said, in the meantime, I started tinkering with trying to get something working, and I’ve been successful. I started with the code found here and managed to work in the code to send it to EmonCMS. It’s not perfect, and it would be nice to build something with more ‘web smarts’ that allows a generic sketch to be loaded and then all of the particulars be configured in the web interface. But this works, so it’s not the end of the world.

The problem that has me pulling my hair out is it only works on one of the four ESP32 types I have. It works perfectly on the ‘AITRIP ESP32-C3 OLED Development Board’ I have, but the Elgoo ESP32, Inland ESL32 Core and ‘ESP32 S2 Mini V1.0.0 WiFi Board Based ESP32-S2FN4R2 ESP32-S2’ it doesn’t work on. All of the ones it doesn’t work on, I can load up a ‘hello world’ sketch and that spits the expected data out the serial port. I load up a I2C scanner and that spits out serial data and finds the AHT10 sensor. If I remove the sensor, it changes to no sensor found and if I put it back, it finds it again. But load up the EmonCMS sketch and nothing. Load the exact same sketch to the ‘AITRIP ESP32-C3 OLED Development Board’ and it works perfectly right out of the gate. It makes absolutely no sense and is driving me bonkers.

Edit: So it seems the ones that ‘weren’t working’ were actually taking the code and running it, but for whatever reason, they weren’t putting out anything on the serial port. I discovered that they were standing up the AP to allow me to connect and configure a SSID, and after that, they started working. Why it worked perfectly with the ‘AITRIP ESP32-C3 OLED Development Board’, including all ‘bootup’ serial messages, but the others weren’t putting that out, I have no idea.

They say the definition of insanity is doing the same thing over and over, expecting a different result… But what if you do the same thing and end up getting a different result? lol

Well, it has everything to be easily integrated in Home Assistant, but you can run an ESPHome device standalone, with an embedded web server/page on it to show the sensors, …