a2961656123 发表于 2016-7-26 13:14:44

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");
}

a2961656123 发表于 2016-7-26 16:16:44

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");
}
是不是这里的代码有问题?

a2961656123 发表于 2016-7-27 16:40:54

" http://api.yeelink.net/v1.0/device/" 改成" http://api.yeelink.net/v1.1/device/" 的话 是否可以?
页: [1]
查看完整版本: arduino yun DHT11 上传yeelink问题