Commit 058ade52 authored by Robert Ricci's avatar Robert Ricci

rtl_433 changed battery field name

parent e3d456f2
......@@ -31,7 +31,7 @@ for line in sys.stdin:
if str(j["id"]) in devices:
print("Inserting for device {}".format(j["id"]))
e = devices[str(j["id"])]
point = [{ "measurement": "temperature", "tags" : { "model" : j["model"], "id": j["id"], "name" : e["name"], "room" : e["room"], "floor" : e["floor"], "side" : e["side"] }, "time": datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S"), "fields": { "temerature_F": j["temperature_F"], "battery": j["battery"], "humidity" : j["humidity"] } }]
point = [{ "measurement": "temperature", "tags" : { "model" : j["model"], "id": j["id"], "name" : e["name"], "room" : e["room"], "floor" : e["floor"], "side" : e["side"] }, "time": datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S"), "fields": { "temerature_F": j["temperature_F"], "battery": j["battery_low"], "humidity" : j["humidity"] } }]
client.write_points(point, time_precision="s")
else:
print("Unknown device {}".format(j["id"]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment