I have deployed the Bluemix GeoSpatial starter application in Bluemix.
It works fine until I want to connect to the Watson IoT Platform instead of the demo MQTT server.
I changed mqtt1.m2m4connectedlife.com
to dzqml6.messaging.internetofthings.ibmcloud.com
and added mqtt_uid
and mqtt_pw
to the start parameters jsonObject.
I created an API key in the Watson IoT Platform Dashboard and used these values for mqtt_uid
and mqtt_pw
.
Then I get an "Error: Connection refused: Not authorized" in the log when starting the application.
Then I also tried the apiKey and apiToken form the Watson IoT Platform environment variables for mqtt_uid
and mqtt_pw
but still got the same error.
I also tried different values for clientid and notify/input topics but without success.
I read a couple of other posts with similar errors that were resolved after some time because of a delay between when an organization is created and is distributed to all servers.
https://developer.ibm.com/answers/questions/163862/iot-cloud-error-not-authorized.html
So I waited a day but still have the same error.
I also added myself as a permanent member to the organization as suggested in this post: Refused: not authorized error occurs with IBM IoT Foundation on Bluemix
I would be very gratefull for any assistance on this!