我在做http://www.slideshare.net/FI-WARE/io-t-basicexercisesdevelopersweek的练习时遇到了一些困难
注册新设备时没有问题,它的实体也是在Orion上成功创建的,但是当查询创建的实体时,就会显示设备属性以外的实体。创建的实体只有TimeInstant属性。
在发送观察时,我得到了200条响应代码,但是它显然没有效果,因为CB上的实体属性丢失了。
注册设备
JSON
{
"devices": [
{
"device_id": "14:da:e9",
"entity_name": "Thing12",
"entity_type": "Thing12Type",
"protocol": "PDI-IoTA-UltraLight",
"timezone": "Europe/Madrid",
"attributes": [
{
"name": "weight",
"type": "double",
"object_id": "weight"
},
{
"name": "valid",
"type": "boolean",
"object_id": "valid"
}
]
}
]
}列表设备
JSON
{
"device_id": "14:da:e9",
"entity_name": "Thing12",
"entity_type": "Thing12Type",
"protocol": "PDI-IoTA-UltraLight",
"timezone": "Europe/Madrid",
"attributes": [
{
"name": "weight",
"type": "double",
"object_id": "weight"
},
{
"name": "valid",
"type": "boolean",
"object_id": "valid"
}
],
"service": "openiot",
"service_path": "/"
}查询CB
JSON
{
"contextElement": {
"type": "Thing12Type",
"isPattern": "false",
"id": "Thing12",
"attributes": [
{
"name": "TimeInstant",
"type": "ISO8601",
"value": "2015-06-25T13:07:18.354970Z"
}
]
},
"statusCode": {
"code": "200",
"reasonPhrase": "OK"
}
}发布于 2015-07-14 10:21:54
问题似乎是在图像猎户座-psb-图像-R4.2。在启动一个新实例(CentOS6.3init)并手动安装每个组件后,问题似乎得到了解决。可能是上一次版本之间的冲突。
发布于 2015-06-29 14:00:48
一旦发送与这些属性相关的观察结果,就会在ContextBroker中创建属性。只要尝试发送“权重”和“有效”的观察结果,您就应该能够在ContextBroker相关实体中看到这些属性。
如果这对你有用的话请告诉我们。
您观察到的非创建设备的行为是有意设计的,因此设备注册可能是可选的(尽管我们不推荐它)。
感谢您使用IDAS!
https://stackoverflow.com/questions/31051501
复制相似问题