Upgrading emonSD PHP Mosquito version?

No reason other than it works therefore we’ve not changed.

I’m open to changing the instructions and potentially upgrading emonSD if there is a compelling reason to do so. What version do you think we should be using?

Here are the current instructions to install from emonSD build guide:

wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
sudo apt-key add mosquitto-repo.gpg.key
cd /etc/apt/sources.list.d/
sudo wget http://repo.mosquitto.org/debian/mosquitto-jessie.list
sudo apt-get update
sudo apt-get install mosquitto mosquitto-clients libmosquitto-dev -y
sudo pecl install Mosquitto-alpha
(​Hit enter to autodetect libmosquitto location)

As part of this, I think the instructions should form part of the MQTT documentation as well.

If someone could suggest the steps to be taken to upgrade a current installation I’m happy to test it out.

Raise an issue?

Sounds good. Have you been reliably using a newer version? I’m struggling to find a change log to see what has been fixed. The old version has been proven to be reliable and stable I only want to update if there is a reason to. Using the ‘official’ version is a compelling reason, lets see what the response is to @Paul issue he opened:

Until @Paul pointed it out I didn’t know there was. There is a comment somewhere about a fix for PHP7.

We don’t yet run PHP 7 on emonSD. Again, happy to consider upgrading if there is a reason to. However it seems that PHP7 is not fully supported yet by Mosquitto PHP.

I note this is still picking up the Jessie repo. Is this because this instruction has not been updated or is it deliberate? As mentioned elsewhere, the Stretch version from the mosquitto.org repo does not work out of the box as it has some bad dependencies. I used the package direct from the Debian/Raspbian repo.

I have a Stretch, DietPi install, running Lightppd, MariaDB and PHP7 (I am pretty sure) and it seems to work. I am going to have to check and see what instructions I executed to get it installed though! It might be it was done by DietPi install itself as I don’t remember actually doing it!

It’s deliberate since emonSD still uses Jessie. For the reasons you mention Stretch is still in early days, I’m waiting for it to become more established before switching. Jessie is still LTS with security updates until 2020 so no rush. Stability is the most important thing for emonSD.

Ah OK, I thought you’d switched to Stretch or is that just the emonPi?

No we’ve not switched, the emonPi / emonSD instructions still specify Jessie Lite

https://github.com/openenergymonitor/emonpi/blob/master/docs/SD-card-build.md

Ok, went and had another look and realised it was just the RaspberryPi install instructions that had changed. Just remembered a discussion and thought it was for all instances.

Same discussion on this topic on another thread:

https://community.openenergymonitor.org/t/raspbian-stretch/5096/60?u=glyn.hudson

If you want to specify a particular version for the emonSD you would need to use something like mosquitto-0.3.0 rather than the -alpha suffix. I suspect all downloaded/purchased
pre-built emonSD users are on v0.3.0, but any users self-building from the emonSD guide will get v0.4.0 since March 2017, I do not know if that is significant enough to worry about, but we should be mindful that not all users will be on the same release when debugging mqtt I guess.

I’ve included more info on this on the Raspbian Stretch - #55 thread.

Looking at the changelog the changes between 0.3.0 and 0.4.0 seem to just support for php7 and some memory leakage fixes so I suspect there is no big reason to push a change.

1 Like

Answering your question here (on the emonSD thread) rather than on the “Stretch” thread, upgrading should be as easy as rpi-rw and sudo pecl upgrade mosquitto-alpha but I wonder if it’s needed?