Page 1 of 1

Codesys help

Posted: Fri Oct 04, 2019 7:00 pm
by SaulTT
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?

Re: Codesys help

Posted: Sat Oct 05, 2019 10:57 am
by admin
SaulTT wrote:
Fri Oct 04, 2019 7:00 pm
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`?

Re: Codesys help

Posted: Mon Oct 07, 2019 1:23 pm
by SaulTT
admin wrote:
Sat Oct 05, 2019 10:57 am
SaulTT wrote:
Fri Oct 04, 2019 7:00 pm
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 :/

Re: Codesys help

Posted: Mon Oct 07, 2019 7:09 pm
by auth.gabor
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:
a, the `clientId` is equals with the `deviceId` and one device can establish only one connection
b, 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`?