Installing MQTT Mosquitto for Venv install of Home Assistant

Due to the lack of documented instructions I built this tutorial for installing Mosquitto
this is for Venv installs of Home Assistant I doubt it will work for other types of installs

remember to back up your home assistant files as like everything else this can break it

"DO NOT COPY AND PASTE STUFF IN QUOTES"

“LOG INTO THE TERMINAL.”

“GET LATEST UPDATES”

sudo apt update

sudo apt upgrade -y

“INSTALL MOSQUITTO”

sudo apt-get install mosquitto -y
sudo apt-get install mosquitto-clients

sudo nano /etc/mosquitto/mosquitto.conf

“CLEAR SCREEN BY HOLDING DOWN THE CTRL AND K KEYS.”

“COPY ALL BELOW THIS LINE DOWN TO NOT INCLUDING END.”

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
 
pid_file /var/run/mosquitto.pid
 
persistence true
persistence_location /var/lib/mosquitto/
 
log_dest file /var/log/mosquitto/mosquitto.log
 
allow_anonymous false
password_file /etc/mosquitto/pwfile
listener 1883

“END”

“PRESS CRTL+O (write out), ENTER, CTRL+X (exit).”

“SETUP MOSQUITTO CREDENTIALS”

sudo mosquitto_passwd -c /etc/mosquitto/pwfile TYPE_YOUR_USERNAME_HERE

“Test the Mosquitto by subscribing to a topic”

mosquitto_sub -d -u MOSQUITTO_USERNAME -P MOSQUITTO_PASSWORD -t dev/test
pip install python-openzwave-mqtt