def updategraph(): import json rep = abhomeclass.abDB() bstats = abhomeclass.getTechStats() hometemps = rep.getGoogleTableDataHomeTemps(6) boilertemps = rep.getGoogleTableDataBoilerTemps(6) print json.dumps({'hometemps':hometemps, 'boilertemps':boilertemps}) return json.dumps({'hometemps':hometemps, 'boilertemps':boilertemps})
def userHome(): timeParam = getPageParam('time') currentuser = session.get('username') rep = abhomeclass.abDB() stats = abhomeclass.MakeStatsHTMLBlock(rep, timeParam) bstats = abhomeclass.getTechStats() hometemps = rep.getGoogleTableDataHomeTemps(timeParam) boilertemps = rep.getGoogleTableDataBoilerTemps(timeParam) return render_template('userHome.html', user=currentuser, chart1=hometemps, chart2=boilertemps, stats=stats, bstats=bstats)
def boilerSettings(): # return render_template('error.html', error='page not impemented.', message='work in progress') timeParam = getPageParam('time') currentuser = session.get('username') rep = abhomeclass.abDB() stats = abhomeclass.MakeStatsHTMLBlock(rep, timeParam) bstats = abhomeclass.getTechStats() hometemps = rep.getGoogleTableDataHomeTemps(timeParam) boilertemps = rep.getGoogleTableDataBoilerTemps(timeParam) return render_template('boilerSettings.html', user=currentuser, var=timeParam, chart1=hometemps, chart2=boilertemps, stats=stats, bstats=bstats)
def jsonstatus(): import json bstats = abhomeclass.getTechStats() return json.dumps(bstats.getDict())