3

I have followed the official guide about entity creation/update and subscribtion in Orion, they are working and I get success responses. But Orion doesnt send notifications to Cygnus.

Am i missing some step here?

These are the basic scripts I am using:

create entity

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

subscribe entity http://orion.lab.fiware.org:1026/v1/subscribeContext

{
"entities": [
    {
        "type": "Room",
        "isPattern": "false",
        "id": "2FebRoom"
    }
],
"attributes": [
    "temperature"
],
"reference": "http://A.B.C.D:5050/notify",
"duration": "P1M",
"notifyConditions": [
    {
        "type": "ONCHANGE",
        "condValues": [
            "temperature"
        ]
    }
],
"throttling": "PT5S"
}

update entity

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

I can query the new value in Orion after the update operation but Cygnus doesnt receive any notification, what would be the problem?

Many thanks

dmtzz
  • 223
  • 2
  • 8
  • Just to confirm... I undesrtand that update are using different temperature values each time (i.e. not always 111 as shown in the question post). Is that correct? Thanks! – fgalan Feb 03 '16 at 11:01
  • Is "CYGNUS_URL" a literal value or an ofuscation of the actual URL. In the second case, could you edit your question post to include the actual URL, please? If you want to ofuscate you public IP, you can use something like "A.B.C.D.". Thanks! – fgalan Feb 03 '16 at 11:03
  • Hello Fermin, yes we send different values each time, we didnt want to post our public cygnus url so i changed it to CYGNUS_URL :) i will change to A.B.C.D now – dmtzz Feb 03 '16 at 11:25
  • Next step is to check if Orion is sending notifications. The procedure depends on the Orion version. Could you update your post to include the Orion version you are using in the question (i.e. the one you get with `contextBroker --version`), please? – fgalan Feb 03 '16 at 11:45
  • we are using the global orion instance :) so i updated the subscribe request with the post url – dmtzz Feb 03 '16 at 12:07
  • Orion at orion.lab.fiware.org runs 0.27.0. Thus, you could use the `GET /v2/subscriptions/` to get information of a given subscription. In particular, have a look to the `timesSent` field. Is this field increased each time you update entity temperature? – fgalan Feb 03 '16 at 14:58
  • i am seeing that it increases when i send update requests. PS: btw I have been using orion api `v1` in all my requests, should i update to `v2` ? – dmtzz Feb 04 '16 at 11:38
  • 1
    Increment in `timesSent` means that Orion is sending (or attempting to send at least) notifications. Is the 5050 port opened (both in security group -if appliable- and local fiwewall) in the A.B.C.B to receive connections from orion.lab.fiware.org? PD. You don't need to use NGSIv2 but probably it is a good ideal, given that is a newer (and improved) version of the API. However, note that NGSIv2 is yet in beta status so some changes could happen in existing functionality. – fgalan Feb 04 '16 at 15:58
  • You can check connectitivy to a given remote port from a given host using the `telnet` command. – fgalan Feb 05 '16 at 10:09
  • Hello Fermin justa quick note, I still cant get notifications from global Orion instance, installed Orion locally via docker and I can see that notificiations from local Orion to local Cygnus do work.. I dont know why global one doesnt send me the noitifcations. PS: 5050 port is now reachable with telnet, curl.. – dmtzz Feb 18 '16 at 12:11
  • So you mean that you are not able to get notifications from Orion global instance but you are able to receive notifications from Orion private instance running in the same machine than Cygnus. Is that correct? – fgalan Feb 18 '16 at 12:55
  • yes correct, and im sending requests from my work laptop which is not related with these components. – dmtzz Feb 18 '16 at 13:17
  • There has been a transient problem with outgoing notifications from orion.lab.fiware.org that hopefully has been solved today. Could you test again in order to check if it works now, please? Thanks! – fgalan Feb 22 '16 at 11:58

1 Answers1

0

Problem was caused by a temporal outage in outgoing notifications from orion.lab.fiware.org. The problem has been solved.

fgalan
  • 11,732
  • 9
  • 46
  • 89
  • It would be great to have a confirmation from @dmtzz about everything is working now but, even without it, the answer describes the most probable cause of the problem. – fgalan Feb 24 '16 at 16:30