Open mstormi opened 3 years ago
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.
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
I'd think independent of OH 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
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.
?? 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)
If the latest upgrade is not compatible with OH it doesn't make sense to upgrade it unless I'm misunderstanding.
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.
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".
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.
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.
Is there a plan to update openhabian, too?
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.
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?
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.
@Larsen-Locke any plan on this ?
@Larsen-Locke any plan on this ?
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.
Makes sense. Let's keep watching for now.
Any work in progress?
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
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