I have been following a fellow pi users instructions to setup a temperature logger which logs to a sqlite DB (works great), and then use Ploticus to create a graph based on the data logged to the DB.
The code I have been given is as follows:
Code: Select all
sqlite3 -csv temperature.db "select * from PivotTemps10min where timeslot > datetime('now','-24 hour');" | ploticus -png -o 24h.png -prefab chron data=- delim=comma header=no gapmissing=yes unittype=datetime mode=line datefmt="yyyy-mm-dd" x=2 y=3 y2=4 y3=5 y4=6 xinc="3 hour" legendfmt=singleline xstubfmt="hh" title="Temperature over the last 24 hours" xlbl="Time" xlbldet="adjust=0,-0.15" ylbl="°C" autodays=yes yrange="0 100" xgrid=yes ygrid=yes name="Value" name2="Panel Out" name3="HWS Out" name4="Loft" xmargin=0 > /dev/null 2>&1Code: Select all
sudo cp 24h.png /usr/share/nginx/www/I am curious if someone knows how to help me point ploticus to look at my temerature.db, and specifically my table called 'PivotTemps10min', and plot the field Demo_Thermometer
I understand about 50% of that ploticus code, but I do not understand how it is reading the data from the DB (i assume it is not, hence the empty output).
Cheers