Codesys help
 
Notifications
Clear all

Codesys help

4 Posts
3 Users
0 Likes
692 Views
(@saultt)
New Member
Joined: 5 years ago
Posts: 2
Topic starter  

I'm working with Codesys with MQTT, it has a block for use it, but I can only put the username and password, so I think i can´t publish anything, is something I can do?

This topic was modified 3 years ago by admin

   
Quote
(@admin)
New Member Admin
Joined: 3 years ago
Posts: 4
 

I'm working with Codesys with MQTT, it has a block for use it, but I can only put the username and password, so I think i can´t publish anything, is something I can do?

There is no option to set the `clientId`?

This post was modified 3 years ago by admin

   
ReplyQuote
(@saultt)
New Member
Joined: 5 years ago
Posts: 2
Topic starter  

I'm working with Codesys with MQTT, it has a block for use it, but I can only put the username and password, so I think i can´t publish anything, is something I can do?

There is no option to set the `clientId`?

No :/

This post was modified 3 years ago by admin

   
ReplyQuote
(@gabor-auth)
Member
Joined: 3 years ago
Posts: 15
 

Hm... the `clientId` must be unique on the MQTT server, because of any new connection with the same `clientId` terminates the old connection based on the specification.

This uniqueness can be guaranteed by two path in our system:

  1. the `clientId` is equals with the `deviceId` and one device can establish only one connection
  2. the beginning of the `clientId` is the value of the `userId`, so that you cannot accidentally or intentionally disturb another user's connections.

If you not able to set the `clientId`, this uniqueness cannot be guaranteed... at the moment, I have no idea about the workaround.

Can you check what the Codesys client sending as `clientId`?

This post was modified 3 years ago by admin

   
ReplyQuote
Share: