Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 04-09-2019 at 10:09
Please, ANSWER this question AT https://stackoverflow.com/questions/57784710/orion-subscriptions-that-never-receive-changes
Question:
Orion subscriptions that never receive changes
Description:
I'm having a problem with some entities to make the subscriptions. The subcriptions are well done (orion responds ok. Status 201) but the url subscribed never receive any update.
I have fiware-orion launched with docker over a Centos 7.
This is an example of the entity.
{
"id": "urn:ngsi-ld:ParkingGroup:Cervantes",
"type": "ParkingGroup",
"allowedVehicleType": {
"type": "Property",
"value": "car",
"metadata": {}
},
"availableSpotNumber": {
"type": "Property",
"value": 59,
"metadata": {}
},
"category": {
"type": "Property",
"value": [
"offstreet",
"feeCharged"
],
"metadata": {}
},
"chargeType": {
"type": "Property",
"value": [
"temporatyPrice"
],
"metadata": {}
},
"description": {
"type": "Property",
"value": "Calle CervantesMálaga",
"metadata": {}
},
"location": {
"type": "GeoProperty",
"value":
,
"metadata": {}
},
"name": {
"type": "Text",
"value": "Cervantes",
"metadata": {}
},
"occupancyDetectionType": {
"type": "Property",
"value": "none",
"metadata": {}
},
"permitActiveHours": {
"type": "Property",
"value": "",
"metadata": {}
},
"requiredPermit": {
"type": "Property",
"value": "noPermitNeeded",
"metadata": {}
},
"totalSpotNumber": {
"type": "Property",
"value": "414",
"metadata": {}
}
}
I try different ways of subscriptions that all of them are accepted by orion like this:
{
"description": "Notificar cambios en Aparcamientos",
"subject": {
"entities": [
],
"condition":
},
"notification": {
"attrs" : ["availableSpotNumber"],
"http":
}
}
When I update the data with this through postman in mode PUT:
http://orion/v2/entities/urn:ngsi-ld:ParkingGroup:Cervantes/attrs/availableSpotNumber/value
and Body (text/plain) with value 2
The data is well ubdate when I make in postman in mode GET:
http://orion/v2/entities/urn:ngsi-ld:ParkingGroup:Cervantes/attrs/availableSpotNumber
It returns:
{
"type": "Property",
"value": 2,
"metadata": {}
}
But url of the subscription never receives anything
what is wrong?
How can I solve it? How could I debug Orion to understand why it doesn't update the subscriptors?
The idea is to subscribe later cygnus. I have read that I must add the attrsFormat for it in this way:
"notification": {
"http":
,
"attrs" : ["availableSpotNumber"],
"attrsFormat": "legacy"
}
Thanks in advance
2019-09-04 12:06|CREATED monitor | # answers= 0, accepted answer= False