Before I open a suggestion or ticket I just wanted to check - am I correct in thinking there is no way to determine the Client ID Domoticz will use when connecting to an MQTT broker? There's no configuration field on the broker config page and looking in my Mosquitto log I see the following upon restart of a Domoticz instance:
1744620644: New client connected from <redacted>:60112 as Domoticz9054ea4f-bef2-43bd-9b1a-3511c47c16574 (p2, c1, k120, u'<redacted>').
1744620644: New client connected from <redacted>:60114 as Domoticz9bdd7cd7-21c4-4b51-a291-f88640a380fe9 (p2, c1, k120, u'<redacted>').
1744620644: New client connected from <redacted>:60110 as Domoticz9ad1fb77-ae18-416a-9546-191bf8c566bc8 (p2, c1, k120, u'<redacted>').
That looks like the client ID is 'Domoticz' plus a GUID. I'd like to use a fixed Client ID per Domoticz instance so that I can properly configure ACLs in Mosquitto. There's three connections above because I have one publish and two subscribe connections on this instance but there's no reason I can see from the Mosquitto side why they shouldn't use a common Client ID.
I already have my Domoticz instances set to use topic /tele/Domoticz_<MAC last 6> and Mosquitto recognises ACL configuration of the format /topic/%c/ where %c is the client ID so the last piece of the jigsaw is deterministic client ID.
I might be out of date as I'm on 2024.7 for armv6 (Huge thank you to SjoerdNLD) but I couldn't see anything related in github issues.
Note that the wiki still says you have to set
Code: Select all
allow_anonymous true
Cheers
Sumdum