telefonicaid / lightweightm2m-iotagent

IoT Agent accepting COAP requests. Designed to be a bridge between the OMA Lightweight M2M protocol and the NGSI interface.
https://fiware-iotagent-lwm2m.rtfd.io/
GNU Affero General Public License v3.0
24 stars 30 forks source link

lwm2m formats are deprecated? #279

Closed RaiseYourChicken closed 2 years ago

RaiseYourChicken commented 2 years ago

https://github.com/eclipse/leshan/issues/1284

This is an issue I posted on the leshan github about their client, I was getting a fatal error on the iot agent which is now solved, the messages arrive but the value is however still encoded (as you can see in the logs below) and when it posts the value to the mongodb (or orion I have no idea) it sends it empty because it can't decode the value received.

kallisto-fiware-iot-agent | time=2022-07-14T10:30:33.030Z | lvl=DEBUG | corr=de45d49a-66b0-427c-873e-985a3dee1744 | trans=de45d49a-66b0-427c-873e-985a3dee1744 | op=IoTAgentNGSI.Entities-v1 | from=n/a | srv=n/a | subsrv=n/a | msg=Updating device value in the Context Broker at [http://localhost:1026/v1/updateContext] | comp=IoTAgent kallisto-fiware-iot-agent | time=2022-07-14T10:30:33.030Z | lvl=DEBUG | corr=de45d49a-66b0-427c-873e-985a3dee1744 | trans=de45d49a-66b0-427c-873e-985a3dee1744 | op=IoTAgentNGSI.Entities-v1 | from=n/a | srv=n/a | subsrv=n/a | msg=Using the following NGSI-v1 request: kallisto-fiware-iot-agent | kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "url": "http://localhost:1026/v1/updateContext", kallisto-fiware-iot-agent | "method": "POST", kallisto-fiware-iot-agent | "headers": { kallisto-fiware-iot-agent | "fiware-service": "crowdsense", kallisto-fiware-iot-agent | "fiware-servicepath": "/kallisto" kallisto-fiware-iot-agent | }, kallisto-fiware-iot-agent | "json": { kallisto-fiware-iot-agent | "contextElements": [ kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "type": "Robot", kallisto-fiware-iot-agent | "isPattern": "false", kallisto-fiware-iot-agent | "id": "test:Robot", kallisto-fiware-iot-agent | "attributes": [ kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "name": "Humidity", kallisto-fiware-iot-agent | "type": "double", kallisto-fiware-iot-agent | "value": "�\u0016D\b@5L�����", kallisto-fiware-iot-agent | "metadatas": [ kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "name": "TimeInstant", kallisto-fiware-iot-agent | "type": "ISO8601", kallisto-fiware-iot-agent | "value": "2022-07-14T10:30:33.030Z" kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | ] kallisto-fiware-iot-agent | }, kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "name": "TimeInstant", kallisto-fiware-iot-agent | "type": "ISO8601", kallisto-fiware-iot-agent | "value": "2022-07-14T10:30:33.030Z" kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | ] kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | ], kallisto-fiware-iot-agent | "updateAction": "UPDATE" kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | kallisto-fiware-iot-agent | | comp=IoTAgent kallisto-fiware-iot-agent | time=2022-07-14T10:30:33.032Z | lvl=DEBUG | corr=de45d49a-66b0-427c-873e-985a3dee1744 | trans=de45d49a-66b0-427c-873e-985a3dee1744 | op=IoTAgentNGSI.Entities-v1 | from=n/a | srv=n/a | subsrv=n/a | msg=Received the following request from the CB: kallisto-fiware-iot-agent | kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "contextResponses": [ kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "contextElement": { kallisto-fiware-iot-agent | "type": "Robot", kallisto-fiware-iot-agent | "isPattern": "false", kallisto-fiware-iot-agent | "id": "test:Robot", kallisto-fiware-iot-agent | "attributes": [ kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "name": "Humidity", kallisto-fiware-iot-agent | "type": "double", kallisto-fiware-iot-agent | "value": "", kallisto-fiware-iot-agent | "metadatas": [ kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "name": "TimeInstant", kallisto-fiware-iot-agent | "type": "ISO8601", kallisto-fiware-iot-agent | "value": "2022-07-14T10:30:33.030Z" kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | ] kallisto-fiware-iot-agent | }, kallisto-fiware-iot-agent | { kallisto-fiware-iot-agent | "name": "TimeInstant", kallisto-fiware-iot-agent | "type": "ISO8601", kallisto-fiware-iot-agent | "value": "" kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | ] kallisto-fiware-iot-agent | }, kallisto-fiware-iot-agent | "statusCode": { kallisto-fiware-iot-agent | "code": "200", kallisto-fiware-iot-agent | "reasonPhrase": "OK" kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | ] kallisto-fiware-iot-agent | } kallisto-fiware-iot-agent | kallisto-fiware-iot-agent | | comp=IoTAgent kallisto-fiware-iot-agent | time=2022-07-14T10:30:33.032Z | lvl=DEBUG | corr=de45d49a-66b0-427c-873e-985a3dee1744 | trans=de45d49a-66b0-427c-873e-985a3dee1744 | op=IoTAgentNGSI.Entities-v1 | from=n/a | srv=n/a | subsrv=n/a | msg=Value updated successfully | comp=IoTAgent kallisto-fiware-iot-agent | time=2022-07-14T10:30:33.032Z | lvl=DEBUG | corr=de45d49a-66b0-427c-873e-985a3dee1744 | trans=de45d49a-66b0-427c-873e-985a3dee1744 | op=IOTAgent.LWM2MHandlers | from=n/a | srv=n/a | subsrv=n/a | msg=Data handled successfully | comp=IoTAgent

Is this a known issue, how could we perhaps support more recent formatting?

sbernard31 commented 2 years ago

No clear to me does it means you fixed the issue ?