(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
LWM2M-Client> create /3312/0
LWM2M-Client> set /3312/0 0 Off
LWM2M-Client> connect localhost 5683 weather1 /
{"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]"}
LWM2M-Client> set /3312/0 0 On
{"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]"}
LWM2M-Client> create /3312/0
LWM2M-Client> set /3312/0 0 Off
LWM2M-Client> connect localhost 5683 weather1 /
{"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."}
LWM2M-Client> set /3312/0 0 On
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
Spected behaviour:
Starting LwM2M client
IoTAgent log:
Note: Observing value from resource /3312/0/0as spectedIoTAgent response on device resurce update:
Cliente resource updateIoTAgent logCurrent behaviour:
Starting LwM2M client
IoTAgent log:
Note: no "Observing value from resource" announced!!IoTAgent response on device resurce update:
No IoTAgent device changing resource value on log