Change ClientId for MQTT

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mkrve
New user
Posts: 3
Joined: 04 Jun 2018, 13:52

Change ClientId for MQTT

#1 Post by mkrve » 04 Jun 2018, 13:59

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

TD-er
Core team member
Posts: 8752
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Change ClientId for MQTT

#2 Post by TD-er » 05 Jun 2018, 13:59

That's not yet possible.

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

mkrve
New user
Posts: 3
Joined: 04 Jun 2018, 13:52

Re: Change ClientId for MQTT

#3 Post by mkrve » 05 Jun 2018, 14:10

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

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Change ClientId for MQTT

#4 Post by grovkillen » 05 Jun 2018, 16:25

Would it be one ID per unit? If so it would be possible to create a static ID based on a manually input string.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

mkrve
New user
Posts: 3
Joined: 04 Jun 2018, 13:52

Re: Change ClientId for MQTT

#5 Post by mkrve » 05 Jun 2018, 16:34

Yes,

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

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: Change ClientId for MQTT

#6 Post by grovkillen » 05 Jun 2018, 18:00

And with "device" you mean "unit"? 8-)

We use device for sensors and actuators.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 79 guests