upload_osm.py 299 B

12345678
  1. # def upload from forum.sensebox.de
  2. def upload_osm(sensor_id,value):
  3. url="https://ingress.opensensemap.org/boxes/%s/%s" % (sensebox_id,sensor_id)
  4. r = requests.post(url,json={'value': value})
  5. if r.status_code != requests.codes.ok:
  6. print("Error %d: %s" % (r.status_code,r.text))
  7. # end upload osm