Commit Graph

104 Commits

Author SHA1 Message Date
Andreas Zweili bbcf454d37 Remove version number from django 2022-08-29 18:32:34 +02:00
Andreas Zweili 4b207e0541 Update make file 2022-08-29 18:30:53 +02:00
Andreas Zweili 281da77402 Update scripts 2022-08-29 18:28:38 +02:00
Andreas Zweili 11bbb4a2d3 Update the gitignore 2022-08-29 18:19:49 +02:00
Andreas Zweili b98b860078 Update the Makefile 2022-08-29 18:19:26 +02:00
Andreas Zweili cd268dcb39 Add a .envrc file 2022-08-29 18:15:58 +02:00
Andreas Zweili d2e4ec97aa Correct tests for decimal points 2022-08-29 18:15:36 +02:00
Andreas Zweili 8f725e033f upgrade django to 2.2.13 2020-10-05 21:19:25 +02:00
Andreas Zweili 43d509eb23 activate the venv in the collector script as well 2020-10-05 21:15:56 +02:00
Andreas Zweili 597909f1aa fix django to version 2.2 2020-10-05 20:44:21 +02:00
Andreas Zweili c88da82a1b round the temp values to the third value 2020-10-05 20:44:03 +02:00
Andreas Zweili 5be6defa3b get the temps every 5 minutes 2020-10-05 20:43:46 +02:00
Andreas Zweili 5e4ae8840e activate the venv in the run script 2020-10-05 20:42:50 +02:00
Andreas Zweili 4bdda5491a increase collection frequenzy and accuracy 2020-03-10 22:05:14 +01:00
Andreas Zweili 29cdeef316 move environment variable to settings file 2020-03-10 21:59:04 +01:00
Andreas Zweili 2700e366f2 let the gunicorn run in foreground 2020-03-10 21:50:07 +01:00
Andreas Zweili 06245632c7 remove makemigrations from run command 2020-03-10 21:22:47 +01:00
Andreas Zweili fefebf2747 add make migrations command 2020-03-10 21:22:36 +01:00
Andreas Zweili 26aa800224 replace the make run commands with run.sh 2020-03-10 21:22:22 +01:00
Andreas Zweili 849e803664 stop ignoring migrations 2020-03-10 21:21:34 +01:00
Andreas Zweili 7f69201360 remove unnecessary code 2020-03-10 21:21:20 +01:00
Andreas Zweili 0ea964e7a9 add migrations 2020-03-10 21:20:13 +01:00
Andreas Zweili 9ba6aef420 replace nohub with & 2020-03-10 20:25:15 +01:00
Andreas Zweili 433a177e0c add migration scripts 2020-03-10 20:23:43 +01:00
Andreas Zweili ada5d8e25a make the run.sh script executable 2020-03-10 20:17:28 +01:00
Andreas Zweili f4d13f9500 collect data every 5 minutes 2020-03-10 20:16:03 +01:00
Andreas Zweili 54890d9358 move the django project one level up 2020-03-10 20:14:53 +01:00
Andreas Zweili 0a8a8d42f8 add a constant which fixes the inaccuracy of the SenseHat temp
This factor minimizes the difference between the messured temperature and the
real temperature down to average of 0.005653266331658
2019-11-02 16:08:16 +01:00
Andreas Zweili a0a291d82e rename the index_view test 2019-10-24 22:35:50 +02:00
Andreas Zweili e4ccc594af add a view which accepts hours as arguments
This views allows to select various timeranges which the site then can display.
2019-10-24 22:35:12 +02:00
Andreas Zweili 8ded8def06 implement command to clean old values from the database 2019-10-24 21:45:48 +02:00
Andreas Zweili c980c2ac76 fix the plots
The date was validated when the application startet not everytime the
view was called. This commit moves the date calculation to the view.
2019-10-23 10:28:03 +02:00
Andreas Zweili 4e391cb92c finish the Readme 2019-10-22 21:48:52 +02:00
Andreas Zweili cdb617c3a8 update tests to reflect newest changes 2019-10-22 21:38:10 +02:00
Andreas Zweili b62c510524 improve the Makefile
The Makefile commands sometimes wheren't working correctly.
This changes should help with that.
2019-10-22 21:37:42 +02:00
Andreas Zweili 2c5bac292a replace timezone with datetime
Since the plots are not really part of django they aren't returning timezone
objects which django can convert to the correct timezone. Therefore they are
always UTC. However we can disable the timezone support in django. The're might
be a more elegant solution to this but since this is just a small project I'll
leave it at that.
2019-10-21 19:42:03 +02:00
Andreas Zweili e0edc6e113 only gatter a datapoint every 5 minutes
This will allow us to display 144 data points on the main view which should be
more than enough.
2019-10-21 19:27:46 +02:00
Andreas Zweili 9841c3232d limit the queries to the last 12 hours 2019-10-21 19:27:33 +02:00
Andreas Zweili e7e72f1e31 add markers to the plots 2019-10-21 18:30:04 +02:00
Andreas Zweili f652725984 remove line smoothing
It doesn't really help with readability
2019-10-21 18:23:41 +02:00
Andreas Zweili 8756f1819e Merge branch 'master' of git.2li.ch:Nebucatnetzer/environment_sensors 2019-10-21 17:29:15 +02:00
Andreas Zweili c8906fdbdc improve the plots 2019-10-21 17:28:46 +02:00
Andreas Zweili 57c9adfa4d round all the collected results
The messurements are way to noisy when they are not rounded
2019-10-21 17:26:34 +02:00
Andreas Zweili f541511fbe remove the Time model 2019-10-21 06:57:44 +02:00
Andreas Zweili 52103ad3b7 the time should be time zone aware 2019-10-20 23:09:45 +02:00
Andreas Zweili 88dc88fa9f Revert "Revert "fix the data sclicing""
This reverts commit 5c44591010.
2019-10-20 23:00:22 +02:00
Andreas Zweili 879ac4e666 listen on all ips when running the server 2019-10-20 22:59:32 +02:00
Andreas Zweili 5c44591010 Revert "fix the data sclicing"
This reverts commit 470801783d.
2019-10-20 22:53:00 +02:00
Andreas Zweili 03b7cb5325 add the collector as a management command
This allows the command to be called by cron or a similar external tool
2019-10-20 22:51:35 +02:00
Andreas Zweili 9d01af07b9 remove the collector from the view
the collector shouldn't run every time the view gets called
2019-10-20 22:50:52 +02:00