Skip to content

Obseve creation on register stage issue  #207

@dherykw

Description

@dherykw

Release: 1.0.0

  • Problem:
    When a device is provisioned dinamically on the resource / actives resources (observables) are not announced and obsdervers are not created.

  • Scenario:
    This scenario assume that there is a lightweightm2m-iotagent server running.

    Provisioning device

    (curl localhost:4041/iot/services -s -S --header 'Content-Type: application/json'   --header 'Accept: application/json' --header 'fiware-service: weather' --header 'fiware-servicepath: /balloons'   -d @- | python -mjson.tool) <<EOF
        {
            "services": [
                {
                    "resource": "/", // caution! problematic resource
                    "apikey": "",
                    "type": "WeatherBalloon",
                    "commands": [],
                   "lazy": [
                        {
                            "name": "Longitude",
                           "type": "double"
                    },
                    {
                        "name": "Latitude",
                        "type": "double"
                   },
                   {
                        "name": "Temperature Sensor",
                       "type": "degrees"
                   }
              ],
             "attributes": [
                 {
                      "name": "Power Control",
                     "type": "Boolean"
                 }
              ]
          }
       ]
    }
    EOF

    Spected behaviour:

    Starting LwM2M client

      LWM2M-Client> create /3312/0
      LWM2M-Client> set /3312/0 0 Off
      LWM2M-Client> connect localhost 5683 weather1 /
    

    IoTAgent log:

    {"op":"LWM2MLib.Registration","time":"2019-10-17T13:15:49.794Z","lvl":"DEBUG","msg":"Registration request ended successfully"}
    {"op":"LWM2MLib.InformationReporting","time":"2019-10-17T13:15:49.844Z","lvl":"DEBUG","msg":"Observing value from resource /3312/0/0 in device [1]"}{"op":"LWM2MLib.InformationReporting","time":"2019-10-17T13:15:49.854Z","lvl":"DEBUG","msg":"Got first piece of data on resource /3312/0/0 in device [1]"}{"op":"IOTAgent.LWM2MHandlers","time":"2019-10-17T13:15:49.854Z","lvl":"DEBUG","msg":"Handling data from device [weather1]"}
    

    Note: Observing value from resource /3312/0/0 as spected

    IoTAgent response on device resurce update:
    Cliente resource update

      LWM2M-Client> set /3312/0 0 On
    

    IoTAgent log

      {"op":"LWM2MLib.InformationReporting","time":"2019-10-17T13:17:16.108Z","lvl":"DEBUG","msg":"New data on resource /3312/0/0 in device [1]"}
      {"op":"IOTAgent.LWM2MHandlers","time":"2019-10-17T13:17:16.108Z","lvl":"DEBUG","msg":"Handling data from device [weather1]"}
    

    Current behaviour:

    Starting LwM2M client

      LWM2M-Client> create /3312/0
      LWM2M-Client> set /3312/0 0 Off
      LWM2M-Client> connect localhost 5683 weather1 /
    

    IoTAgent log:

      {"op":"LWM2MLib.Registration","time":"2019-10-17T13:24:34.276Z","lvl":"DEBUG","msg":"Registration request ended successfully"}
      {"time":"2019-10-17T13:24:34.326Z","lvl":"DEBUG","msg":"Observers created successfully."}
    

    Note: no "Observing value from resource" announced!!

    IoTAgent response on device resurce update:

      LWM2M-Client> set /3312/0 0 On
    

    No IoTAgent device changing resource value on log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions