Glenn,
We're on the right track! I noticed Horacio's message and tried to implement it in an earlier attempt but maybe I messed it up or maybe - as I think of it now - it was just a matter of getting
owfs-common_2.9p8-6_all.deb
libow-2.9-8_2.9p8-6_armhf.deb
python-ow_2.9p8-6_armhf.deb
as you brilliantly noted. The fact is that I have tried that approach now (just hope Matthew won't be upset about not using fileparse.py) and
sudo nano /usr/share/weewx/user/ds18b20.py with Horacio's code
edited self.filename to show my ds18b20 id
sudo nano /etc/weewx/weewx.conf
added to [[services]] the line
data_services = user.ds18b20.ds18b20_Service
and commented
#data_services = ,
to avoid duplication
No ther changes done so [OWFS] section remains the same as well as [Station] showing station_type = Simulator
The fact is that starting weewx now produces no error!
pi@raspberrypi:~ $ sudo systemctl start weewx.service
pi@raspberrypi:~ $ sudo systemctl status weewx.service
● weewx.service - LSB: weewx weather system
Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)
Active: active (running) since Fri 2017-12-15 12:23:34 CET; 6s ago
Docs: man:systemd-sysv-generator(8)
Process: 821 ExecStop=/etc/init.d/weewx stop (code=exited, status=0/SUCCESS)
Process: 852 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/weewx.service
└─867 python /usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
Dec 15 12:23:34 raspberrypi weewx[867]: manager: Starting backfill of daily summaries
Dec 15 12:23:35 raspberrypi weewx[867]: restx: StationRegistry: Registration not requested.
Dec 15 12:23:35 raspberrypi weewx[867]: restx: Wunderground: Posting not enabled.
Dec 15 12:23:35 raspberrypi weewx[867]: restx: PWSweather: Posting not enabled.
Dec 15 12:23:35 raspberrypi weewx[867]: restx: CWOP: Posting not enabled.
Dec 15 12:23:35 raspberrypi weewx[867]: restx: WOW: Posting not enabled.
Dec 15 12:23:35 raspberrypi weewx[867]: restx: AWEKAS: Posting not enabled.
Dec 15 12:23:35 raspberrypi weewx[867]: engine: Starting up weewx version 3.8.0
Dec 15 12:23:35 raspberrypi weewx[867]: engine: Clock error is -0.73 seconds (positive is fast)
Dec 15 12:23:35 raspberrypi weewx[867]: engine: Starting main packet loop.
And a few minutes later...
pi@raspberrypi:~ $ sudo systemctl status weewx.service
● weewx.service - LSB: weewx weather system
Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)
Active: active (running) since Fri 2017-12-15 12:23:34 CET; 11min ago
Docs: man:systemd-sysv-generator(8)
Process: 821 ExecStop=/etc/init.d/weewx stop (code=exited, status=0/SUCCESS)
Process: 852 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/weewx.service
└─867 python /usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
Dec 15 12:25:18 raspberrypi weewx[867]: manager: Added record 2017-12-15 12:25:00 CET (1513337100) to database 'weewx.sdb'
Dec 15 12:25:18 raspberrypi weewx[867]: manager: Added record 2017-12-15 12:25:00 CET (1513337100) to daily summary in 'weewx.sdb'
Dec 15 12:25:47 raspberrypi weewx[867]: cheetahgenerator: Generated 14 files for report StandardReport in 27.19 seconds
Dec 15 12:26:11 raspberrypi weewx[867]: imagegenerator: Generated 36 images for StandardReport in 21.48 seconds
Dec 15 12:26:11 raspberrypi weewx[867]: copygenerator: copied 9 files to /var/www/html/weewx
Dec 15 12:30:17 raspberrypi weewx[867]: manager: Added record 2017-12-15 12:30:00 CET (1513337400) to database 'weewx.sdb'
Dec 15 12:30:17 raspberrypi weewx[867]: manager: Added record 2017-12-15 12:30:00 CET (1513337400) to daily summary in 'weewx.sdb'
Dec 15 12:30:27 raspberrypi weewx[867]: cheetahgenerator: Generated 14 files for report StandardReport in 8.06 seconds
Dec 15 12:30:31 raspberrypi weewx[867]: imagegenerator: Generated 12 images for StandardReport in 3.48 seconds
Dec 15 12:30:31 raspberrypi weewx[867]: copygenerator: copied 0 files to /var/www/html/weewx
and...
pi@raspberrypi:~ $ sudo systemctl status weewx.service
● weewx.service - LSB: weewx weather system
Loaded: loaded (/etc/init.d/weewx; generated; vendor preset: enabled)
Active: active (running) since Fri 2017-12-15 12:23:34 CET; 13min ago
Docs: man:systemd-sysv-generator(8)
Process: 821 ExecStop=/etc/init.d/weewx stop (code=exited, status=0/SUCCESS)
Process: 852 ExecStart=/etc/init.d/weewx start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/weewx.service
└─867 python /usr/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
Dec 15 12:30:17 raspberrypi weewx[867]: manager: Added record 2017-12-15 12:30:00 CET (1513337400) to database 'weewx.sdb'
Dec 15 12:30:17 raspberrypi weewx[867]: manager: Added record 2017-12-15 12:30:00 CET (1513337400) to daily summary in 'weewx.sdb'
Dec 15 12:30:27 raspberrypi weewx[867]: cheetahgenerator: Generated 14 files for report StandardReport in 8.06 seconds
Dec 15 12:30:31 raspberrypi weewx[867]: imagegenerator: Generated 12 images for StandardReport in 3.48 seconds
Dec 15 12:30:31 raspberrypi weewx[867]: copygenerator: copied 0 files to /var/www/html/weewx
Dec 15 12:35:17 raspberrypi weewx[867]: manager: Added record 2017-12-15 12:35:00 CET (1513337700) to database 'weewx.sdb'
Dec 15 12:35:17 raspberrypi weewx[867]: manager: Added record 2017-12-15 12:35:00 CET (1513337700) to daily summary in 'weewx.sdb'
Dec 15 12:35:27 raspberrypi weewx[867]: cheetahgenerator: Generated 14 files for report StandardReport in 8.12 seconds
Dec 15 12:35:31 raspberrypi weewx[867]: imagegenerator: Generated 12 images for StandardReport in 3.55 seconds
Dec 15 12:35:31 raspberrypi weewx[867]: copygenerator: copied 0 files to /var/www/html/weewx
As the guideline
https://github.com/weewx/weewx/wiki/add-sensorindicates: "The data will not be displayed on the weather station console, but they will be displayed in WeeWX reports." So needless to run:
PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/owfs.py --sensors
sudo PYTHONPATH=/usr/share/weewx python /usr/share/weewx/user/owfs.py --sensors
So temperature readings are taking place every 5 minutes, great! :) But they are not being displayed by the webserver 192.16.1.2 which shows the default weewx webpage:
This station uses a Simulator, controlled by 'weewx', an experimental weather software system written in Python [...]
But since it configured as a service, how should weewx.conf be edited so that it takes values from Horacio's script?
In the case of an OWFSS service the website
is precise about how to configure the weewx.conf section [OWFS]
But what about this particular case? Editing station_type = DS18B20 and then adding a [DS18B20] tag at the end of the file?
[OWFS]
interface = u
[[sensor_map]]
outTemp = extraTemp1 # variable from /usr/share/weewx/user/ds18b20.py
I'm a bit lost at this stage but very glad to see how close we are to get it done :)
Regards,