Closed 3v1n0 closed 4 years ago
Note the delay 207
lines - these mean that your station is not correctly logging data as it's 207 + (n * 256) minutes since it last logged any. Resetting the base station (by removing the batteries and unplugging USB) might fix this.
As for the missing services, one possibility is that your weather.ini
file didn't get correctly updated automatically. Check you have suitable services
entries in [live]
and [logged]
sections of weather.ini
.
https://pywws.readthedocs.io/en/latest/guides/livelogging.html#configuring-periodic-tasks
Another possibility is that the service uploaders are waiting for some data to be logged before they send anything. This is usually a good idea, but obviously causes problems if the base station stops logging.
Soo... After few hours of doing this dance, the station started reporting data.
Not sure if this is caused by the fact that it had to read unpublished stuff from memory yet, but log wasn't mentioning it.
For sure there's something weird going on in case pywws is off for some time before it goes back to report live data.
As for the missing services, one possibility is that your weather.ini file didn't get correctly updated automatically. Check you have suitable services entries in [live] and [logged] sections of weather.ini.
No this wasn't the case, I didn't post the full detailed log here, but the services were properly initiated.
So, while the problem is fixed now, I guess that is weird that although some live data is recorded by the station, and I've live services on, the pywws still wait for the first logged bit before starting reporting logged bits. Isn't it?
It's important to some services to send data in the correct order. To send "catchup" data before live data we need to fetch the logged data from the station first, then process and send it, then start "live" logging.
There are many ways in which the weather station can fail. It would be hard to design pywws to be able to cope with all of them.
It's important to some services to send data in the correct order. To send "catchup" data before live data we need to fetch the logged data from the station first, then process and send it, then start "live" logging.
So in theory services might expose this and thus if they need catchup first, then we can wait, otherwise we can send live data as soon as available and catchup one once we log?
Or otherwise can't we just send catchup on startup and waiting to send logged data until the catchup phase is done?
In theory, but this isn't currently done by the service uploaders but by the live or hourly program. It's not a problem when the weather station is working normally.
Commit d36d35b should help with the synchronisation problem.
I had an old installation of pywws (around 16.12), and I decided to finally upgrade it.
My pywws was down for a couple of days. So I've upgraded pywws, lanunched
pywws.reprocess
but now the live data is correctly read but never sent.I've added some debugging bits, but basically
datalogger.log_data()
called and never returns... Continuously processing live data:And so continues... No
service
is called.If I set
logdata sync = 0
, the function does exit but it never enters into this cycle:for data, logged in datalogger.live_data(logged_only=(not tasks.has_live_tasks())):
Any way I can help in debugging this? [not that should change, but I've tried running in python3 but no change]