mqtt problems

Projects related to Solar Power
Post Reply
JohnH
Posts: 20
Joined: Sat Jan 09, 2021 1:14 pm

Re: mqtt problems

Post by JohnH »

When you say thousands of pings from mqtt server, what is pinging what? Also check your reboot count after clearing it and running for a day or so.

Also, I know you have ruled out power as a culprit, but I was having issues like this and it was power related (issue with my charge controller not supplying enough power).

I was also having another similar issue after fixing the power issue. I was nesting the topic in a sub-topic, e.g. emon/solar/coop. I completely fixed it by just entering coop, without any slashes and it has been working great without issue for a few months now.

I am using InfluxDB, Telegraf's MQTT Consumer, and Grafana to display the data.

If you're using Influx/Telegraf, here is my schema for MQTT Consumer:

Code: Select all

[inputs.mqtt_consumer]]
  servers = ["tcp://192.168.1.181:1883"]
  qos = 0
  connection_timeout = "30s"
  topics = [
    "coop/#"
  ]
  data_type = "float"
  data_format = "json"
JohnH
Posts: 20
Joined: Sat Jan 09, 2021 1:14 pm

Re: mqtt problems

Post by JohnH »

Wow, looks like you already ruled out all of my suggestions. Without a more descriptive debug function that provides verbose failure information, I don't know where to go from here.

It's obviously not rebooting due to low power, it is logging to SD card without SD card errors (I used to get those until changing to another card model), no dropped packets between the devices (it is possible to drop packets only in one direction but that is for hardwired, not wifi), and no nested topic. Your MQTT settings match mine except of course the broker address.

I do get the troubling development message frequently, but it isn't affecting MQTT publishing. Maybe the devs could spin up a firmware that provides verbose error messages in the log.

Sorry I couldn't help more.
Post Reply