Changing QoS when publishing to Mosquitto through Weewx

39 views
Skip to first unread message

Rui Pinto

unread,
Sep 2, 2019, 12:11:01 PM9/2/19
to weewx-user
Hello!!


I have a Davis Vantage Pro2 station and i'm using Weewx to publish data to an MQTT broker (Mosquitto).

But i would like to know if it's possible to change the QoS.

Best Regards.

vince

unread,
Sep 2, 2019, 12:45:31 PM9/2/19
to weewx-user
On Monday, September 2, 2019 at 9:11:01 AM UTC-7, Rui Pinto wrote:
I have a Davis Vantage Pro2 station and i'm using Weewx to publish data to an MQTT broker (Mosquitto).

But i would like to know if it's possible to change the QoS.



My reading of the mqtt extension v0.19 sources vs. some paho-mqtt examples says 'no', but if you wanted to hack on your extension a little you might try finding the two lines that say mc.publish and add qos=1 (or 2) and see if that works. (untested)

 

Rui Pinto

unread,
Sep 3, 2019, 6:02:01 AM9/3/19
to weewx...@googlegroups.com
Thank you for responding!!

The solution couldn't just be set the option retain to True?

Best Regards

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/0b26bd48-a107-443b-b5cb-5805975c8af1%40googlegroups.com.

vince

unread,
Sep 3, 2019, 10:28:57 AM9/3/19
to weewx-user
On Tuesday, September 3, 2019 at 3:02:01 AM UTC-7, Rui Pinto wrote:
The solution couldn't just be set the option retain to True?



You asked specifically about QOS setting.  The extension doesn't seem to support setting that from what I could tell, but I gave you which 'two' lines you need to edit to see if it can be easily added.

I'm not sure retain is the same thing according to https://www.hivemq.com/blog/mqtt-essentials-part-8-retained-messages/ but you could always try it and see if you get the behavior you want.   I just run the defaults at home which works ok for me.


Reply all
Reply to author
Forward
0 new messages