Closed GeekyTim closed 5 years ago
Is this after upgrading to commit 4ca8d5b or later? Earlier versions were ignoring template manipulation done after initialising the base class. Running at very high verbosity (run the class directly with 'python -m pywws.service.mqtt -vvvv data_dir') should print out the template.
I'll upgrade again :-)
If you haven't already done so, read this before running pywws after upgrading. https://groups.google.com/d/msg/pywws/5p6tP8Z9r0s/dLaisMGZAgAJ
The update worked! Thanks.
Thanks for volunteering to test all this for me. (-:
No problem :-)
Further to this one, I think that the multi_topic and retain are being ignored. When I'm monitoring the weather station over mqtt I am seeing both the multi-topic and single message values, and also the messages are being retained.
Just for completeness, what values have you got in weather.ini for those two settings?
multi-topic = True retain = False
No quotation marks or anything?
No. Does it need them?
No. But if they were there it would explain your problem.
As you have multi_topic = True
I would expect you to see multi-topic messages when you monitor it. It doesn't stop the usual single topic message.
The retain
value is passed to the mosquitto.Client session, so if it's being ignored that sounds like a bug in paho.mqtt.client.
Ah! Misunderstood the multi-topic config. That's working fine then :-)
retain does seem to be being ignored. I'll look further.
I have updated the MQTT template in weathwer.ini, and restarted pywws, but it is still sending out the old default template defined in mqtt.py. For example, I don't have the temp_out_f, but it is still being received on the broker and subscribers.