ThermoMan / Thermostat-Tracking

Code to track and chart data from the 3M-50 WiFi enabled thermostat
8 stars 10 forks source link

heat/fan/cool gradients could possibly draw off the chart #54

Closed unlstorm closed 6 years ago

unlstorm commented 10 years ago

It it because of the $sqlThree query. I think we can avoid that query all together if the current day does not fall into the range of the currently plotted data. Is it easy to see if "today" falls between the range of $start_date and $end_date and only if it does, perform the sqlThree query?

ThermoMan commented 10 years ago

Unless the clock is wrong or someone is trying to do a chart for a future date then you only need to compare today with end_date.
So sqlThree should only be included if end_date >= today

Does that seem logical?

ThermoMan commented 6 years ago

I am replacing pChart with a client side JavaScript charting utility. Before I moved the code off the hosted server I was getting tasks killed because I was using too much of the CPU and as a consequence, no more charts. New code posting soon-ish.