Open
Description
We have v1.5.7, this is in debian/RaspiOS main repo.
But MQTTv5 requires the new v2.0+
See https://mosquitto.org/blog/2013/01/mosquitto-debian-repository/.
Let's change to install from this dedicated repo.
We should also add a BATS test to avoid the following pitfall.
Attention: take care of breaking changes, latest mosquitto broke HA, see also
https://www.heise.de/news/Smarthome-mit-Home-Assistant-Vorsicht-bei-Update-des-MQTT-Brokers-6120728.html
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
ecdye commentedon Jun 29, 2021
I think we should wait for now, as OH probably has not updated the binding for MQTT for the updated version and as such it would be counterproductive to switch it now. I did not check to see if has been updated, it may have been but I would guess it has not.
I would still keep this issue open though because once OH does update the binding it will be a good idea to do so.
mstormi commentedon Jun 29, 2021
I'd think we should move to the mosquitto repo first.
For me - running mentioned 1.5.7 - this resulted in a new version being available but it was said to be "held back" and wasn't installed
mstormi commentedon Jun 29, 2021
ecdye commentedon Jun 29, 2021
Why go against openHAB, we want to provide the optimal user experience for openHAB so doing this would be contrary to one of our founding goals.
mstormi commentedon Jun 29, 2021
?? why is this against OH ? I just mean to upgrade to latest mosquitto (which is supposed to be downwards compatible, of course we would need to test)
ecdye commentedon Jun 30, 2021
If the latest upgrade is not compatible with OH it doesn't make sense to upgrade it unless I'm misunderstanding.
mstormi commentedon Jun 30, 2021
Of course. But I don't think it's incompatible, and I'm saying we need to test this before we merge.
This is a multi-step enhancement. First would be to change repo. As I wrote the current mosquitto repo gives us 1.5.7, too, which is right what our current Debian repo gives us.
ecdye commentedon Jun 30, 2021
Ahh, ok then. That makes more sense. If you want to create an initial PR I'll be more than happy to help review and test the changes.
I'm just a little wary of potentially breaking stuff that already works. As the old adage goes "Don't fix what ain't broke".
[-]mosquitto update ?[/-][+]Mosquitto update?[/+]mstormi commentedon Aug 16, 2021
The 2.0 release notes say it brings a number of breaking changes.
https://mosquitto.org/documentation/migrating-to-2-0/
So let's stay with 1.5.7+ for the time being.
Eventually, offer the user to install 2.0 as an option.
Larsen-Locke commentedon Sep 18, 2022
I saw that the mqtt-binding in openhab now can be configured to use version 5.
Is there a plan to update openhabian, too?
My problem is that in zigbee2mqtt there are options that require version 5 (e.g. retain). Those can be configured within the web config page (not nice but I cannot control that). If you cannot switch to version 5 zigbee2mqtt will fail to start during the next reboot.
mstormi commentedon Sep 18, 2022
None that I know of.
Happy to take a PR.
Should you our anyone be willing to look into this, please provide an installation routine that also works unattended, providing a default mosquitto config.
So it's probably easiest to start from scratch here.
Larsen-Locke commentedon Sep 22, 2022
I would prefer to extend the current install routine. Maybe something like:
the rest would stay the same except a default password for unattended mode.
What do you think?
mstormi commentedon Sep 23, 2022
I won't prescribe how to implement but we want everything in openHABian to work a) unattended and b) interactive.
Any 3rd party SW needs an a) install and b) an uninstall routine. Calling that from a menu or script branch will then be easy. Plus when needed such as here c) a (config) setup routine. It ideally detects and adapts to the version installed.
I think the Mosquitto routine is well older than this concept hence my suggestion to start from scratch. Compare e.g. how tailscale or FIND are implemented.
If unattended, there cannot exist any prior installation.
On versions, we need separate menu items to select 1.x or 2.x and eventually a selector variable for unattended installations but staying with 1.x there should be fine for the time being.
mstormi commentedon Feb 6, 2023
@Larsen-Locke any plan on this ?
Larsen-Locke commentedon Feb 7, 2023
not really, because I was not sure how to do this without the risk of causing trouble: As far as I understood the recent debian versions don't support mosquitto 2, so you have to import keys and then start the installation that fits to the debian version (buster, stretch etc.). The current bullseye lite supports mosquitto 2 so the installation works directly.
Because of all those versions I'm scared that people might end up with broken installations and demand support that I cannot provide.
mstormi commentedon Feb 7, 2023
Makes sense. Let's keep watching for now.
miloit commentedon Jun 5, 2023
Any work in progress?
Larsen-Locke commentedon Jun 5, 2023
well, not from my side.
During a fresh install of openhab (bullseye) the latest version of mosquitto (currently 2.0.11) will be installed.
There is no uninstall or update-function in openhabian cause then all versions of debian would have to be considered.
If you want/have to update mosquitto on an old openhab-installation then "apt remove mosquitto mosquitto-clients" has to be done first