file txt to import in weewx

220 views
Skip to first unread message

Sébastien F4GQK

unread,
Oct 3, 2020, 11:35:40 AM10/3/20
to weewx-user
Hello, 

 I have a WALDBECK Halley WHT3 weather station I use a home automation system where I receive information from the station and via a php file, I have the possibility of exporting to Weewx a txt file with the different fields recognized by weewx (currently every minute) I wanted to know by what solution I can force weewx to read this file txt which contains all the data of the weather station instead of station_type: simulator. 

 Thanks

Sébastien 

Tom Keffer

unread,
Oct 3, 2020, 2:52:58 PM10/3/20
to weewx-user
See the "fileparse" example that comes with WeeWX. Most likely it can be adapted to parse your file structure.

-tk

--
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/5af12bc3-9858-45d9-a2c3-5f179b319badn%40googlegroups.com.

Sébastien F4GQK

unread,
Oct 4, 2020, 12:20:36 PM10/4/20
to weewx-user
Thanks this works with fileparse.

But I still have one last problem which may not be specific to Fileparse

The Total precipitation Today remains at 0mm, weewx does not do the calculation to add. A solution ?

Thanks

Sebastien

Tom Keffer

unread,
Oct 4, 2020, 12:49:32 PM10/4/20
to weewx-user
Some weather stations report the daily rain as observation type "dayRain", but, generally, WeeWX does not calculate it.

For reports, WeeWX can show daily rain. For example, the tag $day.rain.sum will be the amount of rain since midnight.

Sébastien F4GQK

unread,
Oct 4, 2020, 2:09:05 PM10/4/20
to weewx-user
what is the term recognized by weewx for a day's total precipitation.

I have created an index.php file which will create a txt file for me

outTemp=51.6
barometer=31.697
pressure=31.697
outHumidity=92
windSpeed=1.12
windDir=208
windGust=5.82
rainRate=0.236
rain_total=3.260
inTemp=68.2
inHumidity=58
radiation=0.00
UV=0
windchill=53.78
dailyrainin=0.236
dewpoint=49.33
extraTemp1=
extraHumid1=
extraTemp2=
extraHumid2=
extraTemp3=
extraHumid3=
soilTemp1=
windBatteryStatus=
rainBatteryStatus=
outTempBatteryStatus=
consBatteryVoltage=
supplyVoltage=
txBatteryStatus=
heatingVoltage=


and this is the file that fileparse uses for weewx.

thanks

Tom Keffer

unread,
Oct 4, 2020, 2:18:32 PM10/4/20
to weewx-user
For rain since midnight, WeeWX uses 'dayRain'. For rain over the last 24 hours, 'rain24'.

Sébastien F4GQK

unread,
Oct 5, 2020, 1:11:18 PM10/5/20
to weewx-user
Good evening 

in my generated file I entered: 

day Rain or rain24, 

 outTemp = 54.9 
barometer = 31.940 
pressure = 31.940 
outHumidity = 96 
windSpeed ​​= 10.51 
windDir = 217 
windGust = 14.76
 rainRate = 0.000 
rain_total = 3.811 
inTemp = 66.6 
inHumidity = 61 
radiation = 2.08 
UV = 0 
windchill = 51.98
 dayRain = 0.551 
dewpoint = 53.76 
extraTemp1 = 
extraHumid1 = 
extraTemp2 = 
extraHumid2 = 
extraTemp3 =
 extraHumid3 = 
soilTemp1 = 
windBatteryStatus = 
rainBatteryStatus = 
outTempBatteryStatus = 
consBatteryVoltage = 
supplyVoltage = 
txBatteryStatus =
 heatingVoltage = 

 but I still have 0 in the cumulative rainfall 



it looks like weewx can't interpret this data. Are there really no other solutions? 

thanks 

gjr80

unread,
Oct 5, 2020, 5:08:56 PM10/5/20
to weewx-user
Hi,

What exactly does this mean?

 but I still have 0 in the cumulative rainfall 

Does this mean you are not seeing dayRain in loop packets and archive records? Are you unable to use $current.dayRain in a report or is dayRain not being populated in the archive? If the latter have you added dayRain to your db schema? dayRain is not included in the two schemas provided with WeeWX, you need to add it yourself. You should be seeing dayRain in loop packets and archive records and you should be able to use $current.dayRain in reports . Have you run WeeWX directly to observe the loop packets and archive records?

If you are attempting to populate the WeeWX rain field that will require some (simple) modification to the fileparse driver as WeeWX field rain is incremental not cumulative.

Sorry my French is not very good but if your site is out of the box WeeWX then it uses/displays rain data derived from WeeWX field rain.

Gary

Sébastien F4GQK

unread,
Oct 6, 2020, 7:11:01 AM10/6/20
to weewx-user

What exactly does this mean?

 but I still have 0 in the cumulative rainfall 

It's more that:

Today's Rain  = 00 mm  

Tom Keffer

unread,
Oct 6, 2020, 8:39:21 AM10/6/20
to weewx-user
Make sure you have read the section Porting to new hardware. In particular, the section Implement the driver

LOOP packets and archive records should contain the amount of rain that fell during the LOOP packet period or the archive interval, respectively, as field "rain". This is what is put in the database. Your generated file does not contain "rain".

In the reports that come with WeeWX, the type dayRain is not used. Nor is it stored in the database. Instead, WeeWX calculates the rain since midnight by summing up all these small contributions of field "rain". If you don't have it, then you will get zero.


--
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.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages