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

[stepbystep] Device not found for topic #207

Closed
pawcik opened this issue Nov 10, 2016 · 6 comments
Closed

[stepbystep] Device not found for topic #207

pawcik opened this issue Nov 10, 2016 · 6 comments

Comments

@pawcik
Copy link
Contributor

pawcik commented Nov 10, 2016

Hi,

I was following the step by step guide and calling:

mosquitto_pub -t /1234/sensor01/attrs -m '{"l":4,"t": "31.5"}'

I got following error in logs:

time=2016-11-10T14:13:31.379Z | lvl=DEBUG | corr=f6dbd06e-54f2-45d5-aa9d-73d18a505c31 | trans=f6dbd06e-54f2-45d5-aa9d-73d18a505c31 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Looking for entity params ["resource","apikey"] | comp=IoTAgent
time=2016-11-10T14:13:31.382Z | lvl=DEBUG | corr=f6dbd06e-54f2-45d5-aa9d-73d18a505c31 | trans=f6dbd06e-54f2-45d5-aa9d-73d18a505c31 | op=IoTAgentNGSI.MongoDBGroupRegister | srv=n/a | subsrv=n/a | msg=Device group for fields [["resource","apikey"]] not found: [{"apikey":"1234"}] | comp=IoTAgent
time=2016-11-10T14:13:31.382Z | lvl=ERROR | corr=f6dbd06e-54f2-45d5-aa9d-73d18a505c31 | trans=f6dbd06e-54f2-45d5-aa9d-73d18a505c31 | op=IoTAgentJSON.MQTTBinding | srv=n/a | subsrv=n/a | msg=MEASURES-004: Device not found for topic [/1234/sensor01/attrs] | comp=IoTAgent

After some debugging it looks like after adding config.iota.defaultKey: '1234' into config.js fix the problem for me. Not sure if it is the right approche.

@Naff16
Copy link

Naff16 commented Mar 24, 2017

Where did you put config.iota.defaultKey: '1234'???
Im adding it on config.js and the service wont start.

cumps

@fgalan
Copy link
Member

fgalan commented Mar 24, 2017

Looking to https://github.com/telefonicaid/iotagent-json/blob/master/config.js#L28, it seems it is not within config.iota, but within config.mqtt.

Not sure if some versions of IOTAgent use config.iota and other use config.mqtt for the defaultKey configuration...

@fgalan
Copy link
Member

fgalan commented Mar 28, 2017

This issue seems to be related with #222 (maybe a duplicate?)

@taliaga
Copy link
Contributor

taliaga commented Oct 31, 2017

If you look at the config files being used in the tests, they use the defaultKey in the iota config section also. Besides, the documentation says "We have not created a specific configuration for our devices yet, so the API Key will be the default one for the IoTA" (giving a hint that it's an iota config).

@fgalan
Copy link
Member

fgalan commented Jan 10, 2018

The problem described in this issue has been supposedly fixed by PR #260, recently merged into master.

@taliaga , @Naff16 , @pawcik could you check if now it is ok, pls?

@AlvaroVega
Copy link
Member

Using latest iotagent and iotagent-node-lib no error log about device apikey not found is logged.

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

5 participants