How do I increase QoS to 2 for emonHub messages?

I use home-assistant and emonHub feeds into that from a separate Pi on the LAN. To ease configuration, each Pi has their own broker and there is a QoS=2 bridge between the two.

I regularly see lost data points in the data from emonHub and it looks like data is lost between the emonHub process and its local broker. I assume this is sent with QoS=0, but I can’t find any reference to this anywhere.

Is it possible to modify the emonHub configuration to specify QoS=2 for MQTT messages?

Only by editing the underlying script.

There was some discussion a while back on this.

I don’t see any loss, so I suggest investigating the loss more thoroughly. Where exactly do you see the loss occurring?

If you have a large number of topics being read by Emoncms, it is possible to saturate the receiving script. I’d recommend setting EmonHub to use the JSON format rather than a topic for each item.

QOS2 only helps if the receiver can catch up and it is not an absolute guarantee. In addition, unless you timestamp your data, emoncms would simply use the received time rather than the time of the reading, so you are gaining nothing.

Thanks, Brian
I’ll do some exploring to identify exactly where the messages are being lost.

Gareth