Coder Social home page Coder Social logo

pi-temp's People

Stargazers

 avatar

Watchers

 avatar  avatar

pi-temp's Issues

Other ways exist now--this is probably too complex.

Other ways exist now! I just recreated most of this in a few hours with an ESP32 dev board, MQTT, and Node-RED.

There's no need to dedicate an entire Linux machine (i.e., Raspberry Pi) to the simple task of passing along data to be visualized.

Split into frontend and backend

My goal with this project is still to develop a way to deploy multiple (cheap) sensors and be able to view data from them all simultaneously. This should not require each sensor to have its own full-fledged GUI running, just a barebones API endpoint that serves the data.

So there should be two apps in addition to the cron script that collects the data and saves it in the database; one to act as the API endpoint and one to act as a GUI for visualizing the data. The latter could be in Flask or Shiny or whatever. It would hook into the sensor APIs, cache the data, and allow the user to do whatever with it. If a web application isn't needed, the data could go straight to a live R/Python session or script. A nice feature to have would be for the sensors to all ping a server to announce their address periodically so they don't get lost when networks change around.

Notice how I haven't specified the sensor type? That's because it shouldn't matter. The system should be applicable to all types of sensors, plus pis with multiple sensors connected.

Set variable for absolute path

I just hardcoded it a few places to get things to work when started from rc.local, but this should be set as a variable and used as needed.

Configure port number more easily

If you have two pis running on the same network, should be on different ports for forwarding (although could use local IP for passing data).

Update README

  • source code is from book, modified by [fork source]
  • include cron command
  • include example use case(s)
  • include how to start and keep running (screen) and how to kill

Long gaps in history make page fail

I think this is because it's trying to query and getting nothing, after plugging in after a long time without data. Message in terminal:

REQUEST:
ImmutableMultiDict([])
range_h_form not a number
Received from browser: 2019-12-09 00:00, 2019-12-09 17:07, Etc/UTC, nan
2. From: 2019-12-09 00:00, to: 2019-12-09 17:07, timezone: Etc/UTC

Crossplot daily average temperature against furnace runtime to calculate relationship

Original plan was to use second Raspberry Pi to log hyperlocal outside temp and use that to compare, but probably quicker and nearly as accurate to query daily average temperature from a weather API.

The reason for doing this is to get more granularity for temperature values than a monthly therms statement does. Over the course of a year, you would get 12 pairs of therms/temperature values (and some of those would be meaningless if during the summer). That's not enough data to draw reasonable conclusions about the relationship (and confidence envelope) between the temperature and how much the furnace runs.

More granularity is needed if you want to change something about the house (raise or lower the thermostat setting, add insulation/sealing, increase/decrease number of people living in the house, etc.) and see the effects sooner (within days or weeks) rather than later (months on the statement) or never (if there are multiple factors, during the month, or the outside temperature doesn't hold steady).

I don't have a good grasp on an easy way to automate significance testing, but confidence limits around the regression line would be a start. Now this is starting to sound like my day job...

Delete old database entries

Delete old database entries so the db doesn’t take over all available space (“if count()>1000 drop etc.” or by timestamp, but row count is easier).

Probably configurable in the Flask app itself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.