[Fiware-soulfi-coaching] Receiving data from broker

Sholi Loewenthal sholi at humanityonline.org
Wed Mar 16 19:37:47 CET 2016


Hey

We've have been trying to get some live data into our broker from this
datasource (
https://data.lab.fiware.org/dataset/mobile-sensors/resource/34ca77f3-66b2-417b-8a8e-9c6378a7a57f)
using the Orion "federation" (subscribeContext / notifyContext, as
described here:
http://fiware-orion.readthedocs.org/en/develop/user/federation/index.html).

So far, our attempts haven't been successful - our broker isn't getting any
update fromthe orion.lab.fiware.org broker, but there are no error messages
so I'm at a loss. Here are the key commands I ran:

1) Generated an Auth token

bash token_script.sh

Username: myemail
Password:

Token: ume0SjyZ8tMUTi3PKf2SY7T1Ob4d5x

2) Subscribed to a specific attribute change on a specific entity

(curl http://orion.lab.fiware.org:1026/v1/subscribeContext -s -S --header
'Content-Type: application/json' \
    --header 'Accept: application/json' --header  "X-Auth-Token:
ume0SjyZ8tMUTi3PKf2SY7T1Ob4d5x" -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
            "type": "santander:device",
            "isPattern": "false",
            "id": "urn:x-iot:smartsantander:u7jcfa:mobile:fa3028"
        }
    ],
    "reference": "http://52.30.75.227:1026/v1/notifyContext",
    "duration": "P1M",
    "notifyConditions": [
        {
            "type": "ONCHANGE",
            "condValues": [
                "TimeInstant"
            ]
        }
    ],
    "throttling": "PT5S"
}
EOF

I then received the following server response:

{
    "subscribeResponse": {
        "duration": "P1M",
        "subscriptionId": "56d319e2b2b4e112955efed1",
        "throttling": "PT5S"
    }
}

So I believe this means my query was correct?

However, since then, the *TimeInstant* field has been updated, and our
Broker hasn't been notified at all (looking at the log). I have also done
some queries to check that my subscription exists
(/v1/updateContextSubscriptions, changing the duration) and some other
queryContext with the same type/id to make sure the attribute
*TimeInstant* exists,
that the selector is correct and that the values are changing.

Our broker is publicly available (you can check it with
http://52.30.75.227:1026/v1/contextEntities), so I'm not sure what else I
can do.

Thank you for your time.

Guillaume
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-soulfi-coaching/attachments/20160316/9624a0a5/attachment.html>


More information about the Fiware-soulfi-coaching mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy