On Tuesday, 24 March 2020 00:57:57 UTC+10, Janne Prokkola wrote:
>
> hi
>
> thanks for a good answer. Yesterday after my posting I thought also the 
> reason might be in csv. I tried several different programs like Gedit and 
> Libreoffice and in the end I managed to import my csv to weewx. 
> Unfortunately I did not understand why. 
>

As I said, the issue was some non-displaying characters/bytes at the start 
of the file, specifically the UTF-8 BOM 
<https://en.wikipedia.org/wiki/Byte_order_mark#UTF-8>. Most likely inserted 
by the program that created the file or an editor used to edit the file. At 
present wee_import cannot handle those characters so the only way to import 
such a file is to delete the characters.
 

> Now I have to find a reasonable workaround to get csv imported to weewx. 
> You might ask why I need this? I'm going to install my Ventus to our 
> cottage without PC connection. When I visit my cottage I'd like to read the 
> history data from my Ventus W835. The manufacturer of Ventus provide a 
> Windows program (Weather Tool v1.exe) to do this, and the output is csv. 
>
> My steps are following
> 1) download history-data from weather station (Windows)
> 2) open file in Linux
> 3) change wind directions (N, E, etc) to degrees
> 4) merge date and time to one column (maybe not necessary to convert it to 
> timestamp?)
> 5) get rid of BOM
> 6) import to weewx
>

Date and time needs to be in a single field/column but can be in any format 
that can be represented by Python strptime() format codes 
<https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior>.
 
There is no need to convert to Unix epoch timestamps. I have a long 
outstanding task <https://github.com/weewx/weewx/issues/238> to allow 
compass point directions to be used in CSV imports. Seems I might have some 
spare time on my hands now so I will see if I can get that implemented in 
the not too distant future. The BOM issue is being worked on and should be 
solved in WeeWX 4.0. So if you have a lot of data to import if you wait a 
for short while it should make your task of importing your data somewhat 
easier. 

>
> Just too many steps to do it regularly. A nice script would help. Maybe I 
> have to try to write one.
>

A script or a decent (code) editor with some well thought out 
regexs/searches/replaces will make life easier.

Or will there be in the future an option to download the history data 
> stored in weather station directly to weewx?
>

Downloading history stored in the station is a driver issue not a '
wee_import' issue. Some station hardware supports it, some does not. Of the 
stations that do support it some drivers implement it and some do not (for 
a variety of reasons). By the sounds of it your station may support 
downloading the history but the driver is yet to implement the feature.

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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ac09c409-25ce-461c-a099-afaca13e13ce%40googlegroups.com.

Reply via email to