Hi,Yes you can merge two databases I have done it a number of times. You need to use SQLite commands. At a high level you attached to the two databases and then use the update command. If you google merge sqlite databases you can find a number of ways to do it.Jerry
Womit bearbeite ich die Archivtabelle und welche Datenbankdienstprogramm verwende ich dafür?
$ sqlite3 /home/weewx/archive/weewx.sdb
sqlite> SELECT MIN(dateTime),MAX(dateTime),COUNT(dateTime) FROM archive;
1486989000|1578345600|300759
sqlite> SELECT strftime('%d-%m-%Y %H:%M:%S', datetime(MIN(dateTime), 'unixepoch', 'localtime')),strftime('%d-%m-%Y %H:%M:%S', datetime(MAX(dateTime), 'unixepoch', 'localtime')),COUNT(dateTime) FROM archive;
13-02-2017 22:30:00|07-01-2020 07:25:00|300760
$ sqlite3 /home/weewx/archive/weewx.sdb
sqlite> SELECT MIN(dateTime),MAX(dateTime),COUNT(dateTime) FROM archive;
1486989000|1578345600|300759
sqlite> SELECT strftime('%d-%m-%Y %H:%M:%S', datetime(MIN(dateTime), 'unixepoch', 'localtime')),strftime('%d-%m-%Y %H:%M:%S', datetime(MAX(dateTime), 'unixepoch', 'localtime')),COUNT(dateTime) FROM archive;
13-02-2017 22:30:00|07-01-2020 07:25:00|300760
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/87c9cfc6-2b06-4924-8479-c996405e1d74%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ff73bff7-949e-4266-9964-62844b78556d%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ff73bff7-949e-4266-9964-62844b78556d%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c8e26b1c-5cf4-42ec-b1d7-dc40c07703ac%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/c8e26b1c-5cf4-42ec-b1d7-dc40c07703ac%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/555d9cbb-eaac-4be7-a334-cad72f604725%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/555d9cbb-eaac-4be7-a334-cad72f604725%40googlegroups.com.
Gary
rain = cumulative
rain = 'Gesamter Niederschlag', mm
Hello Gary.First of all, thank you for exploring the cvs file. Sounds good that you can import and save them. Now I have to know something else. you talk about adapting the wee_import? How does that work? I also wanted to ask because I didn't quite understand it with rain. Weewx needs the cumulative amount of rain. Wouldn't it be easier if I simply deleted all other rain data from the table? And the last question. You wrote that (--dry-run) can be used to test whether everything is ok. How should I do that? Sorry for the many questions. But is not quite clear ;-)
Now I have to know something else. you talk about adapting the wee_import? How does that work?
I also wanted to ask because I didn't quite understand it with rain. WeeWX needs the cumulative amount of rain. Wouldn't it be easier if I simply deleted all other rain data from the table?
And the last question. You wrote that (--dry-run) can be used to test whether everything is ok. How should I do that?
Sorry for the many questions. But is not quite clear ;-)
I have now worked exactly according to the instructions. Unfortunately I always get the same error message when importing the data. I have the relevant data as an attachment here.
wee_import --import-config=/var/tmp/csv.conf --dry-run
Starting wee_import...
A CSV import from source file '/home/pi/Desktop/EXP09_17.csv' has been requested.
Using database binding 'wx_binding', which is bound to database 'weewx.sdb_new'
Destination table 'archive' unit system is '0x01' (US).
Missing derived observations will be calculated.
This is a dry run, imported data will not be saved to archive.
**** Unable to map source data.
**** Field 'timestamp' not found in source data.
**** Nothing done, exiting.
Can someone help me please?
Thx
Hello Andrew.
Thank you for your message. What do you mean exactly? Sorry for the question, but this is completely new.
What exactly do I have to do and where do I have to adjust it?
Thank you for your help
HelloI have now adjusted the csv.conf and the datad.csv so that no warnings are given when running dry.I can't say which units are behind the "," in [[FieldMap]] and whether they are correct.
raw_datetime_format = %d.%m.%Y %H:%M:%S might best be changed to:
raw_datetime_format = %d.%m.%Y %H:%M:%S
The field map:
barometer = Absoluter Luftdruck, inHg
should be changed to use hectopascals:
barometer = Absoluter Luftdruck, hPa
change:
UV = to:
UV = UV(uW/m2)
For rain, the field specified is supposed to have a value that's reset each midnight when the "rain = cumulative" option is used. So I don't know if the
field "24-Stunden-Niederschlag" (24-hour-precipitation) will work or not.
I only entered them on suspicion and hope that they are correct.I also entered the inside temperature although they are not shown in these NOAA files but are inside the database.Can I actually import all the data in my CSV file that is also in the database?
[[FieldMap]]dateTime = Zeit, unix_epochusUnits =interval =barometer = Absoluter Luftdruck, inHgpressure =altimeter =inTemp = Innentemperatur, degree_CoutTemp = Aussentemperatur, degree_CinHumidity = Innenluftfeuchtigkeit, percentoutHumidity = Aussenluftfeuchtigkeit, percentwindSpeed = Windgeschwindigkeit, km_per_hourwindDir = Windrichtung, degree_compasswindGust = Windboeen, km_per_hourwindGustDir = Windrichtung, degree_compassrainRate =rain = 24-Stunden-Niederschlag, mmdewpoint =windchill =heatindex =ET =radiation =UV =Thanks Günther
I was now able to retroactively import my data into weewx. It worked wonderfully. Now I have another question.
After I have written the data into the database, I have to execute another command so that it is also on the homepage, so. e.g. in Belchertown under "Reports"? So far nothing is there, not even after midnight.
Thanks
barometer = Absoluter Luftdruck, hPa
Apr 15 20:19:22 raspberrypi weewx[15205]: **** ValueError: accum: ScalarStats.addHiLo expected float or int, got type '<type 'unicode'>' ('')
Apr 15 20:25:46 raspberrypi weewx[15651]: **** TypeError: unsupported operand type(s) for -: 'list' and 'float'
Hello.
I have now deleted the data in the folder "/var/www/html/weewx/NOAA/". These came again after the next interval. Unfortunately without data. Do I have to delete it anywhere else?
Thank you for your top help
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/8fc609f0-224a-4205-98d4-410a7acc759f%40googlegroups.com.
Hallo GüntherIn welchem Ordner hast du das gelöscht?
--HelloI deleted the file NOAA-2019-05.txt, NOAA-2019.txt and it worked perfectly. For me is now the 01.05.2015 that I imported. The fact that there is nothing inside has happened to me even though I have only deleted the NOAA.txt. Maybe you have to restart or reload weewx.Günther
Am Samstag, 18. April 2020 14:56:21 UTC+2 schrieb Meteo Oberwallis:Hello. I have now deleted the data in the folder "/var/www/html/weewx/NOAA/". These came again after the next interval. Unfortunately without data. Do I have to delete it anywhere else? Thank you for your top help
Am Freitag, 17. April 2020 23:42:39 UTC+2 schrieb gjr80:Hallo Günther,
Good to hear you have imported your data and WeeWX is running without error. You need WeeWX to recreate all of your NOAA format reports, to do this just delete the reports on your WeeWX machine and they will be recreated (including your earlier ones) on the next report cycle.
Gary
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...@googlegroups.com.
Hallo GüntherIn welchem Ordner hast du das gelöscht?
--HelloI deleted the file NOAA-2019-05.txt, NOAA-2019.txt and it worked perfectly. For me is now the 01.05.2015 that I imported. The fact that there is nothing inside has happened to me even though I have only deleted the NOAA.txt. Maybe you have to restart or reload weewx.Günther
Am Samstag, 18. April 2020 14:56:21 UTC+2 schrieb Meteo Oberwallis:Hello. I have now deleted the data in the folder "/var/www/html/weewx/NOAA/". These came again after the next interval. Unfortunately without data. Do I have to delete it anywhere else? Thank you for your top help
Am Freitag, 17. April 2020 23:42:39 UTC+2 schrieb gjr80:Hallo Günther,
Good to hear you have imported your data and WeeWX is running without error. You need WeeWX to recreate all of your NOAA format reports, to do this just delete the reports on your WeeWX machine and they will be recreated (including your earlier ones) on the next report cycle.
Gary
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...@googlegroups.com.
Hallo Günther
Nun. Das finde ich so nirgends in meinem weewx Ordner. Ist das der Ordner, bevor es via FTP hochgeladen wird?
Gruss
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f02b56bc-8550-45f7-95ae-3e58054284d5%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f02b56bc-8550-45f7-95ae-3e58054284d5%40googlegroups.com.
wee_database --rename-column=sunshine_hours --to-name=sunshine_time
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f7df793b-6e6b-43f8-95e8-799af2218b3en%40googlegroups.com.
Hey Tom.
Thx for your Help.
In the new weewx version, "schema = schemas.wview_extended.schema" is used with the table. In the previous version of weewx, however, this was "schema = user.radiationhours.schema_with_sunshine_hours". What exactly do I have to do if I transfer my old weewx.sdb to the program? Do I then have to adapt these with sudo wee_database weewx.conf --reconfigure to the ""schema = schemas.wview_extended.schema"? I think that's where my problem lies.
Currently I did the following: Old weewx.sdb in the /var/lib/weewx/ folder. Then adjust the column names with "wee_database --rename-column=sunshine_hours --to-name=sunshine_time" and finally adjust the new Shmea from weewx with sudo wee_database weewx.conf --reconfigure. After I did that, the "sunshine_time" column was gone. Only after "sudo wee_database --add-column=sunshine_time" is it back, but unfortunately without all the data from the last few years.
Where is my mistake?
--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/86KPd-dyvD4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAPq0zEBx1WzUgoiV%2Bj07vMVqW7seYe6jM-3WCmks2ZmREeVmCQ%40mail.gmail.com.