This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

IBM Watson and MQTT
#1
Hello 
I'm trying to figure out the MQTT-connection from LM5 to IBM's Watson.
Have looked at the threads for Azure and more but can't really figure out the connection settings for watson.

When making an device in the broker, I've got these settings:

(not real credentials, just as an example Wink )

Broker: 'xxxxx.messaging.internetofthings.ibmcloud.com'
Organization ID: 'xxxxx'   
Device Type: LM5_Test
Device ID: LM5
Authentication Method: use-token-auth
Authentication Token: xxxx!x*xxxxxx7xxxxx

Are there an easy way to do this? 

BR
Eirik
Reply
#2
You need to pass device id to mqtt.new:
Code:
client = mqtt.new(device_id)

Username is use-token-auth:
Code:
client:login_set('use-token-auth', password)

Use port 1883 to connect to broker.

See this for more info: https://cloud.ibm.com/docs/services/IoT?...arted#mqtt
Reply


Forum Jump: