[英]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.