wordclock icon indicating copy to clipboard operation
wordclock copied to clipboard

MQTT settings: what to enter in the server exactly?

Open bubenkoff opened this issue 10 months ago • 5 comments

Thank you for the great project! What exactly is expected and allowed in the MQTT server? only IP witout the port? Are the hostnames allowed?

bubenkoff avatar Jan 16 '26 10:01 bubenkoff

Yes, just the IP without the port nor protocol. I haven't tested hostnames sorry !

t0mg avatar Jan 17 '26 11:01 t0mg

Thank you, the hostnames don't work. They are also not saved in full - cut due to the length limit it seems. Would be great to have it fixed.

bubenkoff avatar Jan 17 '26 12:01 bubenkoff

Hmm ok, maybe it's precisely because they're cut out that they don't work...

t0mg avatar Jan 28 '26 23:01 t0mg

To save potential future readers with MQTT authentication issues some searching: the username and password fields have a maximum of 15 characters (much like the address, as @bubenkoff mentioned). Any additional data is silently cut.

The code in IoT.cpp seems fine, but the HTML generated by IotWebConf does not add the maxlength attribute to the field (see prampec/IotWebConf#284).

rubenvandeven avatar Mar 28 '26 20:03 rubenvandeven

Maybe we could increase IOT_CONFIG_VALUE_LENGTH in Iot.h to mitigate the issue. I can't remember why it was set so small...

t0mg avatar Mar 28 '26 22:03 t0mg