pi@TimePi:/var/log/mosquitto $ apt policy mosquitto
mosquitto:
Installed: 1.5.7-1+deb10u1
Candidate: 1.5.7-1+deb10u1
Version table:
*** 1.5.7-1+deb10u1 500
500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages
100 /var/lib/dpkg/status
pi@TimePi:/var/log/mosquitto $
It looks like log_timestamp
was added in mqtt v5 and is not backward avaliable in mqtt v3 which seems to be what you are using:
Sep 13 18:52:33 TimePi systemd[1]: Stopped Mosquitto MQTT v3.1/v3.1.1 Broker.
So you have two choices
- upgrade your MQTT broker to version 5.1
- add a formatted timestamp to the msg being published
It works for me on an old system running 3.1
Thanks very much.
I can live with things as is - kind of.
Alas this problem has now faded into INSIGNIFICANCE
I'll post back in the main thread.
Ok, update to all.
Ok, there is a problem with reading the log files
.
Yeah, well, as of now that doesn't even register as a problem.
I am back to the original problem but with a different device!
Recap:
Originally there was some weird feedback loop with a TASMOTA
device.
I'm not sure what happened.
But I got home and noticed the device was not telling my system it was alive.
Looking at it's MQTT-IN
node weird things were happening.
I can't remember the exact details, but even powering down the device and powering it back up, somehow a feedback loop started.
I put a gate
node in this loop - which is/was kinda obvious.
I closed (stopped) the gate
. Things settled down. I opened (started) the gate
.
It was fixed.
(Go figure.)
I tested it a few times and it seems to be working.
For clarity:
The MQTT-IN
node was spitting messages out hand over fist originally.
Now it is quiet.
(No blame assigned)
I tried to look at the log file and read the time stamps.
Doing this I STOPPED the broker, edited the file and tried to START the broker.
It threw up the error and so I had to edit the config
file back to the original format.
HOWEVER!
As soon as I did, I got bombarded with voice messages.
LUCKILY I have determined that if I disable the VOICE
MQTT-IN
node, things work.
Local messages on the same machine things work.
If I then enable (well, ok open a gate
, but what ever...) the MQTT_IN
node:
BOOM!
FLOODED with messages.
Ok, I admit, it may be just one. I'll get back to that in a moment.
There is NO OUTPUT back to the VOICE
topic from the working part of the code/flow.
So, on my NUC (this machine) I put a MQTT-IN
and set the topic to VOICE
and then I put a debug
node.
So something is just constantly broadcasting this message.
But it started when I stopped/failed to start and then got it started.
While typing this, I do have a theory.
But want to get it out there while I am still able.
I AM AN IDIOT!
Found it!
Alas I found a small trace and it was all related to the original problem.
Edited the code and now all working.
Sorry folks.
It seems likely that the time format feature was introduced in mosquitto 1.6, which would explain why it fails for you with 1.5.7
Without wanting to sound like a stick in the mud, is there a way to update from 1.5.7 to 1.6?
This is on a Raspberry Pi?
On my Pi apt policy mosquitto
gives
mosquitto:
Installed: 2.0.11-1.2+deb12u1
Candidate: 2.0.11-1.2+deb12u1
Edit - reading @Colin below - You still have Jessie Buster. That explains the Mosquitto version.
The problem is that you are on Jessie and 1.5.7 is the latest version available in raspbian repos.
This may still work, I don't know.
No, I have BUSTER.
pi@TimePi:~ $ sudo apt update | grep upgradable && sudo apt list --upgradable | grep mosquitto
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
W: GPG error: http://ftp.de.debian.org/debian buster-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
E: The repository 'http://ftp.de.debian.org/debian buster-updates InRelease' is not signed.
pi@TimePi:~ $
Sorry Colin, I have BUSTER on my main RasPie machines now.
It has been ..... a year?.... since the update.
SOME of the machines MAY be running an older version.
But that is because they are seldom used.
W: GPG error: http://ftp.de.debian.org/debian buster-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
E: The repository 'http://ftp.de.debian.org/debian buster-updates InRelease' is not signed.
What does this show?
cat /etc/apt/sources.list && ls /etc/apt/sources.list.d/
To the first part:
and the second part:
pi@TimePi:~ $ cat /etc/apt/sources.list && ls /etc/apt/sources.list.d/
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
deb http://ftp.de.debian.org/debian buster-updates main
nodesource.list raspi.list vscode.list
pi@TimePi:~ $
What is that line doing there? If you don't know then comment it out and run
sudo apt update && sudo apt full-upgrade
which will probably update hundreds of packages.
You have got an up to date backup of the system of course.
Hoestly, I don't know why that line is there.
I'll comment it out and try again.
Stand by.
Ummm.....
So you only want the first line not the last two?
The third line is commented out already.
Sorry I meant the .... third ....... link line.
Which third link line?
(The machine is now kinda busy with a lot of updates.)
The sources.list
file.
There is the first line:
(trying to type from the screen)
deb http://raspbian.raspberrypi.org/raspbian/ ....
Then there is the line uncomment line below.....
Then another 2 deb
lines.
So that is 1, 2, and 3.
I have commented out the last two.
ONLY the first one is active.