Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Enabler:STH-Comet
Description
Created question in FIWARE Q/A platform on 08-09-2017 at 11:09
Please, ANSWER this question AT https://stackoverflow.com/questions/46112683/error-get-empty-value-when-retriving-data-from-sth-comet
Question:
Error get empty value when retriving data from sth-comet
Description:
First i register service using this script
curl -H "Content-type: application/json" -H "Fiware-Service:
cairoUniversity" -H "Fiware-ServicePath: /FCI/ICDL" \
http://X.X.X.X:4041/iot/services -d '{ "services": [
] }'
then i register device using this
curl http://X.X.X.X:4041/iot/devices \ -H "Content-type:
application/json" -H "Fiware-Service:cairoUniversity" -H
"Fiware-ServicePath: /FCI/ICDL" \ -d '{ "devices": [
{
"device_id": "smartmeter2",
"entity_name": "ICDL2",
"entity_type": "Camps",
"protocol": "PDI-IoTA-UltraLight",
"timezone": "Europe/Madrid",
"attributes": [
]
} ] }'
then i make subscription to orion
curl -X POST -H "Content-Type: application/json" -H "Accept:
application/json" -H "Fiware-Service: cairoUniversity" \
-H "Fiware-ServicePath: /FCI/ICDL" -H "Cache-Control: no-cache" -d '{
"entities": [
],
> "attributes": [
"Conscemption"
],
"reference": "http://X.X.X.X:8666/notify",
"duration": "P1M",
"notifyConditions": [
] }' "http://X.X.X.X:1026/v1/subscribeContext" }
after that i send observation
curl "http://X.X.X.X:7896/iot/d?k=api1&i=smartmeter2" -d 'c|47' -H
"Content-type: text/plain"
and finally retrieve data from sth
curl -X GET \
'http://X.X.X.X:8666/STH/v1/contextEntities/type/Camps/id/ICDL/attributes/Conscemption?aggrMethod=min&aggrPeriod=day&dateFrom=2015-01-28T00%3A00%3A00&dateTo=2018-01-01T23%3A59%3A59'
\ -H 'accept: application/json' \ -H 'cache-control: no-cache' \
-H 'content-type: application/json' \ -H 'fiware-service: cairoUniversity' \ -H 'fiware-servicepath: /FCI/ICDL' | python
-mjson.tool }
i got this respones
"contextResponses": [
{
"contextElement": {
"attributes": [
],
"id": "ICDL",
"isPattern": false,
"type": "Camps"
},
"statusCode":
}
]
and this the logs
sth-comet | time=2017-09-04T14:26:44.782Z | lvl=INFO | corr=n/a |
trans=n/a | op=OPER_STH_SERVER_LOG | from=n/a | srv=n/a | subsrv=n/a |
comp=STH | msg=Everything OK, 0 requests attended in the last 60s
interval sth-comet | time=2017-09-04T14:27:44.787Z | lvl=INFO |
corr=n/a | trans=n/a | op=OPER_STH_SERVER_LOG | from=n/a | srv=n/a |
subsrv=n/a | comp=STH | msg=Everything OK, 0 requests attended in the
last 60s interval
sth-comet | time=2017-09-04T14:27:52.834Z | lvl=WARN |
corr=99577e81-bbd4-4130-95f6-a9d029f84db0 |
trans=99577e81-bbd4-4130-95f6-a9d029f84db0 | op=OPER_STH_GET |
from=n/a | srv=cairoUniversity | subsrv=/FCI/ICDL | comp=STH |
> msg=Error when getting the aggregated data collection for retrieval
(the collection may not exist)
sth-comet | time=2017-09-04T14:28:44.792Z | lvl=INFO | corr=n/a |
trans=n/a | op=OPER_STH_SERVER_LOG | from=n/a | srv=n/a | subsrv=n/a |
comp=STH | msg=Everything OK, 0 requests attended in the last 60s
interval sth-comet | time=2017-09-04T14:29:44.797Z | lvl=INFO |
corr=n/a | trans=n/a | op=OPER_STH_SERVER_LOG | from=n/a | srv=n/a |
subsrv=n/a | comp=STH | msg=Everything OK, 0 requests attended in the
last 60s interval sth-comet | time=2017-09-04T14:30:44.805Z |
lvl=INFO | corr=n/a | trans=n/a | op=OPER_STH_SERVER_LOG | from=n/a |
srv=n/a | subsrv=n/a | comp=STH | msg=Everything OK, 0 requests
attended in the last 60s interval sth-comet |
time=2017-09-04T14:31:44.811Z | lvl=INFO | corr=n/a | trans=n/a |
op=OPER_STH_SERVER_LOG | from=n/a | srv=n/a | subsrv=n/a | comp=STH |
msg=Everything OK, 0 requests attended in the last 60s interval
What may case this problem and how solve it
2018-01-12 19:49|CREATED monitor | # answers= 0, accepted answer= False