arduino yun DHT11 上传yeelink问题
本帖最后由 a2961656123 于 2016-7-28 15:49 编辑void postValue(int sensor, float value) {
Process p;
p.runShellCommand("curl --request POST -d '{\"timestamp\":\"'"
+ String("`date '+%Y-%m-%dT%T'`")
+ "'\",\"value\":"
+ value
+ "}' --header \"U-ApiKey: 07b0df386a8650ea66fb0181628c212d\""
+ " http://api.yeelink.net/v1.0/device/"
+ DEVICEID
+ "/sensor/"
+ sensor
+ "/datapoints");
} void postValue(int sensor, float value) {
Process p;
p.runShellCommand("curl --request POST -d '{\"timesstamp\":\"'"
+ String("`date '+%Y-%m-%dT%T'`")
+ "'\",\"value\":"
+ value
+ "}' --header \"U-ApiKey: xxx\""
+ " http://api.yeelink.net/v1.0/device/"
+ DEVICEID
+ "/sensor/"
+ sensor
+ "/datapoints");
}
是不是这里的代码有问题? " http://api.yeelink.net/v1.0/device/" 改成" http://api.yeelink.net/v1.1/device/" 的话 是否可以?
页:
[1]