Created
August 8, 2018 05:53
-
-
Save a0726h77/537b850dd5def65600ddae8ea11d6285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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