1

「ユーザーとプログラマー ガイド」で例を試していますが、サブスクライブした後、通知を受け取ることができません。更新とクエリはうまく機能しています。「受容体」スクリプトはこのように開始されます

./accumulator-server.py 1028 /accumulate on

そしてそれは稼働しているようです

verbose mode is on
 * Running on http://0.0.0.0:1028/ 

その後、サブスクリプションも問題ないようです

(curl localhost:1026/NGSI10/subscribeContext -s -S --header 'Content-Type: application/json' --      header 'Accept: application/json' -d @- | python -mjson.tool) <<EOF
{
    "entities": [
        {
        "type": "Room",
        "isPattern": "false",
        "id": "Room1"
    }
],
"attributes": [
    "temperature"
],
"reference": "http://localhost:1028/accumulate",
"duration": "P1M",
"notifyConditions": [
        {
            "type": "ONTIMEINTERVAL",
            "condValues": [
                "PT10S"
            ]
        }
    ]
    }
   EOF

応答:

{
    "subscribeResponse": {
    "duration": "P1M", 
    "subscriptionId": "535e558d28604367380deb5c"
    }
}

次に、Room1 の更新

curl  -v localhost:1026/NGSI10/updateContext --header 'Content-Type: application/json' --header 'Accept: application/json' -d @-  <<EOF
> {
>     "contextElements": [
>         {
>             "type": "Room",
>             "isPattern": "false",
>             "id": "Room1",
>             "attributes": [
>             {
>                 "name": "temperature",
>                 "type": "centigrade",
>                 "value": "x"
>             },
>             {
>                 "name": "pressure",
>                 "type": "mmHg",
>                 "value": "x"
>             }
>             ]
>         }
>     ],
>     "updateAction": "UPDATE"
> }
> EOF
* About to connect() to localhost port 1026 (#0)
*   Trying ::1... connected
* Connected to localhost (::1) port 1026 (#0)
> POST /NGSI10/updateContext HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2
> Host: localhost:1026
> Content-Type: application/json
> Accept: application/json
> Content-Length: 454
> 
< HTTP/1.1 200 OK
< Content-Length: 513
< Content-Type: application/json
< Date: Mon, 28 Apr 2014 12:08:38 GMT
< 
{
  "contextResponses" : [
    {
      "contextElement" : {
        "type" : "Room",
        "isPattern" : "false",
        "id" : "Room1",
        "attributes" : [
          {
            "name" : "temperature",
            "type" : "centigrade",
            "value" : ""
          },
          {
            "name" : "pressure",
            "type" : "mmHg",
            "value" : ""
          }
        ]
      },
      "statusCode" : {
        "code" : "200",
        "reasonPhrase" : "OK"
      }
    }
  ]
}
* Connection #0 to host localhost left intact
* Closing connection #0

しかし、accumulator-serverの出力には何も表示されません

私が間違っている可能性があることについて何か考えはありますか?

4

1 に答える 1