Browse Source

lat and lon must be float

master
Tobias Brunner 9 months ago
parent
commit
03853b937a
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      lgt92.py

+ 3
- 3
lgt92.py View File

@ -93,7 +93,7 @@ def on_message_ttn(client, userdata, msg):
logging.info("Motion detection: %s", data["payload_fields"]["MD"])
logging.info("LED status for position: %s", data["payload_fields"]["LON"])
logging.info("Firmware version: %s", data["payload_fields"]["FW"])
# write to influxdb
logging.info("writing data to influxdb")
influxdb.write_points(
@ -106,8 +106,8 @@ def on_message_ttn(client, userdata, msg):
"bat": float(data["payload_fields"]["BatV"]),
"pitch": float(data["payload_fields"]["Pitch"]),
"roll": float(data["payload_fields"]["Roll"]),
"lat": data["payload_fields"]["Latitude"],
"lon": data["payload_fields"]["Longitude"],
"lat": float(data["payload_fields"]["Latitude"]),
"lon": float(data["payload_fields"]["Longitude"]),
"alarm": int(data["payload_fields"]["ALARM_status"]),
"counter": data["counter"],
"airtime": data["metadata"]["airtime"],


Loading…
Cancel
Save