Bill,
I have some troubles to make the driver work.
While look at the code, I have the feeling that the username / password
from weewx.conf are not used ?
I tried something, but seems not working better.
here is my test (it's based on other lines of the driver, I try to do
something similar, but as I said, I know nothing about python)
def __init__(self, **stn_dict):
# where to find the data file
self.host = stn_dict.get('host', 'localhost')
self.topic = stn_dict.get('topic', 'weather')
self.username = stn_dict.get('username', 'XXX')
self.password = stn_dict.get('password', 'password')
# how often to poll the weather data file, seconds
self.poll_interval = float(stn_dict.get('poll_interval', 5.0))
# mapping from variable names to weewx names
self.label_map = stn_dict.get('label_map', {})
loginf("host is %s" % self.host)
loginf("topic is %s" % self.topic)
loginf("polling interval is %s" % self.poll_interval)
loginf('label map is %s' % self.label_map)
self.payload = "Empty"
#self.payloadList = [payload]
self.client = mqtt.Client(client_id="XXX", protocol=mqtt.MQTTv31)
#self.client.on_connect = self.on_connect
self.client.on_message = self.on_message
self.client.username_pw_set(self.username, self.password)
self.client.connect(self.host, 1883, 60)
self.client.subscribe(self.topic, qos=1)
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.