I just tried to implement my LoRa Temp/hum sensors in weewx via MQTT. One
problem is that these sensor often use a time period of 20min as Graham
Eddy wrote.
Will this code snippet from him find it's way in the next release to get a
smoother graph in weewx!? Would be great.
That's what I get at the moment, see picture.
Graham Eddy schrieb am Donnerstag, 19. Januar 2023 um 06:33:57 UTC+1:
fair request, but i don’t GitHub, so some code follows.
my old RPi test box is now my production LoRaWAN box, so i worked using my
production weewx box, so testing is pretty minimal (seems to work on my two
graphs)
see weeplot/utilities.py:520 on weewx 5.8.0:
line = []
last_x = None
for xy in zip(x, y):
#GE start new
# If the y coordinate is None, ignore it
if xy[1] is None:
continue
#GE end new
dx = xy[0] - last_x if last_x is not None else 0
last_x = xy[0]
#GE start original
#GE # If the y coordinate is None or dx > maxdx, that marks a break
#GE if xy[1] is None or (maxdx is not None and dx > maxdx):
#GE end original
#GE start new
# If dx > maxdx, that marks a break
if (maxdx is not None and dx > maxdx):
#GE end new
# If the length of the line is non-zero, yield it
if len(line):
yield line
line = [] if xy[1] is None else [xy]
else:
line.append(xy)
if len(line):
yield line
cheers
*⊣GE⊢*
On 19 Jan 2023, at 12:50 pm, Tom Keffer <[email protected]> wrote:
Speaking of dumb, in retrospect, this seems like a dumb choice. It should
be at least optional.
The code was written about 10 years ago. I simply cannot remember why I
chose to always honor None values, despite any value of line_gap_fraction.
A PR would be welcome, should you wish to write one.
On Wed, Jan 18, 2023 at 4:55 PM Graham Eddy <[email protected]> wrote:
this means line_gap_fraction relates only to interval gaps of whole
records, not of column value gaps within successive records.
hmm, inserting interpolated values to cover interval gaps in a column can
only be done to past records - nope, i don’t want to go there...
well, now i know - learn to love the ‘mark’ not the ‘line'.
thanks
*⊣GE⊢*
On 19 Jan 2023, at 2:49 am, Tom Keffer <[email protected]> wrote:
You're not doing something dumb. None values always mark line breaks.
On Wed, Jan 18, 2023 at 6:30 AM Graham Eddy <[email protected]> wrote:
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/D4BCD919-180F-45F4-AA01-845B49CB9A74%40geddy.au
<https://groups.google.com/d/msgid/weewx-user/D4BCD919-180F-45F4-AA01-845B49CB9A74%40geddy.au?utm_medium=email&utm_source=footer>
.
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/CAPq0zEAoEWv3TdnHZ%2BJeWmbQV7t20-h2N9La3geer7eiLyavMA%40mail.gmail.com
<https://groups.google.com/d/msgid/weewx-user/CAPq0zEAoEWv3TdnHZ%2BJeWmbQV7t20-h2N9La3geer7eiLyavMA%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
--
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].
To view this discussion visit
https://groups.google.com/d/msgid/weewx-user/b1936653-4fb8-45f0-b3e0-d505adafb5dfn%40googlegroups.com.