【问题标题】:Orion - cygnus integration猎户座-天鹅座整合
【发布时间】:2016-01-29 09:26:58
【问题描述】:

我们正在尝试将 Orion、Cygnus 和 Ckan 整合在一起。 为了实现这一点,我已按照以下步骤操作:

  1. 使用 Fiware Ckan 信息安装和配置 Cygnus(Cygnus 启动并运行)
  2. 登录 Ckan 并获取 API 密钥并在 Cygnus 设置中进行配置
  3. 猎户步:

queryUpdate = 追加数据

{
"contextElements": [{
    "type": "Room",
    "isPattern": "false",
    "id": "26JanRoom",
    "attributes": [{
        "name": "temperature",
        "type": "float",
        "value": "888"
    }]
}],
"updateAction": "APPEND"
}

subscribeContext = 使用上面创建的实体 id 订阅(我们的 Cygnus 主机作为参考 "reference": "CYGNUS HOST", )

{
"entities": [{
    "type": "Room",
    "isPattern": "false",
    "id": "26JanRoom"
}],
"attributes": ["temperature"],
"reference": "CYGNUS HOST",
"duration": "P1M",
"notifyConditions": [{
    "type": "ONCHANGE",
    "condValues": ["temperature"]
}],
"throttling": "PT5S"
}

queryUpdate = 更新数据

{
"contextElements": [{
    "type": "Room",
    "isPattern": "false",
    "id": "26JanRoom",
    "attributes": [{
        "name": "temperature",
        "type": "float",
        "value": "111"
    }]
}],
"updateAction": "UPDATE"
}

我们期望在 Cygnus 端收到一些通知,但没有从 Orion 发送任何消息 (orion.lab.fi-ware.org:1026/)

您能帮我们解决这个问题吗?

谢谢kr

奥马尔·奥兹德米尔

【问题讨论】:

    标签: fiware-orion fiware-cygnus


    【解决方案1】:

    你正在使用

    "condValues": ["pressure"]
    

    这意味着每次名为pressure的属性发生变化时,Orion都会触发通知。但是,您的更新是修改temperature

    请查看 Orion 文档中的 the subscribe context operation section

    【讨论】:

    • 您好 Fermin,感谢您的评论,实际上我正在使用您已链接的本指南,如果您在此处查看,则在使用温度和压力的请求中存在错误 :) 我有从压力变为温度但什么都没有发生,我在天鹅座日志中没有看到猎户座的通知..您对此有任何想法吗?
    • 如果您在文档中提到condValues 使用压力和attributes 使用温度,请注意这不是错误而是有意的,以说明两者之间的差异:"在这种情况下,当 Room1 压力发生变化时,会通知 Room1 温度值,而不是压力本身”.
    • 关于新问题,我建议在 StackOverlfow 上发布一个新问题以处理它,以便将问题(及其潜在的解决方案)分开,请。谢谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-03
    相关资源
    最近更新 更多