I'm not following, but in the hope that we get lucky with a random answer,
in WeeWX, if a data value is not available, maybe because the sensor is
offline, or can't produce a value, you set the value to None. If the data
value just plain doesn't exist, maybe because you don't own that sensor,
you leave it out of the record completely.

-tk

On Tue, May 19, 2020 at 12:22 PM Pila <mrzimgj...@gmail.com> wrote:

> Not working. I have two problems.
>
> 1) First location has this sporadic (hourly) temp as the last temp it is
> reading from pond.txt. When the field is empty, it logs "pond: cannot read
> value: could not convert string to float:." as defined in pond.py. When
> there is a temp, it is properly added to the database. If it matters, new
> sporadic data is saved at :15 minutes each hour.
>
> The plot is ignoring all the data saved at one hour interval. Plotting
> stopped with the last datappint saved at 5 min interval. Last plotted
> datapoint was at 13:15. All further hourly datapoints starting from 14:15
> to 20:15 inclusive are not ploted. After I reverted to the old way, from
> 20:30 data is plotted again from that point on.
>
> That particular plot displays 3 different temperatures: other 2 are being
> saved at 5 min intervals.
>
> 2) Second location apparently breaks after the empty field, when I save
> the hourly data into the second position at the pond.txt. like ",24.1"
> without quotes. Pond.py never loads the number after the empty field and
> the comma to the database. As soon as I reverted to saving both temps, both
> fields are being read correctly.
>
> What to save as an empty field so that pond.py does not break further
> reading after the empty field? There is no data, logically, I shouldn't
> save anything there. Seems like Python problem? I do not know Python.
> Should I read data differently?
>
> I am saving data into pond.txt like this:
> Location 1:
> 23.4,21.8,22.4,23.3,18.0,17.4
> Location 2:
> 18,24.1
>
> Reading it with code modified to read multiple comma separated fields:
>
> with open(self.filename) as f:
>    line = f.readline()
>    value = line.split(',')
>    syslog.syslog(syslog.LOG_DEBUG, "pond: found value of %s" % value)
> event.record['leafTemp1'] = float(value[0])
> event.record['extraTemp2'] = float(value[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 weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/ac9eabf1-8170-43de-9958-090d8f537c1a%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/ac9eabf1-8170-43de-9958-090d8f537c1a%40googlegroups.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 weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEBLkJisKh4ZeT%2Bt6D6%2BS_nQqfNsmh3n-gJ8YLSvzEK1fg%40mail.gmail.com.

Reply via email to