3:1 After edit moquitto configuration file ““sudo vim /etc/mosquitto/mosquitto.conf”” what I end up could not us can not add the line it ask me too.
I coming up with
e325 AttentionFound a swap file by the name ".mosquitto.conf.swp"
owned by: root dated: Fri Nov 2 14:57:07 2018
file name: /etc/mosquitto/mosquitto.conf
modified: no
user name: root host name: openHABianPi
process ID: 1088 (still running)
While opening file "mosquitto.conf"
dated: Fri Nov 2 14:42:22 2018
(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r mosquitto.conf"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file ".mosquitto.conf.swp"
to avoid this message.
Swap file ".mosquitto.conf.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:
yup, that link gives a 404.
you shouldn’t need to do this step. the regular repos include the mosquitto broker.
just do sudo apt-get update && sudo apt-get install mosquitto and it will install the MQTT broker
try (R) first and if it doesn’t work, remove .mosquitto.conf.swp and try to edit the file again.
[16:57:26] openhabian@openHABianPi:/etc/mosquitto$ sudo apt-get update && sudo apt-get
[sudo] password for openhabian:
Hit:2 http://archive.raspberrypi.org/debian stretch InRelease
Ign:3 http://repos.azulsystems.com/debian stable InRelease
Hit:4 http://repos.azulsystems.com/debian stable Release
Hit:5 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:6 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:8 https://repo.mosquitto.org/debian jessie InRelease
Ign:1 https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable InRelease
Hit:9 https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable Release
Reading package lists... Done
N: Ignoring file 'mosquitto-jessie.list.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'mosquitto-jessie.list.2' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
apt 1.4.8 (armhf)
Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]
apt-get is a command line interface for retrieval of packages
and information about them from authenticated sources and
for installation, upgrade and removal of packages together
with their dependencies.
Most used commands:
update - Retrieve new lists of packages
upgrade - Perform an upgrade
install - Install new packages (pkg is libc6 not libc6.deb)
remove - Remove packages
purge - Remove packages and config files
autoremove - Remove automatically all unused packages
dist-upgrade - Distribution upgrade, see apt-get(8)
dselect-upgrade - Follow dselect selections
build-dep - Configure build-dependencies for source packages
clean - Erase downloaded archive files
autoclean - Erase old downloaded archive files
check - Verify that there are no broken dependencies
source - Download source archives
download - Download the binary package into the current directory
changelog - Download and display the changelog for the given package
See apt-get(8) for more information about the available commands.
Configuration options and syntax is detailed in apt.conf(5).
Information about how to configure sources can be found in sources.list(5).
Package and version choices can be expressed via apt_preferences(5).
Security details are available in apt-secure(8).
This APT has Super Cow Powers.
======================================================================
Ok so were do I start to do the rest of Win PC Remoto control.
[17:17:25] openhabian@openHABianPi:~$ sudo apt-get update && sudo apt-get install mosquitto
Hit:2 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:3 http://archive.raspberrypi.org/debian stretch InRelease
Ign:4 http://repos.azulsystems.com/debian stable InRelease
Hit:5 http://repos.azulsystems.com/debian stable Release
Hit:6 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Ign:1 https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable InRelease
Hit:8 https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable Release
Reading package lists... Done
N: Ignoring file 'mosquitto-jessie.list.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'mosquitto-jessie.list.2' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Reading package lists... Done
Building dependency tree
Reading state information... Done
mosquitto is already the newest version (1.4.10-3+deb9u2).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
N: Ignoring file 'mosquitto-jessie.list.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'mosquitto-jessie.list.2' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
looking better thank you, do I need to remove mosquitto-jessie.list.1 & mosquitto-jessie.list.2?
the Broker is already installed
Are you already using it for MQTT comms?
you can leave them there but they are useless (and being ignored from apt)
they are wrong anyway since you are on Raspbian Stretch (Debian 9)
Jessie = Debian 8
I would remove these 2 files
you are trying to remove them as user openhabian
either use sudo rm ... or switch to root with sudo su and then try again
careful with the changes from the blog since he recommends adding authentication for the connections to the Broker. make sure that you update correctly your binding config also (and other MQTT endpoints)
but why would you go to the mosquitto repo?
both Debian 8 & 9 include in the “default” repos the mosquitto package
just instruct users to deploy the standard mosquitto package (it will simplify your tutorial also)
@rhapen
use the output destination of wget to make sure that users deploy the list file in the /etc/apt/sources.list.d/ (you do tell them to cd into that… but making sure :))