Warning there are some tall-ass images in this post.

A few years ago I got mad enough at the temperature gradient in my town house that I designed and build a bunch of ESP8266 sensors to feed data into an RRD so that I could have some pretty graphs to be angry about as well. (As of this week I have also started logging stats from my UPS and server.) Using the minimum of HTML and CSS I threw those graphs, a map of the previous day’s incoming network traffic, and some convenient links onto a homepage that I use on all of my devices. At a glance this tells me if the furnace/AC is working, if my server is having a fit for unknown reasons, and if the local power grid is playing it fast and loose with the voltage and frequency (which I suspect they do).

Clicking the temperature/humidity data leads to a long term data page covering 2 years of data in varying resolution. The gap last fall was when the garage sensor failed and I was waiting for Aliexpress.

There are also long term trends for the server load and UPS but they have only been logging for a few days so there is not much to look at.

Clicking the map on the home page leads to a text file containing a summary of all incoming traffic to apache and ssh. The ssh server is on a high port number and doesn’t see much traffic but occasionally a persistent bot will find it.

Everything but my landing page (this animation in p5.js https://old.reddit.com/r/cellular_automata/comments/1djwjbu/waves_processingorg/ with the text “Hey this isn’t where I parked my car” overlayed) is behind basic auth or better and I have push notifications set up for every ssh login (even my own), in 5 years I have never had a successful login from an attacker, this is not an invitation, have mercy.

All the data is gathered with python scripts and stored in RoundRobinDatabases or, in the case of network data, digested down into a CSV. The climate sensors respond to requests on port 80 with the temperature and humidity separated by a comma to allow for easy polling. The map is generated by looking up the IPs’ information on Shodan then plotting the location data if it was present.

Absolutely none of this is the ideal solution, there are existing projects that cover literally every aspect plus a dozen extra features I could never hope to implement. I wrote as much as I could from scratch just to see if I could, it’s more fun to drive a shitty car that you built than one you bought from the dealer.

Aaaand I accidentally made the UPS database only 24hrs instead of the 10years I had intended. Lucky for me rrdtool has a function to expand an rrd without wiping out the data!

    • corroded@lemmy.world
      link
      fedilink
      English
      arrow-up
      13
      ·
      13 days ago

      It’s actually surprising how much just having a person in the room can alter the temperature and humidity levels. In my master bathroom, I have my bathroom fan set to activate when the dew point reaches a certain level (I’ve found that dew point produces better results than just humidity); the idea is that the bathroom will be ventilated when someone takes a shower and for however long it takes for the humidity to dissipate after they’re done. The funny thing is that every so often, I’ll take an excessively long poop (lets me honest, I’m scrolling on my phone), and the fan will kick on. Just being in the bathroom will alter the dew point enough that it triggers the fan.

      I also have a room that contains all my server/networking equipment. It’s climate-controlled, and I’m constantly monitoring temperatures. The times that in the room working, I can see a noticeable spike in the temperature graph, even though the only variable that’s changed is that there’s a person in the room.

      So my point is: OP might not have been having fun that night; it’s entirely possible someone just came in and went to bed.

    • Nik282000@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      9
      ·
      13 days ago

      The shower, we went to bed late. There was also a rainstorm that night which skews things, but it’s curious that the shower will actually raise the humidity of the whole house for hours after it’s been used.

      • dependencyinjection@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        8
        ·
        13 days ago

        Thanks for the answer.

        I find it fascinating to graph things like this and the trends you can notice. Which further highlights how big corporations are able to make insane predications because of the sheer number of data points they have.

        • Nik282000@lemmy.caOP
          link
          fedilink
          English
          arrow-up
          8
          ·
          13 days ago

          I noticed pretty quick how much the weather outside affects the inside of the house. When it’s windy the bedroom temperature drops fast. If it was sunny in the day there will be a peak temperature several hours after sunset as the heat soaks through the west facing brick wall. When the outside humidity jumps the inside follows fast but if the humidity drops outside it takes days for the house to catch up.

          If I was clever I could probably set up a predictive thermostat that takes into account the next 6 hrs of weather when choosing to run the heat or air.

  • camr_on@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    13 days ago

    Really really sick. I love those graphs, and the desire to create visual data to be angry at

    • Nik282000@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      13 days ago

      Previous to this the basement was always 5 degrees warmer than the rest of the house because the ductwork was so terribly installed. I spent a week sealing them all up only to find that what feels comfortable has as much to do with the humidity as the temperature so just balancing flow between floors couldn’t fix everything.

  • assaultpotato@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    13 days ago

    Nifty! I built something similar for my university graduation project. Did a PCB, ESP8266 based as well. Temperature, humidity, sound, vibration, airborne particulate sensor, and some other stuff.

    Wrapped a server up in docker for receiving the data, basic dashboard in JS for minor reactivity in components. Never ended up actually doing it cause I didn’t have a consistent host, but maybe I should spin it up again now that I have a home server.

    Cool project, looks neat! Anything you were caught off guard by when doing this?

    • Nik282000@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      13 days ago

      The weather outside changes things indoors way more than I expected. By looking at the graphs I can tell if it was a windy day, if it rained at all, if it was sunny and which blinds were open that day.

      • OhVenus_Baby@lemmy.ml
        link
        fedilink
        English
        arrow-up
        1
        ·
        13 days ago

        Insulation well good insulation is wildly expensive but saves most of all its the largest expense usually.

        • Nik282000@lemmy.caOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          13 days ago

          This is a 10 year old house and was supposed to be built with all the latest energy saving tech, except it’s Canada and I doubt it would have passed inspection even on the day it was sold.

          • OhVenus_Baby@lemmy.ml
            link
            fedilink
            English
            arrow-up
            2
            ·
            12 days ago

            Sounds like a US home lol Welcome to modern quality control where things went downhill instead of up like modern society thinks. You can actually quantify this. Look at sales of vintage and old goods. Their prices are very high and have a high demand. Modern plastic and construction has gotten of poorer quality.

            • Nik282000@lemmy.caOP
              link
              fedilink
              English
              arrow-up
              1
              ·
              12 days ago

              I ran my first “smart” phone for more than 5 years before needing an upgrade. My latest Pixel 8 is less than a year old and now has a row of pink pixels. Never been dropped, never been wet, never fast charged.

  • noahm@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    13 days ago

    What do you use for furnace/AC monitoring? Do you get data directly from the equipment, or just infer it from environmental trends? I assume the power data comes from embedded monitoring facilities in your UPS? What make/model do you have? I have a similar setup in my house, but it’s lacking a few metrics. Monitoring air quality (CO2, particulates, etc) would be nice, and my local electric provider sounds a lot like yours, so voltage monitoring would be great.

    • Nik282000@lemmy.caOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      13 days ago

      I just infer from the temp/humi sensors. When either one runs there is a very clear pulse in both readings. The UPS is an APC1400XL, it tells me it was manufactured in 2003, I cleaned out the exploded batteries and put new ones in this year and it worked fine. I think it was only ever used once (until the original batteries burst). I have the UPS supplying my server, NAS and the POE switch that powers a couple of cameras outside.