Chttpd generalisation, external data expunge
This commit is contained in:
@@ -185,24 +185,20 @@ class DynamicData(object):
|
||||
hum_out_query = "{} {} {}".format(hum_q1, out_q2, q3)
|
||||
rs_temp_in = self.influx_weather_client.query(temp_in_query)
|
||||
rs_temp_out = self.influx_weather_client.query(temp_out_query)
|
||||
rs_hum_in = self.influx_weather_client.query(hum_in_query)
|
||||
rs_hum_out = self.influx_weather_client.query(hum_out_query)
|
||||
#rs_hum_in = self.influx_weather_client.query(hum_in_query)
|
||||
#rs_hum_out = self.influx_weather_client.query(hum_out_query)
|
||||
|
||||
# Let's get the data from DB
|
||||
header = "time,T(ins),T(out),Humi(ins),Humi(out)\n"
|
||||
yield header
|
||||
for Tin, Tout, Hin, Hout in zip(rs_temp_in['temphumi'],
|
||||
rs_temp_out['temphumi'],
|
||||
rs_hum_in['temphumi'],
|
||||
for Tout, Hout in zip(rs_temp_out['temphumi'],
|
||||
rs_hum_out['temphumi']):
|
||||
tm_temp = str(Tin["time"]).strip()
|
||||
temp_in_val = str(Tin["temp"]).strip()
|
||||
temp_out_val = str(Tout["temp"]).strip()
|
||||
hum_in_val = str(Hin["hum"]).strip()
|
||||
hum_out_val = str(Hout["hum"]).strip()
|
||||
#if tm_speed == tm_gust and tm_speed == tm_direction:
|
||||
#tm = strptime(speed["time"]).strip(), "%Y-%m-%dT%H:%M:%SZ")
|
||||
yield "{},{},{},{},{}\n".format(tm_temp, temp_in_val, temp_out_val, hum_in_val, hum_out_val)
|
||||
yield "{},{},{},{},{}\n".format(tm_temp, temp_out_val, hum_out_val)
|
||||
|
||||
@cherrypy.expose
|
||||
def pressure_monitor(self, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user