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

check if procesedMesassure is an array of object, not just an array #643

Conversation

AlvaroVega
Copy link
Member

@AlvaroVega AlvaroVega commented Mar 25, 2022

fix for #642

@AlvaroVega
Copy link
Member Author

mosquitto_pub -h localhost -t /json//<id_disp>/attrs -m 'mierda'

time=2022-03-25T09:51:25.717Z | lvl=DEBUG | corr=090218b1-76e7-483d-bb6a-4505a7c5f423 | trans=090218b1-76e7-483d-bb6a-4505a7c5f423 | op=IoTAgentJSON.commonBinding | from=n/a | srv=n/a | subsrv=n/a | msg=message topic: /json//<id_disp>/attrs | comp=IoTAgent
time=2022-03-25T09:51:25.718Z | lvl=DEBUG | corr=090218b1-76e7-483d-bb6a-4505a7c5f423 | trans=090218b1-76e7-483d-bb6a-4505a7c5f423 | op=IoTAgentJSON.commonBinding | from=n/a | srv=n/a | subsrv=n/a | msg=stringMessage: [mierda] parsedMessage: [6d6965726461] | comp=IoTAgent
time=2022-03-25T09:51:25.718Z | lvl=DEBUG | corr=090218b1-76e7-483d-bb6a-4505a7c5f423 | trans=090218b1-76e7-483d-bb6a-4505a7c5f423 | op=IoTAgentJSON.commonBinding | from=n/a | srv=n/a | subsrv=n/a | msg=parserMessage array: [ '6d6965726461' ] | comp=IoTAgent
time=2022-03-25T09:51:25.721Z | lvl=DEBUG | corr=090218b1-76e7-483d-bb6a-4505a7c5f423 | trans=090218b1-76e7-483d-bb6a-4505a7c5f423 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=n/a | subsrv=n/a | msg=Looking for group params ["resource","apikey"] with queryObj {"resource":"/iot/json","apikey":"f"} | comp=IoTAgent
(node:1) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. (Triggered by calling processImmediate on process.)
time=2022-03-25T09:51:25.733Z | lvl=DEBUG | corr=95f5af57-7c43-43e4-8c34-b430d198bf40 | trans=95f5af57-7c43-43e4-8c34-b430d198bf40 | op=IoTAgentNGSI.MongoDBGroupRegister | from=n/a | srv=smartcity | subsrv=/ | msg=Device group data found: {"_id":"623b289e71871847cc8b1556","commands":[{"name":"command1","type":"command","value":""}],"staticAttributes":[],"attributes":[],"resource":"/iot/json","apikey":"","type":"thing1","service":"smartcity","subservice":"/","description":"mijson1","timestamp":true} | comp=IoTAgent
time=2022-03-25T09:51:25.733Z | lvl=DEBUG | corr=95f5af57-7c43-43e4-8c34-b430d198bf40 | trans=95f5af57-7c43-43e4-8c34-b430d198bf40 | op=IoTAgentNGSI.MongoDBDeviceRegister | from=n/a | srv=smartcity | subsrv=/ | msg=Looking for device with id [<id_dips>]. | comp=IoTAgent
time=2022-03-25T09:51:25.738Z | lvl=DEBUG | corr=95f5af57-7c43-43e4-8c34-b430d198bf40 | trans=95f5af57-7c43-43e4-8c34-b430d198bf40 | op=IoTAgentNGSI.MongoDBDeviceRegister | from=n/a | srv=smartcity | subsrv=/ | msg=Device data found: {"_id":"623b2d57718718157f8b155c","commands":[{"name":"command1","type":"command","value":"","object_id":"command1"}],"staticAttributes":[],"subscriptions":[],"creationDate":"2022-03-23T14:23:19.432Z","id":"<id_dips>","type":"thing1","name":"mientity","service":"smartcity","subservice":"/","registrationId":"623b2d57d6528456f13f42b0","internalId":null,"apikey":"","protocol":"IoTA-JSON","transport":"HTTP","polling":true,"timestamp":true,"explicitAttrs":false} | comp=IoTAgent
time=2022-03-25T09:51:25.739Z | lvl=DEBUG | corr=95f5af57-7c43-43e4-8c34-b430d198bf40 | trans=95f5af57-7c43-43e4-8c34-b430d198bf40 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=deviceData before merge with conf: {"_id":"623b2d57718718157f8b155c","commands":[{"name":"command1","type":"command","value":"","object_id":"command1"}],"staticAttributes":[],"subscriptions":[],"creationDate":"2022-03-23T14:23:19.432Z","id":"<id_dips>","type":"thing1","name":"mientity","service":"smartcity","subservice":"/","registrationId":"623b2d57d6528456f13f42b0","internalId":null,"apikey":"","protocol":"IoTA-JSON","transport":"HTTP","polling":true,"timestamp":true,"explicitAttrs":false} | comp=IoTAgent
time=2022-03-25T09:51:25.741Z | lvl=DEBUG | corr=95f5af57-7c43-43e4-8c34-b430d198bf40 | trans=95f5af57-7c43-43e4-8c34-b430d198bf40 | op=IoTAgentNGSI.DeviceService | from=n/a | srv=n/a | subsrv=n/a | msg=deviceData after merge with conf: {"_id":"623b2d57718718157f8b155c","commands":[{"name":"command1","type":"command","value":"","object_id":"command1"}],"staticAttributes":[],"subscriptions":[],"creationDate":"2022-03-23T14:23:19.432Z","id":"<id_dips>","type":"thing1","name":"mientity","service":"smartcity","subservice":"/","registrationId":"623b2d57d6528456f13f42b0","internalId":null,"apikey":"","protocol":"IoTA-JSON","transport":"HTTP","polling":true,"timestamp":true,"explicitAttrs":false,"lazy":null,"active":[]} | comp=IoTAgent
time=2022-03-25T09:51:25.742Z | lvl=ERROR | corr=95f5af57-7c43-43e4-8c34-b430d198bf40 | trans=95f5af57-7c43-43e4-8c34-b430d198bf40 | op=IoTAgentJSON.commonBinding | from=n/a | srv=n/a | subsrv=n/a | msg=Couldn't process message [mierda] due to format issues. | comp=IoTAgent

@AlvaroVega AlvaroVega requested a review from mrutid March 25, 2022 10:10
@AlvaroVega AlvaroVega changed the title [WIP] check procesedMesassure is and array of object, not just an array check procesedMesassure is and array of object, not just an array Mar 25, 2022
@AlvaroVega AlvaroVega requested a review from fgalan March 25, 2022 11:33
Copy link
Member

@fgalan fgalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but leaving it opened waiting to @mrutid review and final merge

@fgalan
Copy link
Member

fgalan commented Mar 25, 2022

Should exist twin PR in IOTA-UL repository?

@AlvaroVega
Copy link
Member Author

Should exist twin PR in IOTA-UL repository?

Maybe telefonicaid/iotagent-ul#552

@AlvaroVega AlvaroVega changed the title check procesedMesassure is and array of object, not just an array check if procesedMesassure is an array of object, not just an array Mar 28, 2022
Copy link
Member

@fgalan fgalan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fgalan fgalan merged commit e138f82 into master Mar 28, 2022
@fgalan fgalan deleted the fix/bad_mqtt_measure_progres_as_multiple_measure_after_procesed_as_hex_string branch March 28, 2022 15:35
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

Successfully merging this pull request may close these issues.

2 participants