[英]Missing attributes on Orion CB Entity when registering device through IDAS
从http://www.slideshare.net/FI-WARE/io-t-basicexercisesdevelopersweek开始练习,我遇到了一些麻烦。
注册新设备时没有问题,它的实体也在Orion CB上成功创建,但在查询创建的实体时,不显示设备属性。 Created Entity只有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"
}
}
问题似乎出现在图像orion-psb-image-R4.2上。 启动新实例(CentOS-6.3init)并手动安装每个组件后,问题似乎已解决。 可能是之前实例中版本之间的冲突。
只要发送与这些属性相关的观察结果,就会在ContextBroker中创建属性。 只是尝试发送“权重”和“有效”的观察结果,您应该能够在ContextBroker相关实体上看到这些属性。
如果这对您有用,请告诉我们。
您为非创建设备观察到的行为是故意设计的,因此设备注册可能是可选的(尽管我们不建议这样做)。
感谢您使用IDAS!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.