I am a hardware sort trying to get some practice going from sensor interactions to logs, reports, and graphs; I wanted to check here and see if there are points that could be simpler or if I am on the right path.
Assume a setup measuring a (binary) state - whether a fan is on or off. My end goal is that I can create a log of time on, time off, and a graph of on duration over a period that can be pulled up off of the LAN.
To this end, I think
Fan State ---> optical isolator ---> [ESP8266 module sending event over MQTT] ---> [Linux box / PI pushing MQTT to MySQL db, and querying database to construct reports] ---> Generated webpage on demand with state, last state change, and graph
Most concerning is how to get data (state change, but arbitrary small data sets like ADC values too) to the computer from the micro - is MQTT a good way that does not rely on external cloud services?