Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obseve creation on register stage issue #207

Open
dherykw opened this issue Oct 17, 2019 · 2 comments
Open

Obseve creation on register stage issue #207

dherykw opened this issue Oct 17, 2019 · 2 comments

Comments

@dherykw
Copy link
Contributor

dherykw commented Oct 17, 2019

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

@fgalan
Copy link
Member

fgalan commented Nov 6, 2019

What about the new IOTA LWM2M version (1.3.0)? The behaviour keeps the same?

@dherykw
Copy link
Contributor Author

dherykw commented Nov 6, 2019

Yes, it does, this is not releated with the previous issues.

I have double checked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants