Have just tried to add avg_distance and lightning_strikes to the weewx.sdb. schema by adding
import schemas.wview
schema_extended = schemas.wview.schema + [('avg_distance', 'REAL'),('lightning_strikes', 'REAL')]
in the extension.py file
and in the weewx.conf
changed schema = schemas.wview_extended.schema
to schema = user.extensions.schema_extended
then
sudo ./bin/wee_database weewx.conf --reconfigure
The new weewx.sdb was produced and so I then did --rebuild-daily.
Restarted weewx and started getting a failure with $day.wind.max and also the following was produced in the log with
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: **** data = self.calculate(cached_packet)
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: **** File "/home/weewx/bin/user/rtgd.py", line 1926, in calculate
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: **** wgust_tm_vt = ValueTuple(self.day_stats['wind'].max,
May 27 19:20:11 raspberrypi weewx[529] INFO user.rtgd: rtgdthread: **** KeyError: 'wind'
Had a look at the old and new weew.sdb and in the database file structure the tables had gone from 114 Table Schema in the original to 54 Table Schema after I had done the above change with daily_archive_wind missing with lots of others.
Reverted back to the original weewx.sdb and it was Ok again.
Im using weewx Ver 4.1
Just wondered if there was a different way of doing the above since version 4
Thanks for any help
Phil