我想我在MySQL数据库模式,我想我的结构要由数据采集表形成,这将是一个自动生成天鹅,对于这些数据,然后它的后续相关的表与温室和用户。建模BD MYSQL天鹅FIWARE
所有表中的每个用户的所有传感器的数据,然后将之与每个用户和温室,我认为这是正确的做法。
但我试图创建两个订阅一个,在这个表元数据的另一个实体ID实体ID和另一个,但它会自动创建我的两个表和想法是尽在其中。
这怎么办?
我附上我的实体:
GET /v2/entities/ HTTP/1.1
Host: 1.2.3.4:1026
Accept: application/json
Content-Type: application/json
Fiware-Service: pruebastienda
Fiware-ServicePath: /tienda1
Cache-Control: no-cache
Postman-Token: e19de386-ca21-cd7d-cd24-f1dee9487196
[
{
"id": "palmerillas",
"type": "invernadero",
"pressure2": {
"type": "Integer",
"value": 6,
"metadata": {}
},
"sensor32": {
"type": "Integer",
"value": 1,
"metadata": {}
},
"sensor42": {
"type": "Integer",
"value": 44,
"metadata": {}
},
"temperature2": {
"type": "float",
"value": 4,
"metadata": {
"accuracy": {
"type": "Float",
"value": 9
}
}
}
},
{
"id": "palmerillas2",
"type": "invernadero2",
"pressure2": {
"type": "Integer",
"value": 6,
"metadata": {}
},
"sensor32": {
"type": "Integer",
"value": 1,
"metadata": {}
},
"sensor42": {
"type": "Integer",
"value": 44,
"metadata": {}
},
"temperature2": {
"type": "float",
"value": 4,
"metadata": {
"accuracy": {
"type": "Float",
"value": 9
}
}
}
}
]
我的订阅,以及:
GET /v2/subscriptions/ HTTP/1.1
Host: 1.2.3.4:1026
Accept: application/json
Fiware-Service: pruebastienda
Fiware-ServicePath: /tienda1
Cache-Control: no-cache
Postman-Token: 7898a397-2018-42fc-7edf-e35f25105901
[
{
"id": "59ca8b394df7c75fee3e1969",
"description": "A subscription to get info about palmerillas",
"status": "active",
"subject": {
"entities": [
{
"id": "palmerillas",
"type": "invernadero"
}
],
"condition": {
"attrs": [
"pressure2"
]
}
},
"notification": {
"timesSent": 2,
"lastNotification": "2017-09-26T17:16:04.00Z",
"attrs": [
"temperature2",
"pressure2",
"sensor32",
"sensor42"
],
"attrsFormat": "legacy",
"http": {
"url": "http://localhost:5050/notify"
},
"lastSuccess": "2017-09-26T17:16:04.00Z"
}
},
{
"id": "59ca8bb94df7c75fee3e196a",
"description": "A subscription to get info about palmerillas",
"status": "active",
"subject": {
"entities": [
{
"id": "palmerillas2",
"type": "invernadero2"
}
],
"condition": {
"attrs": [
"pressure2"
]
}
},
"notification": {
"timesSent": 2,
"lastNotification": "2017-09-26T17:17:56.00Z",
"attrs": [
"temperature2",
"pressure2",
"sensor32",
"sensor42"
],
"attrsFormat": "legacy",
"http": {
"url": "http://localhost:5050/notify"
},
"lastSuccess": "2017-09-26T17:17:56.00Z"
}
}
]
编辑:
表的名称是:
tienda1_palmerillas_invernadero AND tienda1_palmerillas2_invernadero2
,你可以在图片
请问您是否可以优化您的问题?我无法理解Orion的订阅是否存在问题,或者是否与MySQL中的Cygnus持久性有关。如果您可以发布任何错误消息,那也会很棒!谢谢:) – frb
您能编辑您的问题文章,以包括在MySQL生成的表的名称吗?谢谢! – fgalan
建议:不要在公共互联网上发布你的公共IP :)更好地使用一个疯狂的版本,例如150.214.y.z. – fgalan