Last week we connected a ICStation BME280 temperature / humidity / barometric pressure sensor to a a ICStation NodeMCU ESP8266. We displayed the collected data (along with Dew Point and Heat Index calculations in the serial monitor.
This week we modified the sketch to post those variables to a linux server (could be your own local Raspberry Pi) running MySQL and PHP. We have it set to take a reading every 30 seconds, and post the data to a php page that inserts the data into the MySQL database. The index page displays a table of that data. The time and date stamp has been modified to display the data in the timezone of the location of the sensor. We are working on live gauges and graphs to display this data in real time.’’
Mongodb or any norelational database? I’ve been using PHP/MySQL for various applications for 18 years, but recently I have moved nearly everything to nodejs for several reasons but once you do a non-relational database becomes much more natural. I use websockets on the esp32 (esp-wroom-32) to stream sound data, passive infrared, temp, etc…data goes to my relay server to process and send to clients. But I would like to have better graphs so I look forward to what you guys come up with. https://github.com/physiii/open-automation
I have many years, and hundreds applications (i’m the in-house programmer for a hvac manufacturer) invested in mysql, and have never needed a reason to change. As long as it does what I need, different isn’t always better.
Nice, I would be happy to collaborate. I think an ESP32 based thermostat would be a nice addition to open-automation, right now I have radiothermostat. The major frameworks I use are nodejs, mongodb, esp-idf’s C libraries on the microcontrollers, and angular on the front end.