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
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/weewx-user/b4a60685-724e-4260-834e-3589af69dcba%40googlegroups.com.