second directory/file to grab data with FilePile...?

89 views
Skip to first unread message

Christian Peters

unread,
Jan 18, 2025, 3:32:31 AM1/18/25
to weewx...@googlegroups.com
Hi Users/Tom,

is it possible to set up a second location/file/directory to grab data
form a second file and different location? As I would import data from
another computer and can't include this data easy into the already
generated file I would like to add a second section with other settings,
like:

[FilePile]
filename = /var/tmp/pond.txt
unit_system = US
ignore_value_error = False
[[label_map]]
myVoltage = supplyVoltage

filename = /srv/local/tmp.txt
unit_system = US
ignore_value_error = False
[[label_map]]
extraTemp3 = temp1
extraHum3 = hum1

???

Is this the way?


Or do I have somehow to set up a second FilePile?
Or is this not possible at the moment!?

Thanks in advance.

Regards,

Christian

Steeple Ian

unread,
Jan 18, 2025, 5:47:15 PM1/18/25
to weewx-user
I use PHP to write a single .txt file line by line, my example: -

<?php
$myfile = fopen("/var/www/html/divumwx/serverdata/filepileTextData.txt", "w") or die("Unable to open file!");
$txt = "pm25 = $pm25\n";
fwrite($myfile, $txt);
$txt = "pm10 = $pm10\n";
fwrite($myfile, $txt);
$txt = "co = $co\n";
fwrite($myfile, $txt);
$txt = "no2 = $no2\n";
fwrite($myfile, $txt);
$txt = "so2 = $so2\n";
fwrite($myfile, $txt);
$txt = "o3 = $o3\n";
fwrite($myfile, $txt);
$txt = "nh3 = $nh3\n";
fwrite($myfile, $txt);
$txt = "aod = $aod\n";
fwrite($myfile, $txt);
$txt = "dust = $dust\n";
fwrite($myfile, $txt);
$txt = "alder = $alder\n";
fwrite($myfile, $txt);
$txt = "birch = $birch\n";
fwrite($myfile, $txt);
$txt = "olive = $birch\n";
fwrite($myfile, $txt);
$txt = "grass = $grass\n";
fwrite($myfile, $txt);
$txt = "mugwort = $mugwort\n";
fwrite($myfile, $txt);
$txt = "ragweed = $ragweed\n";
fwrite($myfile, $txt);
$txt = "cloudCover = $cloudcover\n";
fwrite($myfile, $txt);
$txt = "kWh = $kwh\n";
fwrite($myfile, $txt);
$txt = "gridProduction = $gridProduction\n";
fwrite($myfile, $txt);
$txt = "solarBattery = $solarBattery\n";
fwrite($myfile, $txt);
$txt = "gridExport = $gridExport\n";
fwrite($myfile, $txt);
$txt = "batteryCharge = $batteryCharge\n";
fwrite($myfile, $txt);
$txt = "solarGeneration = $solarGeneration";
fwrite($myfile, $txt);
fclose($myfile);
?>

This results in a text file with contents in the format required by FilePile: -

pm25 = 24
pm10 = 28.9
co = 288
no2 = 35.6
so2 = 3.8
o3 = 12
nh3 = 1.2
aod = 0.13
dust = 0
alder = 0
birch = 0
olive = 0
grass = 0
mugwort = 0
ragweed = 0
cloudCover = 100
kWh = 0
gridProduction = 2443
solarBattery = -1913
gridExport = 0
batteryCharge = 1913
solarGeneration = 0

Tom Keffer

unread,
Jan 18, 2025, 6:21:33 PM1/18/25
to weewx...@googlegroups.com
Sorry, Christian. As written, Filepile can handle only one file.


--
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 visit https://groups.google.com/d/msgid/weewx-user/10f6b764-fbbc-4062-9d0c-bc9604af40af%40googlemail.com.
Reply all
Reply to author
Forward
0 new messages