Skip to content

Instantly share code, notes, and snippets.

@a0726h77
Created August 8, 2018 05:53
Show Gist options
  • Save a0726h77/537b850dd5def65600ddae8ea11d6285 to your computer and use it in GitHub Desktop.
Save a0726h77/537b850dd5def65600ddae8ea11d6285 to your computer and use it in GitHub Desktop.
# -*- coding:utf-8 -*-
import requests
DEV_ID = '' # MiFlora MAC
url = 'https://api.ohg.ag/iot/data/%s' % DEV_ID
sensor_data = [1970, 59, 26.2, 1376] # 光照, 水分, 溫度, 肥力
r = requests.post(url, json={"data": sensor_data})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment