Hi all falks, especialy Tom and Matthew.
Cases description:
I am runnig WeeWX with Wanet Wario ME13 station and one wire sensors with Matthews OWFS driver in service mode (from Raspberry with HAT and OWFS).
In cause of some LAN issues (6 months long story in short - TP link 100Mb switch incompability) and some HW issues as well I decided to "optimize" drivers be more "independent" on each other.
In WeeWX 3.x line happen folowing scenarios to me:
1) Wanet WS (main WeeWX driver) does not provided data (different casese) - then data from OWFS is not recorded as well
2) Wanet WS providing data from its own archive, but LAN/HW issues cause somes (seconds) stuck and OFWS data are lost due to too big time difference.
3) Some (DS18B20) OW sensors, time to time (no idea what is root), providing "sooo long" values behind decimal point
My current solution is of some "tuning" Matthews OFWS driver this way:
def handle_new_archive(self, event):
if event.record['dateTime'] is None:
event.record['dateTime'] = time.time()
event.record['interval'] = 60
delta = time.time() - event.record['dateTime']
if delta > (event.record['interval'] * 60) + self.deviation:
logdbg("Skipping record: time difference %s too big" % delta)
return
def get_float(path):
sv = ow.get(path)
sv = sv.replace(',','.')
v = round(float(sv),self.decres)
return v
My questions:
1) Is it the right way how to handle possible data loss from services or am I wriong and I should do it different way?
2) Do you think, that the possibility of user handled time deviation parameter is acceptable, even I know that it is not strictly correct? My idea is that in my 1 minutes data resolution (intereval) is time delta in seconds level between different sources of measured data still OK, mainly because of sensor inertia.
3) Could I handle of decimal point resolution from OW sensor different way?
Thank you for your time
Frantisek
P.S.: It looks like that my wanet driver is succesfuly upgraded for WeeWX 4.x and it is runnig more then week without fails, so it is published today. :-)