User avatar
tinkererscott
Posts: 7
Joined: Sun Nov 05, 2017 5:19 pm

Re: STRECH and MQTT

Thu Nov 09, 2017 1:27 am

Hi Asandford,

I did a fresh install myself and the mosquitto package failed, which is the reason I tracked down this thread and posted. I am using version 2 of raspberry pi but I don't think that should matter.

I am not trying to install anything other than the stock / standard packages. What I am doing is using the HomeAssistant install scripts on top of Strech (with desktop).

I'll try it again this weekend.

Scott

User avatar
DougieLawson
Posts: 39895
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: STRECH and MQTT

Thu Nov 09, 2017 7:49 am

Don't just say "it failed", tell us how it failed.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

User avatar
tinkererscott
Posts: 7
Joined: Sun Nov 05, 2017 5:19 pm

Re: STRECH and MQTT

Thu Nov 09, 2017 6:38 pm

Sorry, I'm not an expert at Linux. This is one of the reasons I came here and am using the automated scripts. A big shout out to everyone who helps make them possible!

It looks like there is something up with this: libwebsockets3. I copy pasted what it showed on the screen in my original post on the 5th. It was kinda long so I'm not sure if you want me to paste it in again here or not. I'd be happy to provide any information which can help make it easier for me and for everyone else like me attempting to perform the automated installation process which all of you awesome folks are putting together and supporting.

Best,

Scott

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: STRECH and MQTT

Fri Nov 10, 2017 12:22 am

tinkererscott wrote:
Thu Nov 09, 2017 1:27 am
Hi Asandford,

I did a fresh install myself and the mosquitto package failed, which is the reason I tracked down this thread and posted. I am using version 2 of raspberry pi but I don't think that should matter.

I am not trying to install anything other than the stock / standard packages. What I am doing is using the HomeAssistant install scripts on top of Strech (with desktop).

I'll try it again this weekend.

Scott
HomeAssistant has sd card images available, no need to install anything, just flash and go.

User avatar
DougieLawson
Posts: 39895
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: STRECH and MQTT

Fri Nov 10, 2017 12:29 am

tinkererscott wrote:
Thu Nov 09, 2017 6:38 pm

It looks like there is something up with this: libwebsockets3.
THIS: viewtopic.php?f=66&t=191027&start=25#p1230675 looks like the best work-around at the moment.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

User avatar
tinkererscott
Posts: 7
Joined: Sun Nov 05, 2017 5:19 pm

Re: STRECH and MQTT

Sat Nov 11, 2017 6:27 pm

Hi,

I went back and started over making sure to do the dist-upgrade instead of just the regular upgrade and it worked.

I also tried the hassiban SSD image and can't get it on the network :(
https://home-assistant.io/hassio/installation/

Honestly, I like the idea of being able to use Strech instead of the less robust OS option.

Scott

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: STRECH and MQTT

Mon Nov 13, 2017 2:01 am

tinkererscott wrote:
Sat Nov 11, 2017 6:27 pm
I also tried the hassiban SSD image and can't get it on the network :(
https://home-assistant.io/hassio/installation/

Honestly, I like the idea of being able to use Strech instead of the less robust OS option.

Scott
It's not too difficult to get to the <this will take 25 minutes screen>

Fresh install using 2017-09-07-raspbian-stretch.img

Enable ssh by whatever means suits you.

Switch to root

Code: Select all

sudo su -
Update and upgrade (for me this was 127 packages and 231Mb, maybe time for a new image to be released):

Code: Select all

apt update;apt dist-upgrade  -y
<some time later>

Here's the fun part, change the hostname (to hassio, and reboot):

Code: Select all

raspi-config
After reboot, we're back:

Code: Select all

login as: pi
pi@hassio.local's password:
Linux hassio 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Nov 13 01:35:19 2017

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@hassio:~ $
Switch to root

Code: Select all

sudo su -
Install mqtt if you need to:

Code: Select all

apt install -y mosquitto mosquitto-clients
Ok, now for the Home Assistant stuff. If you don't want the sd card image, the go for the "Alternative: install on generic Linux server"

The pre-reqs are:

Code: Select all

docker
bash
socat
jq
curl
avahi-daemon
dbus-daemon
We have most of these.

To install docker:

Code: Select all

curl -sSL https://get.docker.com | sh
Install the others:

Code: Select all

apt install -y socat jq
Now we're ready to install HA:

Code: Select all

curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s -- -m raspberrypi3
[INFO] Install supervisor docker
[INFO] Install generic HostControl
[INFO] Install startup scripts
[INFO] Init systemd
Created symlink /etc/systemd/system/multi-user.target.wants/hassio-supervisor.service → /etc/systemd/system/hassio-supervisor.service.
[INFO] Start services
root@hassio:~#
Test by going to here

User avatar
tinkererscott
Posts: 7
Joined: Sun Nov 05, 2017 5:19 pm

Re: STRECH and MQTT

Tue Nov 14, 2017 3:45 am

Thanks for the run down. It is working.

Scott

oldfart
Posts: 20
Joined: Wed Feb 06, 2013 11:50 pm

Re: STRECH and MQTT

Mon Nov 20, 2017 10:07 pm

Trying to install mosquitto on a fresh stretch install

installed openssl
described here

Code: Select all

_https://raspberrypi.stackexchange.com/questions/66782/how-to-install-openssl-1-0-2-on-raspberry-pi3
now have
sudo find / -name libssl.so*
/home/pi/openssl/libssl.so.1.1
/home/pi/openssl/libssl.so
/usr/lib/arm-linux-gnueabihf/libssl.so.1.1
/usr/lib/arm-linux-gnueabihf/libssl.so
/usr/lib/arm-linux-gnueabihf/libssl.so.1.0.2
/usr/local/lib/libssl.so.1.1
/usr/local/lib/libssl.so

amended the files to rebuild the deb file as described here
_

Code: Select all

https://www.eclipse.org/forums/index.php?t=msg&th=1089302&goto=1773991&
so the lib file is libssl1.0.2 (>= 1.0.2)

run mosquitto, and error
mosquitto
mosquitto: error while loading shared libraries: libssl.so.1.0.0:
cannot open shared object file: No such file or directory

what now??

also how to install mosquitto-clients
no examples given

pulling out any hair I had left!!

User avatar
tinkererscott
Posts: 7
Joined: Sun Nov 05, 2017 5:19 pm

Re: STRECH and MQTT

Mon Nov 20, 2017 10:15 pm

Look at asandford's post right before my last one.

If you follow what he did it should work.

I think one of the keys is that he updates everything right after the install using:

Code: Select all

apt update;apt dist-upgrade  -y


The dist part is important and the reboot might be as well.

Once all that's done, go for mosquitto, should work fine.

Scott

oldfart
Posts: 20
Joined: Wed Feb 06, 2013 11:50 pm

Re: STRECH and MQTT

Mon Nov 20, 2017 10:32 pm

found an answer that works

Code: Select all

https://community.home-assistant.io/t/mosquitto-not-installed-by-mqtt-raspbian-stretch/27058/8

User avatar
tinkererscott
Posts: 7
Joined: Sun Nov 05, 2017 5:19 pm

Re: STRECH and MQTT

Mon Nov 20, 2017 10:43 pm

Good luck. I'm not brave enough to 'override the dependencies issues'.

oldfart
Posts: 20
Joined: Wed Feb 06, 2013 11:50 pm

Re: STRECH and MQTT

Mon Nov 20, 2017 10:51 pm

easy
just first answer n
second y
that easy!

same for the mosquitto-clients:-
n
n
y

all working now (only took 2 days)

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: STRECH and MQTT

Fri Nov 24, 2017 3:38 am

oldfart wrote:
Mon Nov 20, 2017 10:51 pm
easy
just first answer n
second y
that easy!

same for the mosquitto-clients:-
n
n
y

all working now (only took 2 days)
If you need to override dependencies, you're doing it wrong (unless you know exaclty what you're doing, and if you have to ask; you don't). It might (and most probably will) cause issues in the future, and probably in very unexpected ways. Bottom line - don't mess with apt, and don't expect apt to track and update packages that you have installed/compiled independently of it.

oldfart
Posts: 20
Joined: Wed Feb 06, 2013 11:50 pm

Re: STRECH and MQTT

Fri Nov 24, 2017 10:27 am

Well
If there was another way to install mqtt - I would have!!
Tried most of the blog tutorials - none worked
I looked around the internet for probably a week, trying to find a definitive method.
And - YES - I do know what I'm doing with Linux.
This is a problem that needs a solution prior to the change of Home Assistant to Python 3.5 (or indeed 3.6)
There were errors in the given examples, and being mostly copies of someones earlier work, were no use.
Even when the errors in the code were corrected, there were still errors.
I don't count having to put in symbolic links as a proper solution. its a bodge.

Just my view of course.

User avatar
DougieLawson
Posts: 39895
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: STRECH and MQTT

Fri Nov 24, 2017 12:30 pm

Have you tried aptitude or synaptic? Both of those APT installers have clever magic to attempt to resolve package conflicts.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

oldfart
Posts: 20
Joined: Wed Feb 06, 2013 11:50 pm

Re: STRECH and MQTT

Fri Nov 24, 2017 2:57 pm

yes - that's what my post above refers to

Code: Select all

https://community.home-assistant.io/t/mosquitto-not-installed-by-mqtt-raspbian-stretch/27058/8

User avatar
DougieLawson
Posts: 39895
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: STRECH and MQTT

Fri Nov 24, 2017 3:16 pm

Add this
/etc/apt/sources.list.d/temp.list

Code: Select all

deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi
deb http://archive.raspberrypi.org/debian/ jessie main ui
run
sudo apt update
sudo apt install mosquitto


Then remove that temp.list file.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: STRECH and MQTT

Sun Nov 26, 2017 1:20 am

oldfart wrote:
Fri Nov 24, 2017 10:27 am
Well
If there was another way to install mqtt - I would have!!
Tried most of the blog tutorials - none worked
I looked around the internet for probably a week, trying to find a definitive method.
And - YES - I do know what I'm doing with Linux.
This is a problem that needs a solution prior to the change of Home Assistant to Python 3.5 (or indeed 3.6)
There were errors in the given examples, and being mostly copies of someones earlier work, were no use.
Even when the errors in the code were corrected, there were still errors.
I don't count having to put in symbolic links as a proper solution. its a bodge.

Just my view of course.
I did a fully worked out install just a few posts back.
-no symlinks
-no bodges to apt's lists
-no contrived workarounds, just

Code: Select all

sudo apt update; apt dist-upgrade -y; reboot
sudo apt install -y mosquitto mosquitto-clients

As I've proved previously, that works!

Did you try (if you tried for a week to find a solution that I posted in this very thread, then your google is broken)?

User avatar
DougieLawson
Posts: 39895
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: STRECH and MQTT

Sun Nov 26, 2017 8:09 am

I installed mosquitto on another Raspberry running Stretch yesterday.

The base mosquitto 1.4.10 is available with stock standard Raspbian apt-get.
It was mosquitto-clients that failed to install due to the ssl library problem.
I'll upgrade to 1.4.14 later (when we're done with our hackathon).

sudo aptitude install mosquitto-client
worked out the dependencies and got it working. I had to chose the third option aptitude gave me. I'll edit this post with details of what got installed later.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

mattmiller
Posts: 2247
Joined: Thu Feb 05, 2015 11:25 pm

Re: STRECH and MQTT

Mon Dec 04, 2017 9:18 pm

JFI
I just tried installing mosquitto on the 2017-11-29 Stretch release using standard apt-get install

Both mosquitto and mosquitto-clients seemed to install without error and I could subscribe and publish to a test topic

It installed the 1.4.10 version

jsaldivias
Posts: 13
Joined: Mon Mar 06, 2017 8:49 pm

Re: STRECH and MQTT

Tue Jan 02, 2018 1:10 pm

ShiftPlusOne wrote:
Thu Aug 17, 2017 2:13 pm
What do you see if you run 'aptitude search ~o'
ShiftPlusOne
Good Morning. Could you please help me find a solution? I installed Mosquitto in my RPi 3 and is working fine. It is working as a broker. The only thing is that I have to type:

sudo /etc/init.d/mosquitto start

every time I want to start.
I wish I could set it up so it can start by its own. I have read several dozens of posts during the last month but I fail to understand or apply what they said solved this matter for other people. And I am quite sure the solution is a simple one. Would you please help me on this?
Thanks

User avatar
topguy
Posts: 6722
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: STRECH and MQTT

Tue Jan 02, 2018 1:34 pm

It is not a good idea to hijack older threads. This thread is a ******* mess by now.

What does this command give you ?

Code: Select all

pi@raspberrypi:~ $ sudo systemctl status mosquitto
● mosquitto.service - LSB: mosquitto MQTT v3.1 message broker
   Loaded: loaded (/etc/init.d/mosquitto)
   Active: active (running) since Wed 2017-12-13 16:05:16 CET; 2 weeks 5 days ago
   CGroup: /system.slice/mosquitto.service
           └─417 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

rob1048
Posts: 1
Joined: Sat Jan 06, 2018 1:15 am

Re: STRECH and MQTT

Sat Jan 06, 2018 1:23 am

I originally followed the steps from https://medium.com/@rossdanderson/insta ... 341fe88981 but used stretch instead of jessie. The installation failed. I got it working be removing mosquitto-stretch.list and running "sudo apt-get update" and then installing mosquitto with the following command: "sudo apt-get install mosquitto". In effect, I just reverted back to the base apt-get repositories that was installed with stretch and installed mosquitto.

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: STRECH and MQTT

Sun Jan 07, 2018 12:53 am

rob1048 wrote:
Sat Jan 06, 2018 1:23 am
I originally followed the steps from https://medium.com/@rossdanderson/insta ... 341fe88981 but used stretch instead of jessie. The installation failed. I got it working be removing mosquitto-stretch.list and running "sudo apt-get update" and then installing mosquitto with the following command: "sudo apt-get install mosquitto". In effect, I just reverted back to the base apt-get repositories that was installed with stretch and installed mosquitto.
Which is what I said back in November last year

Return to “Raspberry Pi OS”