Skip to content

v0.7.14 — one capital letter

Choose a tag to compare

@Forcky Forcky released this 03 Oct 05:48
· 8 commits to main since this release

If your log says connection refused rc=5 and your locks work fine in the Lockly app, this is almost certainly your bug, and it was mine.

The broker username has to be lowercase

The official app does exactly one thing to the username before connecting — Connection.createOptions:

String lowerCase = name.toLowerCase(Locale.ROOT);
mqttConnectOptions.setUserName(lowerCase);

This integration sent the email address exactly as it was typed into the config flow.

What makes that worth a release of its own is how it fails. The REST API is case-insensitive, so an account whose owner typed Name@Example.com logs in, discovers its locks, reads their state and looks healthy in every respect. Only the broker cares, and all it says is rc=5 — which reads as wrong credentials, or an account not entitled to push. Then 0.7.13 dutifully tries the second broker and is refused there too, which appears to clear the address as well. Every signal points away from the one capital letter actually responsible.

If you have been seeing rc=5, update and reload. Nothing to reconfigure — the username is lowercased at connect time, whatever is stored.

Found from a report on #14 by an owner running two PGK728WRHK on firmware that was already known to work, which is what made the account the obvious suspect and kept it the wrong one.

Also

One refused connection is no longer reported twice. Moving to the second broker stops paho's network loop, which trips the disconnect handler, which warned about a disconnection the integration had caused on purpose. Spotted by the same reporter in the same log.

Unchanged

No frame, transport or state-parsing changes. If push already works for you, this release changes nothing you can see.