Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » Remove old entries from mosquitto_sub command(Old entries from mosquitto_sub -t "#" -v -u pi -P G -t "#" -v -u pi -P xxx shown)
Remove old entries from mosquitto_sub command [message #1803159] Sun, 24 February 2019 04:07 Go to next message
Ulf Holt is currently offline Ulf HoltFriend
Messages: 3
Registered: March 2018
Junior Member
I have set ut an environment using mosquitto on a local server to get information from ESP8266 devices. Some of them have been removed and others have been added, but I do not get the information I need, and there are old information beeing shown, though the devices has been shut off weeks ago. I'm using the mosquitto_sub command, and the result looks like this:

/Kontor_Limoen/status/LWT Connection Lost
/KontorLimoen/status/LWT Connected
/Offoce_Limoen/status/LWT Connection Lost
/Ute_Oslo/status/LWT Connection Lost
/SoneOFF_Oslo/status/LWT Connection Lost
/SoneOffOslo/status/LWT Connection Lost
/SoneOffLimoen/status/LWT Connection Lost
/Oslo1/status/LWT Connection Lost
/PIRAngket/status/LWT Connection Lost
/Oslo09/status/LWT Connection Lost
/WeatherStationOslo/BME280/Temperatur 9.51
ÿ Connection Lost
@ Connection Lost
? Connected
tele/sonoff/LWT Online
tele/Sonoff1/LWT Offline
tele/Sonoff2/LWT Offline
tele/Sonoff3/LWT Offline
tele/Sonoff4/LWT Offline
tele/Sonoff5/LWT Offline
UteOslo/DewPoint/Temperatur *
domoticz/in {"idx":2,"RSSI":9,"nvalue":0,"svalue":"19.67;45.9;1;999;0"}

All offline devices has been offline for weeks.
How can I remove all information about lost devices, and what is the decices ÿ, @ and ?.
WeatherStationOslo is only reporting one value, but I can see two more when I connect to the ESP,

Looks like there are a lot of things I don't understand, so can somone give me a hint?

Best regards

Ulf
Re: Remove old entries from mosquitto_sub command [message #1803304 is a reply to message #1803159] Tue, 26 February 2019 14:56 Go to previous messageGo to next message
Roger Light is currently offline Roger LightFriend
Messages: 34
Registered: September 2013
Member
These are likely to be "retained messages", which are stored on the server. You can remove them by publishing a zero length retained message to the same topic. For example:

mosquitto_pub -h your-server -t /SoneOffOslo/status/LWT -r -n

I hope this helps.
Re: Remove old entries from mosquitto_sub command [message #1803312 is a reply to message #1803304] Tue, 26 February 2019 16:06 Go to previous message
Ulf Holt is currently offline Ulf HoltFriend
Messages: 3
Registered: March 2018
Junior Member
Thank you so much - looks like this solved my problem!
Previous Topic:Redundant / High Available Install
Next Topic:How can we configure the topic access for each device dynamically
Goto Forum:
  


Current Time: Fri Feb 21 14:10:07 GMT 2020

Powered by FUDForum. Page generated in 0.04092 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top