Page 1 of 1

Change ClientId for MQTT

Posted: 04 Jun 2018, 13:59
by mkrve
Hi all,

We use a couple off devices with ESP Easy to send sensor data thru MQTT to our local broker.
This all works great, but we now want to send some mqtt data to IBM Watson broker.
This requires a verry specific ClientId, username, password for connected devices.

Is it possible to manually set the ClientId for connecting to a mqtt broker?

thanks

Re: Change ClientId for MQTT

Posted: 05 Jun 2018, 13:59
by TD-er
That's not yet possible.

What format (and more important, what size) should your clientID be?

Re: Change ClientId for MQTT

Posted: 05 Jun 2018, 14:10
by mkrve
thats to bad, i read a feature request for a option to be able to set the MQTT clientid as the device id.
that would be great.

But to answer your question, IBM Watson requiers a clientID for clients publishing data, in the format :

d:orgId:deviceType:deviceId

so for example

d:3m11xb:sensors:temp078

Re: Change ClientId for MQTT

Posted: 05 Jun 2018, 16:25
by grovkillen
Would it be one ID per unit? If so it would be possible to create a static ID based on a manually input string.

Re: Change ClientId for MQTT

Posted: 05 Jun 2018, 16:34
by mkrve
Yes,

Its one unique ID per device which doesn't change.

Re: Change ClientId for MQTT

Posted: 05 Jun 2018, 18:00
by grovkillen
And with "device" you mean "unit"? 8-)

We use device for sensors and actuators.