Expunge external data collection

This commit is contained in:
2019-05-26 16:58:49 +02:00
parent 7d3b91340e
commit 866e5f9db9

View File

@@ -332,18 +332,13 @@ if '__main__':
raw_winddir = davis_data['b1']
wind = davis_decoder.decode_wind({"windspeed": raw_windspeed,
"winddir": raw_winddir})
# Get data external to the ISS, from local PCB / internal
# sensors and create base values for influx writing
'''
This shit ain't working without external sensors
davis_decoder.load_external_data()
influx_weather_write = davis_writer.base_construct(
{ "speed": float(wind['speed']),
"direction": float(wind['direction']),
"temperature": float(davis_decoder.inside_temp),
"humidity": float(davis_decoder.inside_hum)}
)'''
)
# Wind gusts calculation
if davis_packet_id == '0x9':
@@ -361,19 +356,6 @@ if '__main__':
raw_temp = (davis_data['b2'] << 8) + davis_data['b3']
temp_dict = davis_decoder.decode_temp(raw_temp)
temp = float(temp_dict['celsius'])
pressure_adjusted = davis_decoder.adjust_pressure(temp)
influx_weather_write = davis_writer.construct(
influx_weather_write,
"temphumi",
{"pressure": float(pressure_adjusted)},
{"type" : "adjusted"}
)
influx_weather_write = davis_writer.construct(
influx_weather_write,
"temphumi",
{"pressure": float(davis_decoder.pressure)},
{"type" : "raw"}
)
influx_weather_write = davis_writer.construct(
influx_weather_write,
@@ -461,11 +443,15 @@ if '__main__':
temp,
wind,
humidity)
'''
External sensors again
out2 = "Padj: {}, Praw {}, Tins: {}, Humins: {}".format(
pressure_adjusted,
davis_decoder.pressure,
davis_decoder.inside_temp,
davis_decoder.inside_hum)
'''
out3 = "RainState: {}, Rrate {}, Rain Total: {}, Cap:{}, Volt: {}".format(
rainstate,
rainrate,
@@ -473,7 +459,7 @@ if '__main__':
supercap,
solarvolt)
print("\n{} \n{} \n{} \n{}\n".format(out_id, out1, out2, out3))
print("\n{} \n{} \n{}\n".format(out_id, out1, out3))
# Write the whole blob into Influx DB
influx_weather_client.write_points(influx_weather_write)