Too many publishes in progress (32202)

I am integrating ANAVI Thermometer with HestiaPi, so I can include the bedroom temperature in the mix

ANAVI Thermometer published temperature and humidity in MQTT topics

After setting the relevant things and items in OpenHab, and adding the new items to the sitemap, I am getting items disconnected from MQTT topics with errors like this:

2020-03-01 18:56:58.959 [hingStatusInfoChangedEvent] - 'mqtt:topic:mosquitto:HumidityPin' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR): Too many publishes in progress (32202)

Of course, this is preventing the heater to work properly:

2020-03-01 19:39:55.640 [ome.event.ItemCommandEvent] - Item 'HeatingPin' received command ON   
2020-03-01 19:39:55.720 [nt.ItemStatePredictedEvent] - HeatingPin predicted to become OFF

Maybe there is some limitation in MQTT connections that I should increase?

Use mqtt explorer to check what topics are exchanged.
I suspect it publishes and subscribes to the same topic and this causes a (infinite) loop.
Please share here your findings and if possible explain the steps needed for anyone else who use the same device.

How can I check that? I can see like 10 topics, most of them updating every second. But I don’t see how to check subscriptions

In any case, I would say that ANAVI Thermometer has been connected to MQTT server for some time. I was after I configured the Openhab Items, when it started to fail. I will make more tests tomorrow.

Of course I will :smiley:

You can subscribe to specific topics. Start with the ones added by the new items.

I am trying to turn on the logs to see what it is going on, but I am finding that the configuration file /etc/mosquitto/mosquitto.conf does not have them turned on.

However, the line log_dest file /var/log/mosquitto/mosquitto.log appears in /etc/mosquitto/mosquitto.conf.bak

Checking the running processes, I find that the mosquito server ir running as user pi:

pi 696 0.1 0.8 5464 3712 ? Ss 20:18 0:15 /usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf

Instead of the usual mosquitto user.

However, the /var/log/mosquitto folder belongs to user geoclue! :astonished:

I am wondering… why this mess? :dizzy_face:

Logging to file is disabled by default to minimise wear and tear over long time for the SD card.
The mosquitto version supplied with Raspbian does not support WITH_WEBSOCKETS so version mosquitto-1.6.2 had to be built from source as well as libwebsockets (libwebsockets-1.7-stable) to support websockets needed for the LCD UI.
The file:
/etc/mosquitto/mosquitto.conf.bak is the conf file from the default mosquitto installation kept as a backup during the upgrade. Please do not use it.

Hmmm… I don’t have a (geo)clue why is that :open_mouth:
Googling around I see that others find this package installed without their intention so I suspect another package is installing it as prerequisite. I will investigate further and get back to you…
Apologies for the confusion.

While researching on the geoclue issue, I made the effort and uploaded the manual installation steps on the wiki.
geoclue is clearly installed by me at some point so this clearly means that is required by another package to be installed.
So I dug a bit more and found libwebkitgtk-3.0-0 needs libjavascriptcoregtk-3.0-0 and libjavascriptcoregtk-3.0-0 has geoclue-2.0 as prerequisite:

sudo apt-get install libjavascriptcoregtk-3.0-0=2.4.9-1~deb8u1+rpi1 libwebkitgtk-3.0-0=2.4.9-1~deb8u1+rpi1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libgeoclue0
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  geoclue-2.0 libmbim-glib4 libmbim-proxy libmm-glib0 libqmi-glib1 modemmanager
The following NEW packages will be installed:
  geoclue-2.0 libmbim-glib4 libmbim-proxy libmm-glib0 libqmi-glib1 modemmanager
The following packages will be DOWNGRADED:
  libjavascriptcoregtk-3.0-0 libwebkitgtk-3.0-0
0 upgraded, 6 newly installed, 2 downgraded, 0 to remove and 0 not upgraded.
Need to get 8,479 kB of archives.
After this operation, 2,476 kB of additional disk space will be used.
Do you want to continue? [Y/n]

Now why /var/log/mosquitto folder belongs to user geoclue is something I don’t know tbh. Please share here if you find more info.

1 Like

Thank you very much for the detailed information.

I turned on the logs, but will turn off as you advise, to avoid card damage

It turned out that the problem was in the router! I moved it besides a Bluetooth emitter that was ruining the wifi signal when TV was on!

Everything is working fine now, I am working on tweaking the thermometer and HestiaPi’s display to show temperatures one besides the other. My idea is HestiaPi looking after the ANAVI thermometer termperature when we go bed, and coming back to its own temperature when we wake up.

I will release the software and post a blog entry the results!

Glad you managed to troubleshoot it. Wireless signals can be a pain some times. :+1:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.