Maxbotic ultrasonic 7092 water depth sensor, sending data via LoRa radio to a Raspberry Pi, which then is posting data online to bayou.pvos.org and farmos via a python script.
http://bayou.pvos.org/data/6hs74zsv4ecj?plot_param=distance_meters
import serial
import requests
# Define the serial connection.
ser=serial.Serial('/dev/ttyACM0')
# Read and convert data.
out=ser.readline()
a=eval(out)
b=a.decode("utf-8")
c=b.split(",")
depth_meters=c[0]
voltage=c[1]
# Send to farmOS.
= 'XXXX'
url = 'https://test.farmos.dev/asset/1f86f3f4-be57-4e16-99f6-84290afd0a7d/data/basic?private_key=' + private_key
payload = {
'depth_meters': depth_meters,
'voltage': voltage
}
requests.post(url, json=payload)