Service copy - nothing happens

12 views
Skip to first unread message

esko

unread,
Jan 20, 2023, 3:08:47 AM1/20/23
to pywws
Hi,
I'm preparing a new image for my raspberry and have a problem with the copy service.

The retrieving of the data from the weather station (WH1080) and the handling of the data with my templates works.
Therefore I have the files in the output directory.

I added in the weather.ini the configuration to copy the files to the local www directory.
But nothing happens.
I also see no errors in the log output.

My config:
- Python 3.7
- pywws 22.10.0 (installed with pip3 from the repository)

#### weather.ini ####
[config]
ws type = 1080
logdata sync = 1
day end hour = 0, False
rain day threshold = 0.2
template encoding = iso-8859-1
gnuplot encoding = iso_8859_1
language = en
usb activity margin = 3.0
asynchronous = False
frequent writes = False
gnuplot version = 4.2
pressure offset = 50.6

[paths]
work = /home/mypywws/weather_data/tmp/
templates = /home/mypywws/weather_data/templates/templates/
graph_templates = /home/mypywws/weather_data/templates/graph_templates/
local_files = /home/mypywws/weather_data/results/
modules = /home/mypywws/weather_data/modules/
datastoretype = filedata

[live]
services = []
plot = []
text = []

[logged]
services = [('copy', 'livedata.log', '3hrs.log')]
text = ['livedata.log', '3hrs.log']
plot = []

[hourly]
services = [('copy', '24hrs.log'), ('copy', 'my_forecast.txt'), ('copy', 'my_forecast_icon.txt')]
text = ['24hrs.log', 'my_forecast.txt', 'my_forecast_icon.txt']
plot = []

[12 hourly]
services = []
text = []
plot = []

[daily]
services = []
text = []
plot = []

[Zambretti]
north = True
baro upper = 1050.0
baro lower = 950.0

[copy]
directory = /var/www/html/weather/data/
####

+++++++++++++ snipped of log output ++++++++

2023-01-20 08:59:03:pywws.regulartasks:Templating livedata.log
2023-01-20 08:59:03:pywws.regulartasks:Templating 3hrs.log
2023-01-20 08:59:35:pywws.weatherstation:live_data missed
2023-01-20 09:00:03:pywws.weatherstation:live_data new ptr: 000be0
2023-01-20 09:00:03:pywws.process:Generating summary data
2023-01-20 09:00:03:pywws.regulartasks:doing task sections ['logged', 'hourly']
2023-01-20 09:00:03:pywws.regulartasks:Templating livedata.log
2023-01-20 09:00:03:pywws.regulartasks:Templating 3hrs.log
2023-01-20 09:00:06:pywws.regulartasks:Templating 24hrs.log
2023-01-20 09:00:06:pywws.regulartasks:Templating my_forecast.txt
2023-01-20 09:00:06:pywws.regulartasks:Templating my_forecast_icon.txt
2023-01-20 09:01:07:pywws.weatherstation:live_data new ptr: 000bf0
2023-01-20 09:01:07:pywws.process:Generating summary data
2023-01-20 09:01:08:pywws.regulartasks:doing task sections ['logged']
2023-01-20 09:01:08:pywws.regulartasks:Templating livedata.log
2023-01-20 09:01:08:pywws.regulartasks:Templating 3hrs.log
2023-01-20 09:02:03:pywws.weatherstation:live_data new ptr: 000c00
2023-01-20 09:02:03:pywws.process:Generating summary data
2023-01-20 09:02:03:pywws.regulartasks:doing task sections ['logged']
2023-01-20 09:02:03:pywws.regulartasks:Templating livedata.log
2023-01-20 09:02:03:pywws.regulartasks:Templating 3hrs.log
2023-01-20 09:03:03:pywws.weatherstation:live_data new ptr: 000c10
2023-01-20 09:03:03:pywws.process:Generating summary data
2023-01-20 09:03:03:pywws.regulartasks:doing task sections ['logged']
2023-01-20 09:03:03:pywws.regulartasks:Templating livedata.log
2023-01-20 09:03:03:pywws.regulartasks:Templating 3hrs.log
2023-01-20 09:04:03:pywws.weatherstation:live_data new ptr: 000c20
2023-01-20 09:04:03:pywws.process:Generating summary data
2023-01-20 09:04:03:pywws.regulartasks:doing task sections ['logged']
2023-01-20 09:04:03:pywws.regulartasks:Templating livedata.log
2023-01-20 09:04:03:pywws.regulartasks:Templating 3hrs.log

+++++++++++++++++++++++

Jim Easterbrook

unread,
Jan 20, 2023, 3:18:47 AM1/20/23
to py...@googlegroups.com
On 20/01/2023 08:05, esko wrote:
> I'm preparing a new image for my raspberry and have a problem with the
> copy service.
>
> The retrieving of the data from the weather station (WH1080) and the
> handling of the data with my templates works.
> Therefore I have the files in the output directory.
>
> I added in the weather.ini the configuration to copy the files to the
> local www directory.
> But nothing happens.
> I also see no errors in the log output.

You could try running (briefly) at a higher verbosity, but it might not
tell you anything more.

> My config:
>
> [hourly]
> services = [('copy', '24hrs.log'), ('copy', 'my_forecast.txt'), ('copy',
> 'my_forecast_icon.txt')]

Those probably ought to be just one copy command:

services = [('copy', '24hrs.log', 'my_forecast.txt',
'my_forecast_icon.txt')]

You can also try running the copy service directly to test it:

python -m pywws.service.copy -vvv /home/mypywws/weather_data

--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

Jim Easterbrook

unread,
Jan 20, 2023, 3:39:25 AM1/20/23
to py...@googlegroups.com
On 20/01/2023 08:17, Jim Easterbrook wrote:
>
> You can also try running the copy service directly to test it:
>
> python -m pywws.service.copy -vvv /home/mypywws/weather_data

Sorry, that should be something like

python -m pywws.service.copy -vvv /home/mypywws/weather_data 3hrs.log

You need to specify one or more files to copy.

Peter Eskofier

unread,
Jan 20, 2023, 3:42:29 AM1/20/23
to py...@googlegroups.com
mypywws@wetterstation:~ $ python3 -m pywws.service.copy -vvv /home/mypywws/weather_data 3hrs.log
09:40:27:pywws.logger:pywws version 22.10.0, build 1701 (f05cac2)
09:40:27:pywws.logger:Python version 3.7.3 (default, Oct 31 2022, 14:04:00)
[GCC 8.3.0]
09:40:27:__main__:thread started Thread-1
09:40:27:__main__:stopping thread Thread-1
09:40:27:__main__:OK
09:40:27:pywws.storage:waiting for thread Thread-1
09:40:31:__main__:OK
09:40:35:__main__:OK
09:40:39:__main__:OK
09:40:43:__main__:OK
09:40:47:__main__:OK
09:40:51:__main__:OK
09:40:55:__main__:OK
09:40:59:__main__:OK
09:41:03:__main__:OK
09:41:07:__main__:OK
09:41:11:__main__:OK
09:41:15:__main__:OK
09:41:19:__main__:OK
09:41:23:__main__:OK

--
You received this message because you are subscribed to the Google Groups "pywws" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pywws+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pywws/e9a24546-e8d0-17bd-2850-482f44bf24c0%40jim-easterbrook.me.uk.

Peter Eskofier

unread,
Jan 20, 2023, 3:50:41 AM1/20/23
to py...@googlegroups.com
I changed the [logged] entry:

[logged]
services = [('copy', 'livedata.log')]

text = ['livedata.log', '3hrs.log']
plot = []

and executed "pywws-livelog -vvv ~/weather_data/"


09:45:55:pywws.weatherstation:live_data new data
09:45:55:pywws.logdata:Reading time 08:45:52
09:45:55:pywws.logdata:log time 08:45:01
09:45:55:pywws.logdata:Fetching data
09:45:56:pywws.logdata:8 catchup records
09:45:56:pywws.process:Generating summary data
09:45:56:pywws.process:daily: 2023-01-19 23:00:00
09:45:56:pywws.process:monthly: 2022-12-31 23:00:00
09:45:56:pywws.weatherstation:read period 1
09:45:57:pywws.weatherstation:delay 0, pause 0.5
09:45:57:pywws.weatherstation:avoid 5.538487396480093
09:46:03:pywws.weatherstation:live_data new ptr: 000ec0
09:46:03:pywws.logdata:8 catchup records
09:46:03:pywws.process:Generating summary data
09:46:03:pywws.process:daily: 2023-01-19 23:00:00
09:46:04:pywws.process:monthly: 2022-12-31 23:00:00
09:46:04:pywws.regulartasks:doing task sections ['logged']
09:46:04:pywws.regulartasks:Templating livedata.log
09:46:04:pywws.regulartasks:Templating 3hrs.log
09:46:06:pywws.service.copy:thread started Thread-1
09:46:06:pywws.weatherstation:delay 0, pause 30.3652
09:46:06:pywws.service.copy:OK
09:46:10:pywws.service.copy:OK
09:46:14:pywws.service.copy:OK
09:46:18:pywws.service.copy:OK
09:46:22:pywws.service.copy:OK
09:46:26:pywws.service.copy:OK
09:46:30:pywws.service.copy:OK
09:46:34:pywws.service.copy:OK
09:46:37:pywws.weatherstation:delay 0, pause 0.5
09:46:37:pywws.weatherstation:avoid 5.780303011582852
09:46:38:pywws.service.copy:OK
09:46:42:pywws.service.copy:OK
09:46:43:pywws.weatherstation:delay 0, pause 0.5
09:46:44:pywws.weatherstation:delay 0, pause 0.5
09:46:45:pywws.weatherstation:delay 0, pause 0.5
09:46:45:pywws.weatherstation:delay 0, pause 0.5
09:46:46:pywws.weatherstation:delay 0, pause 0.5
09:46:46:pywws.service.copy:OK
09:46:47:pywws.weatherstation:live_data missed
09:46:47:pywws.weatherstation:delay 0, pause 9.35669
09:46:50:pywws.service.copy:OK
09:46:54:pywws.service.copy:OK
09:46:56:pywws.weatherstation:delay 0, pause 0.5
09:46:57:pywws.weatherstation:avoid 5.8029148771506485
09:46:58:pywws.service.copy:OK
09:47:02:pywws.service.copy:OK
09:47:03:pywws.weatherstation:live_data new ptr: 000ed0
09:47:03:pywws.process:Generating summary data
09:47:03:pywws.process:daily: 2023-01-19 23:00:00
09:47:03:pywws.process:monthly: 2022-12-31 23:00:00
09:47:03:pywws.regulartasks:doing task sections ['logged']
09:47:03:pywws.regulartasks:Templating livedata.log
09:47:03:pywws.regulartasks:Templating 3hrs.log
09:47:06:pywws.weatherstation:delay 0, pause 18.7284
09:47:06:pywws.service.copy:OK
Reply all
Reply to author
Forward
0 new messages