--
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 weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Gary
Gary
Steps to fix your situation:
- copy weewx.sdb to a know location eg /var/tmp
- run the command you mentioned using /var/tmp/weewx.sdb (or wherever you copied weewx.sdb) in place of weewx.sdb
- make your changes as per the wiki entry that Tom linked
- once you are satisfied with your changes, stop weewx.
- move /var/lib/weewx/weewx.sdb aside by renaming it, say weewx_orig.sdb
- copy your amended database to /var/lib/weewx
- start weewx, if you watch the log it should catch in any missed archive records
Gary
I copied weewx.sdb to /var/tmp/ (with winSCP)
I modified it with commands in https://github.com/weewx/weewx/wiki/Cleaning%20up%20old%20'bad'%20data
But when I wanted to copy it back to /var/lib/weewx/, it was impossible due to bad chmod.
I did something wrong (tried to work as root) and it was impossible to use weewx.
I found tonight I have on http://f5phw.free.fr/weewx/week.html radiations, UV and ET measures.
I don't have any sensor for ET, UV and radiations.
So, I decided to delete them
I made a new backup, install sqlite3.
I used (and learned how to) the raspi as root and I used the following sentences :
echo "SELECT * FROM archive WHERE (radiation > 0);" | sqlite3 /var/lib/weewx/weewx.sdb
I found lines as predicted, then :
echo "UPDATE archive SET radiation=NULL WHERE (radiation > 0);" | sqlite3 /var/lib/weewx/weewx.sdb
Then I made again to verify
echo "SELECT * FROM archive WHERE (radiation > 0);" | sqlite3 /var/lib/weewx/weewx.sdb
And I found nothing. So it works.
I did the same for ET and UV.
I made a reboot of my rpi and wait.
On http://f5phw.free.fr/weewx/week.html
The measures for ET, UV and radiations are still here.
May be I have forgotten something.
The last question : can you give the right sentence to copy weewx.sdb from /var/tmp/ to /var/lib/weewx/ ?
And the same question to move the file ?
(using sudo if necessary).Gary