0
votes

I'm following these instructions using the orgID given by the Watson IoT platform.

I then created the MQ Client in Node-RED using this orgID and d:orgID:mydevicetype:mydevicedid using arbitrary mydevicetype and mydevicedid.

These are the Node-RED error messages:

"Error: Connection refused: Not authorized"
"Error stopping node: Error: [BaseClient:disconnect] Client is not connected"

I then created a device on the Watson IoT platform using the mydevicetype and mydevicedid and eas provided a token. I got the same error using use-token-auth as the user and the token as password.

Device log on the Watson IoT platform:

Invalid userID () for device auth: 
ClientID='d:orgID:mydevicetype:mydevicdeid', 
ClientIP=169.50.40.xxx 
2
can you share the node configuration from nodered? please mask your credentials. It might be some wrong in the configuration of the nodeidan
Hello, how can I retrieve events from Watson IoT using a REST API?ShwetaJ

2 Answers

1
votes

Can you try:

  • url: mqtts://[orgId].messaging.internetofthings.ibmcloud.com
  • port:8883
  • username: use-token-auth
  • password: [the token you got when you created the device]
  • client id: d:[orgID]:[mydevicetype]:[mydeviceid]

Looks like not much different from what you've tried, perhaps your are not using a secure (mqtts) connection ?

0
votes

If the client id that you are specifying really is:

d:orgID:mydevicetype:mydevicdeid

then your problem is that you need to specify the actual 6 character orgId, e.g.:

d:abcdef:mydevicetype:mydevicdeid

Give that a go and let us know how you get on.