从云端看到curl 发送的数据和api 说明文档是一致的,但是服务器总是返回错误<h1>Server Error (500)</h1>,但是查询timer实际已经创建了的,但是到了设定时间并没有任何动作
{
"body": {
"timers": [
{
"type": "FIXEDTIME",
"time_actions": [
{
"action": "action1",
"time": "201504072240"
}
]
}
]
},
"get": {
"is_humanize_format": "true"
},
"created": "2015-04-07 22:40:50",
"token": "xxx",
"meta": {
"Authorization": "token xxx"
},
"path": "/v1/device/timers/",
"post": {},
"method": "POST"
}
创建云端定时器服务器返回错误
Re: 创建云端定时器服务器返回错误
Postby wuyunzhou » Fri Apr 10, 2015 4:41 pm
你好,对于 FIXEDTIME 类型的定时器,时间需要准时,支持格式 20150410163301,请注意:这里总共 14 个数字,你上面才有 12 个,能创建成功是服务端验证不足,本来是不能成功的。
另外一个特别需要注意的:
考虑到网络的不可靠,现在的运行模式是这样的:
1)服务端并不直接去调度 device,只是起到一个通知功能。device 接收到 timer 事件之后,设置 sdk 内部的 timer。
2)当服务器设置 timer 之后,会转发到 device,如果 device 回复 nonce: , status: 200, 那么这个 timer 设置成功。sdk 内部自行保证按照时间去调度一定的 action。
同样的,还有更新,删除等事件。
另外一个特别需要注意的:
考虑到网络的不可靠,现在的运行模式是这样的:
1)服务端并不直接去调度 device,只是起到一个通知功能。device 接收到 timer 事件之后,设置 sdk 内部的 timer。
2)当服务器设置 timer 之后,会转发到 device,如果 device 回复 nonce: , status: 200, 那么这个 timer 设置成功。sdk 内部自行保证按照时间去调度一定的 action。
同样的,还有更新,删除等事件。
Who is online
Users browsing this forum: No registered users and 7 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.