Hi Gary,
I've started working on this service, and I have run into an issue.
A quick refresher so you don't have to read through the whole thread: I am
writing an MQTT service to add data to the loop packets. You pointed me in
the right direction with the NEW_LOOP_PACKET, and I'm 99% of the way
there. My service is pulling data with the loop packets, processing and
normalizing it, and I'm now to the point that I am ready to stuff it into
the loop packet.
Since I am modifying an existing service that I wrote, I am trying to use
the line event.record[key] = value. that I found in the documentation.
When I try this, I get the following trackback. I'm sure that this is
because event.record is for archive packets, and I'm now working with loop
packets.
Traceback (most recent call last):
File "/usr/bin/weewxd", line 64, in <module>
weewx.engine.main(options, args)
File "/usr/share/weewx/weewx/engine.py", line 877, in main
engine.run()
File "/usr/share/weewx/weewx/engine.py", line 191, in run
self.dispatchEvent(weewx.Event(weewx.NEW_LOOP_PACKET, packet=packet))
File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
callback(event)
File "/usr/share/weewx/user/esp8266.py", line 105, in new_loop_packet
event.record[self.subscriptions[topic]] = value
AttributeError: 'Event' object has no attribute 'record'
Any thoughts on what I can do to correct this? I have verified that the
variable self.subscriptions[topic] provides the expected value of extraTemp1,
and value contains 74.30.
Also, related to this discussion, I would like to provide a simplified
version of code, and an explanatory blurb to be added to the documentation
to hopefully help others in a similar situation. Is that something that
the development team would be open to?
--
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.